FS#12389 - [mkinitcpio] filesystems passes invalid $FSTYPE to kinit
Attached to Project:
Arch Linux
Opened by kludge (kludge) - Tuesday, 09 December 2008, 01:50 GMT
Last edited by Eric Belanger (Snowman) - Wednesday, 24 June 2009, 02:41 GMT
Opened by kludge (kludge) - Tuesday, 09 December 2008, 01:50 GMT
Last edited by Eric Belanger (Snowman) - Wednesday, 24 June 2009, 02:41 GMT
|
Details
Description:
/bin/fstype in the initcpio returns filesystems that do not correspond to kernel filesystem modules. /sbin/modprobe in line 54 of /lib/initcpio hooks/filesystems gives and error, but it's tossed to /dev/null instead of being handled. this produces a kernel panic after the hand-off to kinit. see http://bbs.archlinux.org/viewtopic.php?id=55842 for detailed diagnosis. i don't see a use-case where this isn't caused by user error (not setting $cryptdevice on the kernel command-line), but handling the error would be more helpful than allowing it to cause a kernel panic. perhaps something like: if /sbin/modprobe -q ${FSTYPE} >/dev/null 2>&1; then kinit_params="${kinit_params} rootfstype=${FSTYPE} else err "There is no kernel module for filesystem ${FSTYPE} on specified root device ${root}" echo "Dropping to a recovery shell... type 'exit' to reboot" echo "NOTE: klibc contains no 'ls' binary, use 'echo *' instead" echo "" echo "If your root device is a logical volume on and encrypted block device" echo "you *must* specify \"cryptdevice=/dev/encryptedBlockDevice:dm-crypt_mapping\"" echo "at the kernel command-line" PS1="ramfs$ " /bin/sh -i msg "Rebooting..." /bin/reboot fi Additional info: mkinitcpio 0.5.19-1 Steps to reproduce: http://bbs.archlinux.org/viewtopic.php?id=55842 (wee... edge cases are fun!!!) |
This task depends upon
Closed by Eric Belanger (Snowman)
Wednesday, 24 June 2009, 02:41 GMT
Reason for closing: Not a bug
Additional comments about closing: Not a bug, was user error. Please reopen if necessary.
Wednesday, 24 June 2009, 02:41 GMT
Reason for closing: Not a bug
Additional comments about closing: Not a bug, was user error. Please reopen if necessary.
The problem that we had the possibility to specify root=/dev/sdXY where sdXY was a LUKS container and it would automatically decrypt it and point root to /dev/mapper/root. This is deprecated now and was not very flexible, as an lvm on top of encryption was impossible this way. However, this option is still kept for backwards-compatibility.
Using root=/dev/sdXY where sdXY is a LUKS container that contains a LVM PV will fail hard, as it tries to mount the container, not the logical volume. I guess we can close this as "not a bug", agreed? I will add a message to the encrypt hook clarifying the situation about the deprecation of root= decryption.