LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   LILO and Kernel 4.4.19 (https://www.linuxquestions.org/questions/slackware-14/lilo-and-kernel-4-4-19-a-4175587843/)

tb75252 08-24-2016 05:50 AM

LILO and Kernel 4.4.19
 
I am using Slackware 14.2 64-bit with the KDE environment.

I installed yesterday's patches, including kernel 4.4.19, using the slackpkg method.

Now when I boot up Slackware using LILO all I get is a screen that says "Loading Slackware....................."

Yesterday's patch notes for the kernel state:
Quote:

Be sure to upgrade your initrd after upgrading the kernel packages. If you use lilo to boot your machine, be sure lilo.conf points to the correct kernel and initrd and run lilo as root to update the bootloader.
How do I upgrade initrd and lilo.conf if I am not even able to access Slackware past the LILO prompt?

suppy 08-24-2016 05:53 AM

Use your install media or rescue boot disk that the installation offered to make for you.

gegechris99 08-24-2016 07:15 AM

Upgrade of initrd and lilo.conf must be done after upgrading the kernel and before you reboot the system.

Now, as said in previous post, you need to boot using the installation media or a rescue disk and chroot to your system to be able to perform the initrd and lilo.conf updates.

allend 08-24-2016 07:26 AM

This is a Slackware rite of passage. http://docs.slackware.com/howtos:sla...oot_from_media

tb75252 08-24-2016 09:15 PM

Using the install DVD I was able to access /etc/lilo.conf.

The relevant part of file lilo.conf looks like this:
Quote:

image = /boot/vmlinuz
root = /dev/sda1
label = Slackware64
read-only
I don't understand how I need to modify lilo.conf or run initrd in order to get LILO to boot Slackware 64. The above-mentioned commands were working when I initially installed Slackware 64, so why don't they now? True, the install DVD came with kernel 4.4.14 and the day before yesterday pkgtool installed kernel 4.4.19 but I don't see any reference to the kernel version in LILO, so I don't understand why Slackware 64 stopped booting up.

I'm very inexperienced at this and might need some detailed instructions...

STDOUBT 08-24-2016 09:22 PM

Quote:

I'm very inexperienced at this and might need some detailed instructions...
Any time a new kernel comes into either a stable release or current, one should refer to this fine article (and read it in detail):
http://docs.slackware.com/howtos:sla...:systemupgrade

Daedra 08-24-2016 09:50 PM

The links provided to you will give you all the detailed information you need. But here is a paint by numbers version that should get you up and running again. You mentioned you were able to boot the system using the install disc? Assuming you have no special install do this..

1) Boot form the install disc and log in as root

2) cd to the /boot directory

3) delete the vmlinuz symlink and create a new one pointing to the huge kernel like this "ln -s vmlinuz-huge-4.4.19 vmlinuz"

4) If you use the generic kernel with an initrd then you are going to have to make a new one because the old initrd is using modules from the old 4.4.14 kernel, that is mostly likely your problem, but we will get to that later. So go ahead and delete the old initrd (rm -r initrd.gz initrd-tree/)

5) now run "lilo -v", this should reinstall lilo with your new 4.4.19 huge kernel, you will not need to initrd since its the huge kernel.

6) reboot, if everything went well you should now be able to boot slackware with the 4.4.19 kernel. If successful. You can now go to /usr/share/mkinitrd and you use the script in there to create a new initrd to use with the generic 4.4.19 kernel.

tb75252 08-24-2016 10:37 PM

Quote:

Originally Posted by Daedra (Post 5595653)
The links provided to you will give you all the detailed information you need. But here is a paint by numbers version that should get you up and running again. You mentioned you were able to boot the system using the install disc? Assuming you have no special install do this..

1) Boot form the install disc and log in as root

2) cd to the /boot directory

3) delete the vmlinuz symlink and create a new one pointing to the huge kernel like this "ln -s vmlinuz-huge-4.4.19 vmlinuz"

4) If you use the generic kernel with an initrd then you are going to have to make a new one because the old initrd is using modules from the old 4.4.14 kernel, that is mostly likely your problem, but we will get to that later. So go ahead and delete the old initrd (rm -r initrd.gz initrd-tree/)

5) now run "lilo -v", this should reinstall lilo with your new 4.4.19 huge kernel, you will not need to initrd since its the huge kernel.

6) reboot, if everything went well you should now be able to boot slackware with the 4.4.19 kernel. If successful. You can now go to /usr/share/mkinitrd and you use the script in there to create a new initrd to use with the generic 4.4.19 kernel.

Thanks! I will try your suggestion tomorrow and see what happens. As for point 4), my /boot directory does not have file initrd.gz or directory initrd-tree/, so I guess the whole point 4) does not concern my situation.

Daedra 08-24-2016 11:02 PM

Yes, if you don't have that then all you need to do is create the symlink to your huge kernel and rerun lilo and you should be good to go.

bormant 08-25-2016 12:01 AM

@Daedra,
doinst.sh from the kernel package creates /boot/vmlinuz symlink to the kernel image from this package. So vmlinuz is linked to kernel from last installed kernel package.
Usually last installed kernel package is -huge- (by alphabet ;-) ) and vmlinuz is targeted to the huge kernel. So for default lilo.conf and huge kernel
Code:

image = /boot/vmlinuz
  root = ...
  label = ...
  read-only

simple
Code:

# lilo
is good enough on every kernel upgrade.

Since 14.2 kernel packages makes vmlinuz-huge{,-smp} and vmlinuz-generic{,-smp} symlinks in /boot in addition to vmlinuz. So my lilo.conf looks like
Code:

image = /boot/vmlinuz-generic
  initrd = /boot/initrd.gz
  root = /dev/sda2
  label = Linux
  read-only
image = /boot/vmlinuz-huge
  root = /dev/sda2
  label = Rescue
  read-only

and after 'slackpkg download kernel' and installpkg one additional step may be (note "-k new_version")
Code:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.19 | bash
# lilo

reboot and removepkg old kernel-{huge,generic,modules,headers} packages.
For 32-bit don't forget for -smp suffix in package's names and kernel's versions for default SMP kernels.

Daedra 08-25-2016 12:20 AM

I was going to mention that to tb75252. I realized after I posted that the symlinks are created by doinst. So you're right, I would think that simply running lilo again should correct his problem. I have always made the symlinks myself just for piece of mind even though I know I don't really need too.

tb75252 08-26-2016 01:49 PM

Quote:

Originally Posted by Daedra (Post 5595703)
I was going to mention that to tb75252. I realized after I posted that the symlinks are created by doinst. So you're right, I would think that simply running lilo again should correct his problem. I have always made the symlinks myself just for piece of mind even though I know I don't really need too.

Yes, running "lilo" fixed the problem! Thanks everybody for the help.


All times are GMT -5. The time now is 07:51 PM.