-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd-cryptsetup-generator: Not creating device 'swap' because it was not specified on the kernel command line. #4878
Comments
But what is your kernel command line? |
This happens if you specify a luks device explicitly on the kernel command line. Which looks like you are doing. Quoting the systemd-cryptsetup-generator(8) man page:
Closing, since this appears to be a misunderstanding. |
I specify a luks device explicitely on the command line because my whole rootfs is also encrypted: But my swap is in a completely different partition and I don't want (nor know how to) unlock it from the command line. It doesn't have a luks header because I don't want to get prompted for password a second time, so it is supposed to automatically generate a key from /dev/urandom (which probably doesn't even have enough entropy at such an early boot stage). So I really want to use crypttab for the swap, while still using the kernel command line for the rootfs. Isn't it possible? |
It sounds you want rd.luks.* options instead to restrict it to initrd only. |
Thanks, I didn't know of the difference but it worked. One more thing: isn't systemd supposed to automatically detect the swap partition and use it? I had to put /dev/mapper/swap in fstab. |
@darkbasic yeah, but we don't support automatic discovery for LUKS encrypted swap yet... |
Thanks, I like the final 'yet' :) |
@poettering, you wrote:
Can you guess when systemd might get this feature? |
Well, somebody needs to do the work. Our TODO list is very much full, so might take a while. If you want it soon, prep a patch, or find somebody to do it for you, that's usually the best way to get something like this in quickest. |
I just ran into this on a minimal installation of fedora rawhide; spamming my experience here until I find time to search for duplicates and/or report this to fedora bugzilla bugtracker, as this is the first google result for "because it was not specified on the kernel command line" booted a q35 uefi vm under kvm with Fedora-Workstation-netinst-x86_64-Rawhide-20181207.n.0.iso because I wanted a custom partition alignment, I first manually setup partitioning and lvm volumes on the target disk outside the installer. in the disk setup section of the installer, I chose the previously created boot, root and swap LVs, checked the encryption checkbox for swap and root, setup mount points, setup swap LV as swap. installation finished, but after reboot the os does not prompt to enter luks password, showing the three dots clipping boot screen of fedora rawhide then eventually times out, dropping me to the init shell. further digging reveals that the fedora installer assigned in /boot/grub2/grubenv a totally different UUID for luks volumes than the UUID the volumes have been generated by the same installer in /etc/default/grub the quick solution was to edit /boot/grub2/grubenv and replace the two UUIDs with the UUIDs of the luks volumes indicated by /etc/default/grub. until I find time to file this in bugzilla, maybe this comment will help others. cheers |
Submission type
NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!
systemd version the issue has been seen with
NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!
Used distribution
In case of bug report: Expected behaviour you didn't see
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: