Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 07-04-2013, 04:23 PM   #1
Registered: Jul 2008
Location: Tacoma, WA
Distribution: Slackware64
Posts: 95

Rep: Reputation: 19
Updating the kernel on an encrypted lvm install

Hi there,

I am running Slackware64 14 with encrypted lvm. The kernel I am using is 3.2.29 and it looks like the kernel was updated to 3.2.45. Since I want my system to stay somewhat up to date on patches I figured I should upgrade the kernel, but I am unsure of the process to make sure my encrypted lvm will boot afterwards. Could someone point me to a guide for such a scenario?
Old 07-04-2013, 04:46 PM   #2
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,691

Rep: Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017Reputation: 4017
Install the new kernel-generic plus the kernel-modules packages (and kernel-headers and kernel-sources if you ever want to compile something that needs kernel sources/headers) using installpkg (do not use upgradepkg - you will want to keep your working configuration until you are sure that you can boot the new kernel).

After installing the kernel and its modules, run
which will output a working "mkinitrd" commandline for your current kernel. Use that commandline but change the kernel version to the value for the new kernel (change the '-k 3.2.29' parameter to '-k 3.2.45'). This will create the initrd file you need for your LUKS encrypted LVM (but it will by default overwrite an existing /boot/initrd.gz file which is not want you want probably).

Then you add a new definition to /etc/lilo.conf for the new kernel & initrd and run lilo to make it stick.

An example of how this is most easily done for the 3.2.45 kernel of Slackware64 without overwriting any existing initrd file (run the three commands as root... and yes, that "$( xxxxxx)" is a real full commandline, which will execute the mkinitrd command immediately instead of merely showing it as an on-screen example):
$( /usr/share/mkinitrd/ -k 3.2.45 -a "-o /boot/initrd_3.2.45.gz" )
/usr/share/mkinitrd/ -k 3.2.45 -a "-o /boot/initrd_3.2.45.gz" -l /boot/vmlinuz-generic-3.2.45  >> /etc/lilo.conf
This will (1) create the initrd, (2) update /etc/lilo with a definition for the new kernel, labeling it "3.2.45" and (3) will run lilo so that you can test a reboot. The working kernel will still boot by default (so you are guaranteed to keep a working system) and there will be a new, non-default, label in the LILO boot screen, called "3.2.45". Pick that label and check that you can indeed boot into your new kernel. Then, change /etc/lilo.conf to make the new kernel boot by default and run lilo again.


Last edited by Alien Bob; 07-04-2013 at 04:48 PM.
3 members found this post helpful.
Old 07-05-2013, 08:25 PM   #3
Registered: Jul 2008
Location: Tacoma, WA
Distribution: Slackware64
Posts: 95

Original Poster
Rep: Reputation: 19
Thank you for the very detailed response!


encrypted, kernel, lvm

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Install Debian with encrypted home partition (without lvm) lazylogic Debian 1 02-19-2013 03:40 PM
Resizable encrypted LVM requiring just one password on boot (encrypted volume group)? Nyyr Linux - Software 9 01-24-2013 06:52 AM
[SOLVED] new encrypted lvm install - can not open /etc/lilo.conf BoydRice Slackware 1 07-27-2010 01:56 AM
[SOLVED] Kernel update on LUKS and LVM encrypted Slackware, mount fails KMBS Slackware 15 02-08-2010 02:23 PM
slack12 install on encrypted LVM failed deNiro Slackware 23 02-15-2008 11:09 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:27 AM.

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