[opensuse] strange problem decrypting disc?
Hello list members, I'm on a OS 12.3 with the latest updates applied. Since an "update accident" (see description below between asterisk lines) there seems to be kind of a problem with mounting the encrypted disks at boot, the disk that contains the encrypted LVM with /, /home and swap. Allthough the respective disc is actually mounted (system runs normal and I can access everything normally without the need to type the password again) I receive the following message (in the kde control panel):
Broadcast message from root@Venus.atelier.foto (Mon, 2013-06-10 09:54:37 CEST): Password entry required for 'Please enter passphrase for disk WDC_WD20EARS-00MVWB0 (cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2)!' (PID 5429). Please enter password with the systemd-tty-ask-password-agent tool!
in /var/log/message everything seems normal to me, disks seem to be used, there are several messages about the found reiserfs, but quite late in the list I find the following lines:
2013-06-10T09:44:26.818639+02:00 Venus systemd-cryptsetup[4468]: Timed out 2013-06-10T09:44:26.819201+02:00 Venus systemd-cryptsetup[4468]: Failed to query password: Timer expired 2013-06-10T09:44:26.819466+02:00 Venus systemd[1]: systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service: main process exited, code=exited, status=1/FAILURE 2013-06-10T09:44:26.823561+02:00 Venus systemd[1]: Unit systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service entered failed state
and a bit later:
2013-06-10T09:54:37.277691+02:00 Venus systemd[1]: Expecting device dev-mapper-cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device... 2013-06-10T09:54:37.283781+02:00 Venus systemd[1]: Starting Cryptography Setup for cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2... 2013-06-10T09:54:37.288637+02:00 Venus systemd[1]: Starting Cleanup of Temporary Directories... 2013-06-10T09:54:37.289437+02:00 Venus systemd[1]: Started Forward Password Requests to Wall. 2013-06-10T09:54:37.463612+02:00 Venus systemd-tmpfiles[5430]: stat(/run/user/1000/gvfs) failed: Permission denied 2013-06-10T09:54:41.042632+02:00 Venus systemd[1]: Started Cleanup of Temporary Directories. 2013-06-10T09:56:07.277793+02:00 Venus systemd[1]: Job dev-mapper-cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device/start timed out. 2013-06-10T09:56:07.278261+02:00 Venus systemd[1]: Timed out waiting for device dev-mapper-cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device. 2013-06-10T09:56:07.278657+02:00 Venus systemd[1]: Dependency failed for Cryptography Setup for cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2. 2013-06-10T09:56:07.279060+02:00 Venus systemd[1]: Job systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service/start failed with result 'dependency'. 2013-06-10T09:56:07.279529+02:00 Venus systemd[1]: Job dev-mapper-cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device/start failed with result 'timeout'. 2013-06-10T09:56:07.324209+02:00 Venus systemd-cryptsetup[5429]: Timed out 2013-06-10T09:56:07.324819+02:00 Venus systemd-cryptsetup[5429]: Failed to query password: Timer expired 2013-06-10T09:56:07.324973+02:00 Venus systemd[1]: systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service: main process exited, code=exited, status=1/FAILURE 2013-06-10T09:56:07.329651+02:00 Venus systemd[1]: Unit systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service entered failed state
/var/boot log says something more:
Starting Replay Read-Ahead Data... Starting Collect Read-Ahead Data... [[1;32m OK [0m] Listening on Syslog Socket. [[1;32m OK [0m] Reached target System Time Synchronized. [[1;32m OK [0m] Reached target Remote File Systems. [[1;32m OK [0m] Listening on Delayed Shutdown Socket. [[1;32m OK [0m] Listening on /dev/initctl Compatibility Named Pipe. [[1;32m OK [0m] Listening on udev Kernel Socket. [[1;32m OK [0m] Listening on udev Control Socket. [[1;32m OK [0m] Set up automount Arbitrary Executable File Formats File System Automount Point. Expecting device dev-system-swap.device... Expecting device dev-mapper-cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device... Expecting device dev-disk-by\x2did-ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.device... Expecting device dev-disk-by\x2did-ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart1.device... Expecting device dev-disk-by\x2did-ata\x2dWDC_WD2002FAEX\x2d007BA0_WD\x2dWCAY01001843\x2dpart1.device... Expecting device dev-mapper-cr_sdb1.device... Expecting device dev-system-home.device... [[1;32m OK [0m] Listening on Journal Socket. Mounting POSIX Message Queue File System... Mounting Huge Pages File System... Starting Create dynamic rule for /dev/root link... Starting Journal Service... [[1;32m OK [0m] Started Journal Service. Starting LSB: Set default boot entry if called... [[1;32m OK [0m] Started Collect Read-Ahead Data. [[1;32m OK [0m] Started Replay Read-Ahead Data. Starting Setup Virtual Console... Starting Load Kernel Modules... Starting Remount Root and Kernel File Systems... [[1;32m OK [0m] Started Load Kernel Modules. Starting Apply Kernel Variables... [[1;32m OK [0m] Mounted Huge Pages File System. [[1;32m OK [0m] Mounted POSIX Message Queue File System. [[1;32m OK [0m] Started Apply Kernel Variables. [[1;32m OK [0m] Started LSB: Set default boot entry if called. [[1;32m OK [0m] Started Create dynamic rule for /dev/root link. Starting udev Kernel Device Manager... [[1;32m OK [0m] Started udev Kernel Device Manager. Starting LSB: Start LVM2... %G(K[[1;32m OK [0m] Started LSB: Start LVM2. [[1;32m OK [0m] Started Setup Virtual Console. Starting udev Coldplug all Devices... [[1;32m OK [0m] Started udev Coldplug all Devices. Starting Show Plymouth Boot Screen... [[1;32m OK [0m] Found device WDC_WD2002FAEX-007BA0. Starting Cryptography Setup for cr_sdb1... [[1;32m OK [0m] Reached target Sound Card. [[1;32m OK [0m] Found device WDC_WD20EARS-00MVWB0. Starting Cryptography Setup for cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2... [[1;32m OK [0m] Found device /dev/system/swap. Activating swap /dev/system/swap... [[1;32m OK [0m] Found device WDC_WD20EARS-00MVWB0. Starting File System Check on /dev/disk/by-id/ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part1... [[1;32m OK [0m] Activated swap /dev/system/swap. [[1;32m OK [0m] Reached target Swap. [[1;32m OK [0m] Found device /dev/system/home. Starting File System Check on /dev/system/home... systemd-fsck[688]: Reiserfs super block in block 16 on 0xfd01 of format 3.6 with standard journal systemd-fsck[688]: Blocks (total/free): 434335744/320681443 by 4096 bytes systemd-fsck[688]: Filesystem is clean [[1;32m OK [0m] Started File System Check on /dev/system/home. Starting File System Check on /dev/system/home... systemd-fsck[776]: Reiserfs super block in block 16 on 0xfd01 of format 3.6 with standard journal systemd-fsck[776]: Blocks (total/free): 434335744/320681443 by 4096 bytes systemd-fsck[776]: Filesystem is clean [[1;32m OK [0m] Started File System Check on /dev/system/home. systemd-fsck[683]: /dev/sda1: clean, 356/40000 files, 118258/159744 blocks [[1;32m OK [0m] Started File System Check on /dev/disk/by-id/ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part1. [[1;32m OK [0m] Started Show Plymouth Boot Screen. Starting Forward Password Requests to Plymouth... [[1;32m OK [0m] Started Forward Password Requests to Plymouth. [[1;32m OK [0m] Found device /dev/mapper/cr_sdb1. [[1;32m OK [0m] Started Cryptography Setup for cr_sdb1. [[1;31mFAILED[0m] Failed to start Cryptography Setup for cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2. See 'systemctl status systemd-cryptsetup@cr_ata\x2dWDC_WD20EARS\x2d00MVWB0_WD\x2dWMAZA2401793\x2dpart2.service' for details. [[1;33mDEPEND[0m] Dependency failed for Encrypted Volumes. Starting Restart storage after cryptsetup... Stopping LSB: Start LVM2... [[1;32m OK [0m] Stopped LSB: Start LVM2. Starting LSB: Start LVM2... [[1;32m OK [0m] Started LSB: Start LVM2. [[1;32m OK [0m] Started Restart storage after cryptsetup. [[1;32m OK [0m] Started Remount Root and Kernel File Systems. Starting Load Random Seed... [[1;32m OK [0m] Reached target Local File Systems (Pre). Mounting /home... Mounting /boot... Mounting Lock Directory... Mounting /sys/kernel/debug... Mounting Runtime Directory... [[1;32m OK [0m] Started Load Random Seed. [[1;32m OK [0m] Mounted Lock Directory. [[1;32m OK [0m] Mounted /sys/kernel/debug. [[1;32m OK [0m] Mounted Runtime Directory. [[1;32m OK [0m] Mounted /boot. [[1;32m OK [0m] Mounted /home. Mounting /home/daniel/disk2... [[1;32m OK [0m] Mounted /home/daniel/disk2. [[1;32m OK [0m] Reached target Local File Systems. Starting Recreate Volatile Files and Directories... Starting Trigger Flushing of Journal to Persistent Storage... Starting Tell Plymouth To Write Out Runtime Data... [[1;32m OK [0m] Started Recreate Volatile Files and Directories. [[1;32m OK [0m] Started Trigger Flushing of Journal to Persistent Storage. [[1;32m OK [0m] Started Tell Plymouth To Write Out Runtime Data. [[1;32m OK [0m] Reached target System Initialization.
So it seems there was a problem with encrypting, but somehow the problem must have been solved, no? Otherwise I couldn’t access the disks, wouldn't I? This is my fstab:
/dev/system/swap swap swap defaults 0 0 /dev/system/root / reiserfs acl,user_xattr 1 1 /dev/disk/by-id/ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part1 /boot ext4 acl,user_xattr 1 2 /dev/system/home /home reiserfs acl,user_xattr 1 2 /dev/mapper/cr_sdb1 /home/daniel/disk2 reiserfs acl,user_xattr 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs noauto 0 0 debugfs /sys/kernel/debug debugfs noauto 0 0 usbfs /proc/bus/usb usbfs noauto 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0
It is as setup by Yast at installation.The only thing I added manually is the line /dev/mapper/cr_sdb1, a manually encrypted disk outside the LVM (I was forced to use LVM because there seems no other way anymore to have a completely encrypted system). fstab seems to be unchanged since then. However, I wonder why swap, root, and home are listed the way they are and not with something line /dev/mapper..., because they are within the encrypted LVM (which I encrypted during installation). My partitions look like this: /dev/sda WDC-WD20EARS-00M /dev/sda1 /boot 156 MB, Ext4 /dev/sda2 Linux LVM, encrypted (during fresh install of system) /dev/sdb WDC-WD2002FAEX-0 /dev/sdb1 /home/daniel/disk2, reiserfs, encrypted (manually) The encrypted LVM includes /dev/system LVM2 system /dev/system/home reiserfs /home /dev/system/root reiserfs / /dev/system/swap Swap swap ********************* The described problem appears since an update accident a few days ago when the kernel changed. There was not enough free space on /boot (because I set it up to keep the old versions), so update terminated with an error message. After reboot there was a "kernel panic" and there was no way (known to me) to get the system running, also the older versions ended up with kernel panic causing "daniel-panic"... So I booted with the kde live disk, chroot-ed to the existing system, started yast in character-mode, deleted the oldest "kernel-things" on /boot, started yast in character mode, searched for everything "kernel" and selected to update these parts. After that I booted the system. With the first boot I had to enter the password for the disks 4 times. But since the second boot it is enough to enter it once and the system starts. However, during the boot process I see a "failed" message concerning Cryptography (I guess the one from the boot.log above, it goes away very fast...). It seems to me that booting takes a bit longer than before, and after logging-in as user it takes quite a while until the desktop is ready. But this is a time I feel, it is not measured... ********************** So, I wonder how I can repair my system so it is happy with the encrypted disks as it was before. I have no idea where to start... Thanks for hints! Daniel -- Daniel Bauer photographer Basel Barcelona professional photography: http://www.daniel-bauer.com google+: https://plus.google.com/109534388657020287386 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 10 Jun 2013 11:05:04 +0200 Daniel Bauer <linux@daniel-bauer.com> wrote:
I'm on a OS 12.3 with the latest updates applied. Since an "update .accident" (see description below between asterisk lines) there seems to be kind of a problem with mounting the encrypted disks at boot, the disk that contains the encrypted LVM with /, /home and swap.
Here is what is going on: Your LVM is being decrypted and opened in the "initrd". Opening assigns a virtual device, probably "/dev/mapper/cr_something". You can use "ls /dev/mapper" to see what that actually is. What has happened, is that the virtual device name being used in the "initrd" is different from that given in "/etc/crypttab". Because of this, "systemd" does not recognize that the crypto device has already been setup. How did this happen? When you did those "repairs", you manually setup the crypto for the device, using "cryptsetup". And you used a shorter name, perhaps "cr_lvm" or "cr_sda2" because it is easier to type. That shorter name got into the "initrd" that you built. Simple fix: work out what virtual device name is being used, and change "/etc/crypttab" to use that name. Change only the virtual name (currently "cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2). Do not change the device name (the part that begins "/dev") on that line. Reboot to check that it is fixed. Harder fix: Redo your earlier "repairs", but use the full device name from "/etc/crypttab" in your "cryptsetup" command. This is hard to do, because you cannot access "crypttab" until you have done the cryptosetup. The simple fix is good enough. There's no need to do it the hard way. The virtual device name has no intrinsic meaning, so anything works. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Thank you very much, Neil! Your profound explanation not only helped me to solve the problem within a minute, but also to understand what was going on. Thanks a lot for taking your time! Daniel Am 11.06.2013 15:42, schrieb Neil Rickert:
On Mon, 10 Jun 2013 11:05:04 +0200 Daniel Bauer <linux@daniel-bauer.com> wrote:
I'm on a OS 12.3 with the latest updates applied. Since an "update .accident" (see description below between asterisk lines) there seems to be kind of a problem with mounting the encrypted disks at boot, the disk that contains the encrypted LVM with /, /home and swap.
Here is what is going on:
Your LVM is being decrypted and opened in the "initrd". Opening assigns a virtual device, probably "/dev/mapper/cr_something". You can use "ls /dev/mapper" to see what that actually is.
What has happened, is that the virtual device name being used in the "initrd" is different from that given in "/etc/crypttab". Because of this, "systemd" does not recognize that the crypto device has already been setup.
How did this happen? When you did those "repairs", you manually setup the crypto for the device, using "cryptsetup". And you used a shorter name, perhaps "cr_lvm" or "cr_sda2" because it is easier to type. That shorter name got into the "initrd" that you built.
Simple fix: work out what virtual device name is being used, and change "/etc/crypttab" to use that name. Change only the virtual name (currently "cr_ata-WDC_WD20EARS-00MVWB0_WD-WMAZA2401793-part2). Do not change the device name (the part that begins "/dev") on that line. Reboot to check that it is fixed.
Harder fix: Redo your earlier "repairs", but use the full device name from "/etc/crypttab" in your "cryptsetup" command. This is hard to do, because you cannot access "crypttab" until you have done the cryptosetup.
The simple fix is good enough. There's no need to do it the hard way. The virtual device name has no intrinsic meaning, so anything works.
-- Daniel Bauer photographer Basel Barcelona professional photography: http://www.daniel-bauer.com google+: https://plus.google.com/109534388657020287386 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Daniel Bauer
-
Neil Rickert