[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Antti Kaijanmäki: You sir, are my hero. The python script did the trick, and now my external firewire drive detects and asks for a password right away. Thanks! -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
OK. I now have a python program (attached) that I successfully used to make my karmic upgrade bootable again. The idea is to remove all additional signatures from superblock. Currently only removing ext[234] signature is supported, but the program can be extended if needed. The idea is that you can use live-CD to download the script and run it without needing to install any dependencies or what so ever. I've tried very hard not to mess with people's hard drives: - superblock is not altered without --force option - a backup is made before superblock is altered so that changes can be reverted - if there's unsupported signatures detected the program refuses to alter the superblock - trying to restore a backup of a wrong partition is not allowed - I used vbindiff to check that only the right bytes get altered and that the restore works But of course there might be bugs or it might not work for everyone so here's a quote from the license: #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. If you use live-CD or something like that make sure to mount, copy and run the script from unencrypted /boot partition so that the backups get really written to disk and you won't loose them when you try to do a reboot. And last: You have to know which signature is the right one to keep! If you choose a wrong signature and mount the partition as read/write or run wrong fsck on it you will most probably loose your data and a simple superblock backup won't save you. $ sudo python fix_superblock.py help Usage: # fix_superblock.py [command] [options] Available commands: - help - check - fix - restore check: check [partition] Print signatures from superblock of [partition]. fix: fix [partition] [type] --force Fix the superblock of [partition] to contain only the the signature of filesystem [type]. If --force is omitted the superblock is not altered restore: restore [backup] [partition] --force Restore a superblock backup. If --force is omitted the superblock is not altered $ mkdir boot $ sudo mount /dev/sda5 boot $ sudo cp fix_superblock.py boot/ $ cd boot/ $ sudo python fix_superblock.py check /dev/sda1 Found 2 signatures on partition /dev/sda1: - crypto_LUKS - ext3 $ sudo python fix_superblock.py fix /dev/sda1 crypto_LUKS Found the wanted signature from superblock. adding ext3 remove handler creating backup 'sda1_superblock_20091017130751_701226' 1+0 records in 1+0 records out 65536 bytes (66 kB) copied, 0.000174184 s, 376 MB/s backup done. EXT remove handler EXT signature found Not removing EXT signature (--force needed) $ sudo python fix_superblock.py fix /dev/sda1 crypto_LUKS --force Found the wanted signature from superblock. adding ext3 remove handler creating backup 'sda1_superblock_20091017130757_475293' 1+0 records in 1+0 records out 65536 bytes (66 kB) copied, 0.000177885 s, 368 MB/s backup done. EXT remove handler May the Force be With You EXT signature found Removing EXT signature EXT signature removed. $ sudo python fix_superblock.py check /dev/sda1 Found 1 signatures on partition /dev/sda1: - crypto_LUKS ** Attachment added: "fix_superblock.py" http://launchpadlibrarian.net/33825345/fix_superblock.py -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
After some research this is what I've found out; udev is responsible of creating the entries under /dev/disks/by-uuid. Jaunty's udev (which is also in the old initrd) uses udev's vol_id library to detect the FS information. Karmic has new udev which has ditched vol_id and is using blkid instead. That's why the crypto partiton is "correctly" detected with the old initrd. Now that odd behavior has an explanation and I can safely concentrate on solution. Steven: How about creating a shell script that would handle the dd magic based on a couple of questions made to the user? Users could use live-cd to download and install the script manually to unencrypted /boot and we could do a safe backup of the superblock so that it can be restored if user has selected a wrong fs type? The scipt could also mount the modified partition as readonly to let the user verify that the files are there or something like that. Anyway it would be nice if there was a solution that would not require the user to do error prone DD magic by hand and is reversible if the user makes a mistake (wrong partition, wrong fs type, etc). -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
I was wrong on #18. I do not actually have any old jaunty menu entries left, but I have 2.6.30-020630-generic which I installed for intel drivers on jaunty. I just forgot about it and didn't look hard enough last night. http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.30/ Anyway this kernel/initrd is able to detect the crypto partition correctly. I don't know why.. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
I dont believe we can fix this in an automatic way for the users. The best idea would be to document the dd command to clean the record and put it on the wiki and reference it in release notes. There is not a reliable way to detect what type of filesystem is on it before cryptsetup 1.0.7, hence the reason for the breakage to begin with. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Timo: I installed clean jaunty with "standard" alternate CD HDD encryption. Jaunty ships with cryptsetup 1.0.6 and the problem which causes this was fixed in 1.0.7 from the mailing list in comment #16: cryptsetup 1.0.7 changelog: - Wipe start of device (possible fs signature) before LUKS-formatting. So this problem is not going to show up with everyone, but when it does it's nasty and very troublesome. I'll try some dd magic tomorrow to see if I can get the karmic kernel/initramfs to detect the partition correctly. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Antti: Did you have this problem with a "standard" (automatic encryption from alternate install CD) encrypted HDD or something else? Just curious, since I'm running karmic without problems, and the installation has been originally done from alternate CD with the automatic option. I did however update to karmic already 1-2 months ago. But apparently the question is more about with which version of Ubuntu the encryption was created, right? I think I started with 8.04 LTS when I got this laptop in May 2008, but I'm not 100% sure. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Hmm.. odd thing is that if I boot using old jaunty menu entry then the partition is detected correctly... -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
How about adding a VERY big warning to the release notes if this doesn't get fixed before karmic is released? I too got bitten by this on standard upgrade from jaunty to karmic and now karmic initramfs doesn't find my encrypted LVM (root, swap) partition! -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
This bug has been discussed at the mailing list of util-linux: http://thread.gmane.org/gmane.linux.utilities.util-linux- ng/2563/focus=2565 The problem here are devices which have been created with old versions of cryptsetup, new versions wipe out the whole superblock data. At the moment there is no official patch. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Here is mine to help get this faster. Mine is a luks encrypted ext3 drive. ** Attachment added: "ext3-luks.img" http://launchpadlibrarian.net/33496628/ext3-luks.img ** Changed in: util-linux (Ubuntu) Status: Incomplete => Confirmed -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
buzz [2009-10-12 13:46 -]: > i would do the next steps private via email if thats fine for you? Sure, thanks! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
i would do the next steps private via email if thats fine for you? -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
buzz, thanks! Would it be possible for you to get an image of the first 100 kB of data of this partition? This will contain your encrypted LUKS password and possibly some remainders of file system metadata from the old ext4, so please don't do it if you have potentially sensitive data there. I won't be able to decrypt it, of course, but I'm interested in putting the image on an USB stick and see if I can reproduce the problem, so that blkid can be fixed properly. sudo dd if=/dev/sdb1 of=/tmp/ext4-luks.img bs=1K count=100 (It might not actually be /dev/sdb1 if you have other USB drives attached, though). Alternatively, if you have a proposed patch for blkid, that's appreciated as well, of course. :-) ** Package changed: devicekit-disks (Ubuntu) => util-linux (Ubuntu) -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Debugging the libblkid revealed that the probe functions detects two filesystem magics on the device. luks and ext4 as the blkid is set to be not tolerant it aborts the probe and sends a null pointer. if i change blkid to be tolerant it works fine, it shows me the password dialog and mounts the harddrive without problems. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
b...@buzz-laptop:~$ sudo blkid -c /dev/null /dev/sdb1 b...@buzz-laptop:~$ b...@buzz-laptop:~$ apt-cache policy cryptsetup cryptsetup: Installiert: 2:1.0.6+20090405.svn49-1ubuntu4 Kandidat: 2:1.0.6+20090405.svn49-1ubuntu4 Versions-Tabelle: *** 2:1.0.6+20090405.svn49-1ubuntu4 0 500 http://archive.ubuntu.com karmic/main Packages 100 /var/lib/dpkg/status -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Indeed the dk-disks data for /dev/sdb1 looks empty: usage: type: version: uuid: For my encrypted USB stick it looks like usage: crypto type:crypto_LUKS version: 256 uuid:52785e43-6bb9-4f25-985f-7522f606e138 Please copy & paste the output of sudo blkid -c /dev/null /dev/sdb1 here. Can you confirm that you have the "cryptsetup" package installed? -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
As this bug also happens with my external harddrive i posted a new bug report via the ubuntu-bug tool: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/448984 -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately I can't fix it without more information, since I cannot reproduce the problem (it works fine for my encrypted USB stick). In Ubuntu 9.10 (Karmic) we have a new tool to debug storage related problems. Please run "ubuntu-bug", select "storage problem", and walk through the steps. This will create a new bug report, please send the new bug number here, so that I get to know it quickly. Thank you! ** Changed in: devicekit-disks (Ubuntu) Status: Confirmed => Incomplete -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
I can also confirm on Karmic Beta 1 + updates. ** Changed in: devicekit-disks (Ubuntu) Status: New => Confirmed -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
I can confirm this situation with a new installed karmic version. Unencrypted USB Stick mounts fine (except nautilus is not opening the window), but encrypted external hard disc fails to prompt for a password and is only mountable via terminal. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
> It might be related to bug #430605 - also automount not happening, though for different devices. I think not because it affects encrypted devices only. - CD: no problem - usb stick: no problem - same stick with encryped volume: not mounted - encrypted external hard drive: not mounted -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
Just tested this today and it worked fine for me. However bug #430605 was also fixed overnight for me. Can you retest this and report whether it is still an issue? -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
It might be related to bug #430605 - also automount not happening, though for different devices. -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
** Package changed: gvfs (Ubuntu) => devicekit-disks (Ubuntu) -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 428435] Re: external harddrive (luks encrypted) will not mount automatically
** Attachment added: "BootDmesg.txt" http://launchpadlibrarian.net/31721908/BootDmesg.txt ** Attachment added: "CurrentDmesg.txt" http://launchpadlibrarian.net/31721909/CurrentDmesg.txt ** Attachment added: "DKDisksMonitorLog.txt" http://launchpadlibrarian.net/31721910/DKDisksMonitorLog.txt ** Attachment added: "Dependencies.txt" http://launchpadlibrarian.net/31721911/Dependencies.txt ** Attachment added: "UdevMonitorLog.txt" http://launchpadlibrarian.net/31721912/UdevMonitorLog.txt ** Description changed: Binary package hint: gvfs - - Ubuntu 9.10 Karmic (development branch) - gvfs 1.3.6 An encrypted external harddrive is not mounting automatically any more (e.g. like in 9.04). It mounts after unlocking it over the terminal with "cryptsetup luksOpen". ProblemType: Bug Architecture: i386 Date: Sat Sep 12 16:46:16 2009 DistroRelease: Ubuntu 9.10 HotplugNewDevices: /dev/sdb /dev/sdb1 HotplugNewMounts: Package: gvfs 1.3.6-0ubuntu1 ProcEnviron: LANG=de_DE.UTF-8 SHELL=/bin/bash ProcVersionSignature: Ubuntu 2.6.31-9.29-generic SourcePackage: gvfs Symptom: storage Uname: Linux 2.6.31-9-generic i686 -- external harddrive (luks encrypted) will not mount automatically https://bugs.launchpad.net/bugs/428435 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs