Hide Forgot
Description of problem: Problem 1: Init/boot process hangs for several minutes if encrypted device is defined in /etc/crypttab but unavailable (e.g. USB storage). Problem 2: Encrypted 'swap' not automatically added during init. Version-Release number of selected component (if applicable): systemd-37-2.fc16 How reproducible: Every time. Steps to Reproduce: 1. Create encrypted filesystem on removable USB media 2. Create encrypted swap partition and update /etc/fstab accordingly 3. Disconnect removable encrypted (USB) media 4. Reboot Actual results: - Watch init hang during "Starting Cryptography Setup for ..." removable - After system boots, "swapon -s" command lists no swap device Expected results: - Init process should quickly detect missing removable encrypted USB device and move on. - Swap partition should be enabled Additional info:
Created attachment 530810 [details] Config and log files Attaching config and log files.
Aside from the bug. Do _not_ use "sd*" kernel names in crypttab and fstab!!! Always use one of the symbolic links found in /dev/disk/
Normally swap is only necessary on memory constrained systems. Due to that we need to wait until the swap device shows up before proceeding the boot, since we need to be sure that swap space is set up before we start the full system so that enough virtual memory is around. If we'd just ignore swap not being around we might break systems which actually really need swap. Add "nofail" to the options field in fstab to tell systemd to activate your swap partition only if it is around. This analogous to "nofail" for file systems.
Why did you close this? Swap is only part of the problem. This setup works perfectly on F15 and only fails on F16. I'm not suggesting that swap should be ignored, only that it behaves as expected - as per F15. I simply ask that your review the reported symptoms more closely before closing as NOTABUG. I'll try your swap recommendation. However, the hang on boot has nothing to do with swap as far as I can tell. Rather, boot hangs only when my encrypted USB device is unavailable (i.e. unplugged).
'nofail' works for swap. That solves one of the reported problems.
> Init/boot process hangs for several minutes if encrypted device is defined > in /etc/crypttab but unavailable (e.g. USB storage). Is it in fact 90 seconds? That is the usual timeout when waiting for a device to appear. > Encrypted 'swap' not automatically added during init. It can be due to bug 711394 and/or bug 711150.
> Is it in fact 90 seconds? That is the usual timeout when waiting for a device to appear. Yup. 90 seconds is correct. > Encrypted 'swap' not automatically added during init. 'nofail' option seems to work around this issue.
Is this still an issue or can this bug be closed?
Encrypted swap issue resolved with the 'nofail' boot option. Encrypted USB storage still broken.
In F17 encrypted swap should get the right dependencies. Closing. If you can reproduce the issue on F17/F18 please reopen!