SlackwareThis 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.
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.
Help! I installed updates on current today. Since the kernel was updated, it asked me if I wanted to run lilo, to which I replied 'y'. I rebooted after that, but it still lists the old 4.4.12 kernels only, which are no longer installed, so they fail to boot. I had created a generic 4.4.12 kernel and modified lilo.conf, but I guess I made the mistake of thinking slackpkg would replace that file. My fault there for not checking.
So, my question is, is there a way I can boot from the new 4.4.13 huge kernel, even though it's not listed? Otherwise, how to recover?
Last edited by montagdude; 06-09-2016 at 11:16 AM.
root@kahuna:~# ls -al /boot/config
lrwxrwxrwx 1 root root 15 Jan 15 12:54 /boot/config -> config-huge-4.4
Like that.
I think removing the symbolic link and replacing it with one pointing to the huge kernel is all your going to have to do.
However I haven't had to tinker with the lilo boot system on Slackware in a long time, normally when I do that it's on a RHEL node that uses grub
Like that.
I think removing the symbolic link and replacing it with one pointing to the huge kernel is all your going to have to do.
However.... I'm often wrong....
I was hoping there might be a way to boot a non-listed kernel from the lilo command prompt. Otherwise I will have to download a live Linux image (from some distro or another) on my wife's Mac and do something like you said. Thanks for the advice, though.
I put that disclaimer in there because I thought the "I'm often wrong" thing was a little too cryptic. Proceed with caution (that's how I'd proceed) and make sure you're in a position to do a full recovery if things go south (back up early, back up often).
No worries, I have all my files backed up and /home on a separate partition already, so reinstalling wouldn't be a huge issue. The main inconvenience would be reinstalling all my SBo packages.
So I burned Eric's slackware64-live, booted, and mounted my files. However, I don't really see what the problem is. /boot/vmlinuz points to /boot/vmlinuz-huge-4.4.13 which was just installed, and one of my lilo entries is already for this kernel. It doesn't boot, though -- it gets through the BIOS check and then restarts. I was afraid that this might be the case...
Any ideas why this is happening? Otherwise, it looks I'm going to have to reinstall.
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda
#compact # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 10
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
## Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 4.4.12 -f ext4 -r /dev/sda6 -m jbd2:mbcache:ext4 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-4.4.12
initrd = /boot/initrd.gz
root = /dev/sda6
label = 4.4.12-generic
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda6
label = 4.4.12-huge
read-only
# Linux bootable partition config ends
Attempting to boot the first kernel in lilo.conf causes it to hang; attempting to boot the second one causes it to restart after "BIOS data check successful."
Last edited by montagdude; 06-08-2016 at 10:36 PM.
Attempting to boot the first kernel in lilo.conf causes it to hang; attempting to boot the second one causes it to restart after "BIOS data check successful."
In the 1st lilo entry, root point to /boot/vmlinuz-generic-4.4.12 instead of /boot/vmlinuz-generic-4.4.13. I guess you have installed the new kernel, but you forgot to update lilo.conf and to run the command lilo.
To fix that, you can proceed as below :
1. boot with the slackware install cd/dvd/usb
2. mount your root partition :
Code:
$ mkdir /SYSMAIN.ROOT
$ mount /dev/sda6 /SYSMAIN.ROOT
3. chroot in your system :
Code:
$ mount --bind /proc /SYSMAIN.ROOT/proc
$ mount --bind /sys /SYSMAIN.ROOT/sys
$ mount --bind /dev /SYSMAIN.ROOT/dev
$ chroot /SYSMAIN.ROOT
4. generate the initrd for the kernel 4.4.13.
5. edit /etc/lilo.conf, then replace references to vmlinuz-generic-4.4.12 by vmlinuz-generic-4.4.13
6. update lilo by running the command :
Code:
$ lilo
7. exit from the chroot and reboot :
Code:
$ exit
$ reboot
--
SeB
Last edited by phenixia2003; 06-09-2016 at 03:23 AM.
Note the notes about single-vs-multiple partitions and proceed accordingly
And here is a short-n-sweet version that should work ( again assuming your single /dev/sda6 partition contains at least /bin/ and /sbin/ and /usr/ ) ...
Thanks for your help, guys. I got it working again. I knew about chroot buy hasn't ever used it before -- that is an awesome tool!
What I still don't understand is why the second kernel in lilo.conf didn't work before, when it was pointing to the huge 4.4.13 image, especially since I did tell slackpkg to run lilo after the update. Any insight there?
Thanks for your help, guys. I got it working again. I knew about chroot buy hasn't ever used it before -- that is an awesome tool!
What I still don't understand is why the second kernel in lilo.conf didn't work before, when it was pointing to the huge 4.4.13 image, especially since I did tell slackpkg to run lilo after the update. Any insight there?
montagdude --
Looking back at your file listing of /boot/ your pkg manager tool did an upgradepkg instead of an installpkg on the kernel.
Note that there are no old 4.4.12 files in /boot/ at all ...
UPGRADING the Kernel will always lead to trouble if you use Generic + an initrd file unless you mkinitrd ; edit lilo.conf ; run lilo every time there is a new Kernel.
UPGRADING the Kernel MAY lead to trouble if there happen to be regressions in the Kernel where it won't work on your Hardware for some reason.
OTOH if you always INSTALL your Kernels ( never UPGRADE ), you'll always have one-or-more fall-back Kernels to boot if things go south.
Did running lilo after slackpkg succeed? Because, it might've errorred out because /boot/vmlinuz-generic-4.4.12 no longer existed. If it did that, then it wouldn't have updated the MBR with the correct location of the new vmlinuz-huge-4.4.13 that the symlink of vmlinuz pointed to. The MBR would've still had the location of the old kernel, which had been removed when the kernel was updated.
For reasons like this, I always manually manage my kernels and lilo.conf. While it may normally be easier to let slackpkg do its thing with kernel updates, when you run into problems, it makes the extra effort of doing it manually worth it. I always installpkg my new kernels, which keep the old ones intact. Then I will just add a new entry in my lilo.conf for the new kernel, while keeping my old entry in place. Then, if my new kernel fails to boot, for whatever reason, then I can fall back on my old one without requiring a rescue disc. Once I've verified the new one boots properly, I can remove the old kernel, remove the entries in my lilo.conf, and then run lilo to save those entries.
I see. Now I have a better understanding of how it works. Lilo didn't tell me about any errors (assuming slackpkg actually did run it when I selected 'y'), but that must be because it doesn't run it with the verbose option and/or redirects the error message (I'm not sure because I haven't looked). In any case, I will definitely be more careful about manually updating my configuration and running lilo in the future, and I'll plan to also keep working kernels as backup until the new one is verified.
The good thing about making mistakes and messing stuff up is that you get a chance to learn something new, and I've definitely done that here. Thanks again, everyone.
Last edited by montagdude; 06-09-2016 at 02:23 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.