![]() |
Already broke my Slackware install :-/
Just installed Slackware on an encrypted drive by combining LUKS and LVM as described in README_CRYPT on the install media. Made an initrd that worked. Everything went well until I upgraded Slackware packages (including the kernel) with slackpkg and rebooted (well, hibernated). Slackpkg ran lilo automatically. Now the system won’t boot. It hangs after I enter my encryption password. I suspect the problem is that the initrd made with the install kernel does not match the currently installed kernel. Didn’t catch which exact version of the kernel is now installed.
I tried to boot from the USB install media, chroot, and run mkinitrd again hopefully for the new kernel. That didn’t work because, as it says, modules are not installed for 4.4.14. I have never chrooted from install media before so I could have done something wrong there too. Please help me fix this problem. I can’t figure out how to reinstall the original kernel or make a new initrd. Thanks |
Quote:
|
Quote:
I'm not familiar with LUKS but I assume you can unlock the disk if you've already successfully chrooted into the system, so I'll leave the decryption part to you. Once the disk is decrypted, use vgchange -ay to bring logical volumes online. Mount your volumes: Code:
mount /dev/mapper/vgsystem-lvroot /mnt Code:
mount -o bind /dev /mnt/dev Code:
chroot /mnt Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.217 > /etc/mkinitrd.conf Make sure your initrd line is correct in lilo.conf Run lilo . |
look at the /boot/README.initrd
|
Alright, here's an overview of what I did using your post as well as the instructions in the slackdocs article Chroot From Installation Media and README_CRYPT. I'm on slackware64 14.2.
Didn't seem to work as now the boot process is stopped by "No kernel modules found for 4.4.217." I'm prompted to enter the decryption key/password but then the system hangs. In my setup /boot is an unencrypted /dev/sda5 and the encrypted volume encompassing root, /home, and swap is /dev/sda6. Also @hitest I apologize but when I wrote slackpkg ran lilo automatically, I meant slackpkg presented it as an option [Y/n] and I ran it. I did not create a new initrd at that time. Code:
Boot from slackware USB. |
post your /etc/mkinitrd.conf
|
Yes, post your /etc/mkinitrd.conf.
What does the following report, inside the chroot: Code:
find /var/log/{packages,removed_packages}/ -name "kernel*" And ls -la /boot ? |
mkinitrd.conf:
Code:
mkinitrd -c -k 4.4.217 -f ext4 -r /dev/cryptvg/root -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -C /dev/sda6 -L -u -o /boot/initrd.gz -h /dev/cryptvg/swap Code:
/var/log/packages/kernel-huge-4.4.217-x86_64-1 Really sorry but this command put out too much to type - is there another way I could upload this? Can't exactly copy and paste from install media to a web browser. |
My original post
Quote:
|
Maybe I'm barking at the moon but if I see an error message "No kernel modules found for 4.4.217", the 1st thing I'm going to do is be certain there is a directory and file structure at "/lib/modules/4.4.217". If it doesn't exist get back into "/usr/src/linux" (assuming it links to /usr/src/linux-4.4.127) and run "make modules_install". Then I'm going to check /boot to see if my old working kernel is there (actually I'd not delete it or it's entry in /etc/lilo.conf...backups are smart) and if it is then I'd redo it's lilo.conf entry and rerun lilo. If vmlinuz-4.x-whatever-the-old-kernel-image-was isn't there but the source tree in /usr/src/linux-whatever is still there I'd redo the steps for copying config, System.map, and bzImage to vmlinuz-whatever in /boot and again fix lilo.
So far I haven't seen any evidence initrd is failing. |
Chroot back into your system
Change this part of the /etc/mkinitrd.conf line Code:
-k 4.4.217 Code:
-k "$(readlink /boot/vmlinuz | cut -d- -f3-)" Code:
mkinitrd -F exit out of chroot and reboot. |
It worked!!!
Here is a summary of the required steps: Code:
Boot from slackware USB. Code:
readlink /boot/vmlinuz | cut -d- -f3- Code:
4.4.217 |
Whenever there is a kernel update, all you have to remember to run is
Code:
mkinitrd -F |
Quote:
I think the proper way to populate mkinitrd.conf is "/usr/share/mkinitrd/mkinitrd_command_generator.sh --conf > /etc/mkinitrd.conf". |
Either way will populate the mkinitrd.conf and work, --conf makes the file easier to read IMHO. However, with a kernel update a "modules doesn't exist" error will occur because the kernel version in the mkinitrd.conf will still point to the old kernel version.
|
All times are GMT -5. The time now is 03:10 PM. |