-   Slackware (
-   -   New kernel and existing Luks/Lvm ? (

brodo 09-13-2008 10:34 AM

New kernel and existing Luks/Lvm ?
Are there any special precautions while upgrading to current kernel and the rest of current Slackware packages ?
I am using Luks/Lvm encrypted partitions (installed @ instead of normal ones so I'd like to avoid problems at next reboot.

Alien Bob 09-13-2008 12:35 PM

Make sure you compile all the required functionality into your kernel (not modules).
Two things that are important at least, are

Multiple devices driver support (RAID and LVM) --->
 <*> Device mapper support
 <*> Crypt target support



Also compile all available cyphers into your kernel. Check the kernel config used for Slackware's kernel on what "CONFIG_CRYPTO_" options are going in.

Also, you will of course need to create a new initrd with the LUKS and LVM binaries (mkinitrd's "-C" and "-L" options)


brodo 09-14-2008 07:59 AM


Things went a little out of control...

While being inside my encrypted system I checked the kernel settings, then upgraded to current Slackware packages and then I issued:

# mkinitrd -c -k -m ext3 -f ext3 -r /dev/cryptvg/root -C /dev/sda2 -L

(the same command as I did earlier while building encrypted volumes)

after that I invoked lilo as always which went w/o errors but only with some warnings about /proc/partitions.

After reboot I got no password prompt, only this:

Reading all physical volumes. This may take a while...
No volume groups found
No volume groups found
No volume groups found
mount: mounting /dev/cryptvg/root on /mnt failed: No such file or dir..
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type 'exit' when things are done.

How can I fix this in this mini shell ?

brodo 09-14-2008 09:44 AM

Well, I managed the problem.

I simply forgot that last time it was the /dev/sda3 declared as the main partition, not the sda2.
So during mkinitrd-ing, the sda3 should be placed instead of sda2.
I corrected this problem now by using "cryptsetup luksOpen" entry option which gave me emergency pass into sda3 partition.
Further I issued:

vgscan --mknodes
vgchange -ay
mkswap /dev/cryptvg/swap

than I mounted appropiate partition as /root and chrooted into it.
Next I mounted /dev/sda1 as /boot and issued proper mkinitrd command.
After running lilo and reboot, all went fine.

Uffff .... an unexpected sunday burden went away :)

All times are GMT -5. The time now is 12:33 PM.