I'm having a problem with a slackware installation on encrypted LVM. i can't get it booting up normally.
Let me explain the problem.
My harddisk 8.5 GB
sda1 - primary 500MB Linux partition
sda2 - primary 500MB linux swap partition
sda3 - primary 7.5GB Linux LVM partition (type 8e)
I will use sda1 for boot, sda2 for swap, and sda3 as encrypted partition for my lv's. So i don't have to enter a password seperately for every partition i want to open at boot.
I create the encrypted device with:
# cryptsetup -s 256 -y luksFormat /dev/sda3
next i open it for use
# cryptsetup luksOpen /dev/sda3 cryptdsk
Next i'm going to create the LVM on the encrypted device
# pvcreate /dev/mapper/cryptdsk
// (here i create the physical volume on the encrypted mapped
// device /dev/mapper/cryptdsk , i can do this since it is still opened, see above)
# vgcreate myvg /dev/mapper/cryptdsk
// (here i create the volume groupe called "myvg")
# lvcreate -L 6G -n root myvg
# lvcreate -L 1G -n home myvg
// (here i create the LV's which will be used as "/" and "/home" when performing the slackware install)
// next create device nodes needed before activating the volumes:
# vgscan --mknodes
// activate the volumes:
# vgchange -ay
now, i don't reboot, i just type "setup" and go install slackware
step3: (the slackware installation)
I'm installing like this:
- "/boot" on "/dev/sda1" (this is my unencrypted first partition)
- "swap" on "/dev/sda2" (this has already been done in the previous step)
- "/" on "/dev/myvg/root"
- "/home" on "/dev/myvg/home"
i proceed normally till the lilo dialogue. I do the expert, and install to mbr. When the dialogue asks "which one would you like to boot", i entered "dev/myvg/root". i know. Now, lilo will fail to install, but it will have written the lilo.conf, so i can solve this later.
I proceed with the install. and after it ended i don't reboot yet. and i go to step 4
step 4: (the afterwork, creating initrd and fixing lilo)
So, this is were it goes wrong i think. i do the following.
i chroot into the fresh install and make the initrd
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# chroot /mnt
next i try to make the initrd with:
# mkinitrd -c -k 18.104.22.168-smp -m ext3 -f ext3 -r /dev/myvg/root -C /dev/sda3 -L (is this not correct?? i don't get any errormessages here)
in lilo.conf i say
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/myvg/root
label = linux
the bootline on top of the lilo.conf i changed to
boot = /dev/sda1
then i save, and do a lilo in the console. i get errormessages(even a fatal one, so it probably did not install with my new config).
still i get a kernel panic when booting. it says VFS: Unable to mount root fs on unknown-block(8,3)
This is quite a long story, but i hope someone has an idea how to solve this.
My question is: Is the mkinitrd command okay? did i made a mistake with lilo.conf
Since the rest seems pretty okay to me. the install performed okay on the encrypted LVM partitions.
Finally i would like to say that i tried to find all info, but you know, everytime i screw up, i have to start from scratch again to try the next option. So, it's quite time consuming
That's why i decided to ask here. Thanks in advance for any responses.