Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-13-2013, 01:02 PM
|
#1
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Rep:
|
Upgrading 14.0 to 14.1 with encrypted disks (LUKS+LVM)
I have the LUKS+LVM setup as described in README_CRYPT.TXT.
I upgraded 14.0 to 14.1 following Pat's UPGRADE.TXT
I did build the initrd and ran lilo after that. However something must have gone wrong because when it boots it goes into a kernel panic. (Good thing I did this on the trial laptop...)
Is there any special instruction on how to upgrade when you have this setup? (ie LVM volume with /root and swap in encrypted /dev/sda2, /boot on unencrypted /dev/sda1)
I was able to manually enter the system by booting the installation disk then mounting the partition, VGs and the mapped drives. I chrooted into it and tried rebuilding initrd, however that did not work (I forgot the error message, this was done at work), even though I had the unencrypted boot partition mounted in /boot.
Anyway, this laptop is test so I am not too worried about recovering it as I can install the system from scratch there. But I don't want to touch the production machine before I know the upgrade will work!
|
|
|
11-13-2013, 04:05 PM
|
#3
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Original Poster
Rep:
|
Oh, I see. I am indeed using old style cryptroot stuff. I will try to use "-r lukssda2" with mkinitrd tomorrow. Will post here what I find.
|
|
|
11-13-2013, 04:49 PM
|
#4
|
LQ Veteran
Registered: May 2008
Posts: 7,111
|
Actually, thinking about it, if you're encrypting the LVM PV rather than the LVM LV then you shouldn't be hitting this issue. It's a problem that affects people who have an encrypted root partition, not an encrypted LVM PV, which sounds like what you have.
It might help if you give us a little more info about what you have in lilo.conf, and what mkinitrd command you used.
Last edited by GazL; 11-13-2013 at 05:00 PM.
|
|
|
11-14-2013, 10:14 AM
|
#5
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Original Poster
Rep:
|
I can no longer remember the details of the initial mkinird command I used and it is not in .bash_history.
So rather than diagnosing what went wrong, I am just trying to fix this system. Here is what I am doing.
I boot off the slackware installation and then mount the drives under /mnt :
Code:
cryptsetup luksOpen /dev/sda2 cryptvg
vgscan --mknodes
vgchange -ay
mount /dev/mapper/cryptvg-root /mnt
mount /dev/sda1 /mnt/boot
chroot /mnt
Now I make the initrd:
Code:
mkinitrd -c -k 3.10.17 -f ext4 -r /dev/cryptvg/root -m ext4:ehci_hcd:ehci_pci:uhci_hcd:hid_generic:usbhid -u -l en-gb -L -o /boot/initrd.gz
at this point I get:
Code:
cat: /proc/partitions: No such file or directory
OK: /lib/modules/3.10.17/kernel/fs/mbcache.ko added.
OK: /lib/modules/3.10.17/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/3.10.17/kernel/fs/ext4/ext4.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/usb/host/ehci-pci.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/usb/host/uhci-pci.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/hid/hid-generic.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/hid/hid.ko added.
OK: /lib/modules/3.10.17/kernel/drivers/hid/usbhid/usbhid.ko added.
cat: /proc/partitions: No such file or directory
26585 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
lilo.conf contents:
Code:
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255
append=" vt.default_utf8=0"
prompt
timeout = 50
vga = normal
image = /boot/vmlinuz-generic-3-10-17
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
label = Slackware
read-only
I created /dev/cryptvg/root to fool lilo (since that volume is mounted outside this chroot), and then ran lilo.
exited chroot, removed volume, luksClose and rebooted.
No kernel panic this time, however it fails to mount /dev/cryptvg/root:
Code:
mount: mounting /dev/cryptvg/root on /mnt failed: No such file or directory
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
Note that I never got the prompt to enter the encryption password.
I guess I have to go back and use /dev/mapper/luksnnnn in lilo.conf for root ?
Any obvious flaws above?
thanks
Last edited by metageek; 11-14-2013 at 10:18 AM.
|
|
|
11-14-2013, 10:24 AM
|
#6
|
LQ Veteran
Registered: May 2008
Posts: 7,111
|
Ok, a few things:
You're missing -C /dev/sda2 on your mkinitrd.
I also believe that it should be -l uk rather than -l en-gb (but that one is from memory, so it's best to double check that.)
Also, before you chroot:
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
Last edited by GazL; 11-14-2013 at 10:26 AM.
|
|
1 members found this post helpful.
|
11-14-2013, 10:39 AM
|
#7
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Original Poster
Rep:
|
I said:
Quote:
Originally Posted by metageek
exited chroot, removed volume, luksClose and rebooted.
|
yes I did vgremove on the volumes, so I can't try to sort this out anymore  (should first learn LVM2 properly!)
But if you still have comments about this I would appreciate. I need to upgrade another laptop with the same configuration and I would like to do it successfully.
thanks
|
|
|
11-14-2013, 10:43 AM
|
#8
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Original Poster
Rep:
|
Oh well, it was indeed missing the "-C /dev/sda2" that was likely the problem this time.
Yes it is uk instead of en-gb ...
I cannot mark this solved, but I may go ahead and try the other laptop. I will need to do a full backup since I am not confident it will go without trouble.
thanks
|
|
|
11-15-2013, 03:36 AM
|
#9
|
Member
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 208
Original Poster
Rep:
|
I am now pretty sure that my initial problem was the same as described in this thread
Kernel 3.10.7 breaks dm-crypt/Luks root volume
So I am now marking this as solved.
Thanks for the help @GazL
|
|
|
All times are GMT -5. The time now is 03:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|