LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-13-2008, 10:34 AM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Rep: Reputation: 30
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 @ 2.6.24.5-smp) instead of normal ones so I'd like to avoid problems at next reboot.
 
Old 09-13-2008, 12:35 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Make sure you compile all the required functionality into your kernel (not modules).
Two things that are important at least, are
Code:
Multiple devices driver support (RAID and LVM) --->
 <*> Device mapper support
 <*> Crypt target support
Aka
Code:
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
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)

Eric
 
Old 09-14-2008, 07:59 AM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
Eric,

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 2.6.24.7-smp -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 ?
 
Old 09-14-2008, 09:44 AM   #4
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 406

Original Poster
Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
12.1 LUKS and LVM install on system with multiple SATA and IDE HDD Z038 Slackware - Installation 10 02-03-2010 05:05 PM
Slackware 12.1, LUKS, LVM on external HD. How? randomsel Slackware - Installation 7 06-26-2008 06:35 PM
Windows on LUKS LVM Post Slackware 12.1 Install -{Jester}- Slackware 4 05-23-2008 01:10 AM
luks cryptsetup and lvm question ruzzed Linux - Software 3 09-16-2007 07:21 PM
How to extend an existing partition without LVM james.reid Linux - Software 14 06-02-2006 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration