I created a fresh gentoo install. I am creating the initramfs because i made my root partition a encrypted luks partition. I did the usual and placed busybox on the initramfs so far. I have two questions:
1) doesn't there need to be a /dev/mapper in the initramfs so when the root partition is unlocked it has a /dev/mapper/file name?
2) when the exec_switch is preformed how is the /dev/mapper/file name going to transfer over?
3) how do i get the initramfs to take the key from a usb key device given from the grub command line?
Still having trouble though getting the initramfs.
1) I built the initramfs into the kernel...using /usr/src/initramfs. I did not choose any compression for it.
2) I created:
mkdir -p /usr/src/initramfs/mnt/root
2)I used the cryptsetup binary from the live dvd for the initramfs. For the busybox, I compiled it statically on my chroot system and copied over that binary to the initramfs.
3) I copied my luks key into /usr/src/initramfs/key
4) my init script is:
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
cryptsetup -d /key luksOpen /dev/sda5 root
mount -o ro /dev/mapper/root /mnt/root || rescue_shell
exec switch_root /mnt/root /sbin/init
echo "Something went wrong. Dropping you to a shell."
busybox --install -s
but upon boot up I get:
I spent so many hours...if you could help please i'd really appreciate it.
Note: I tried this kernel on a non encrypted partition on the same laptop(just copied the partition) and it booted successfully(with no initramfs).
Pax and Grsecurity are turned off.