LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   update kernel but how configure elilo? (https://www.linuxquestions.org/questions/slackware-14/update-kernel-but-how-configure-elilo-4175609014/)

vencent 07-02-2017 10:38 AM

update kernel but how configure elilo?
 
As the title, I update the kernel(updatepkg). But at the end, the shell advise me to run lilo, but I use elilo. So how to change the default kernel to the updated kernel. Thx.

onebuck 07-02-2017 10:57 AM

Member response
 
Hi,

If you are using UEFI then reference;
Quote:

From http://docs.slackware.com/howtos:sla..._uefi_hardware

Tips on install when not using BIOS legacy mode

Once you have the Slackware installation environment up and running, remember to use a GUID Partition Table rather than MBR Partitioning and include a suitable system partition on the primary local hard disk. During the setup phase you should skip Lilo configuration, since you will not be using it. Instead configure your EFI-capable bootloader after setup has finished and before your first reboot. To do this mount the local system partition and setup your boot environment by adding an EFI-capable bootloader, kernel and any configuration files. If you used the above instructions for creating your own install media, simply copy over the files from your boot media to your local system partition, then adjust the local elilo.conf as follows (this assumes you placed Slackware's root partition on /dev/sda2):
Plus you can search through; start howtos slackware_admin installing_on_uefi_hardware

Hope this helps.
Have fun & enjoy!
:hattip:

hazel 07-02-2017 11:34 AM

You use elilo just the same way that you would use lilo on a BIOS system. Go to root, edit your /etc/elilo.conf file to point to the new kernel, then run /sbin/elilo.

laprjns 07-02-2017 11:45 AM

Quote:

Originally Posted by hazel (Post 5729795)
You use elilo just the same way that you would use lilo on a BIOS system. Go to root, edit your /etc/elilo.conf file to point to the new kernel, then run /sbin/elilo.

No, there is no /etc/elilo.conf file.

After upgrading to a new kernel, all you need to do is to run eliloconfig as root. This will copy the new kernel from /boot to /boot/efi/EFI/Slackware/vmlinuz

a4z 07-02-2017 12:03 PM

if everything is already setup and you just need to update the kernel

just copy your kernel to /boot/efi/EFI/Slackware

edit the elilo.conf in there and point it to the kernel

Code:

tree /boot/efi/EFI/Slackware/
/boot/efi/EFI/Slackware/
├── elilo.conf
├── elilo.efi
├── initrd-4.4.75.gz
├── vmlinuz-generic-4.4.75
└── vmlinuz-huge-4.4.75

less /boot/efi/EFI/Slackware/elilo.conf
Code:

chooser=simple
delay=2
timeout=2

image = vmlinuz-generic-4.4.75
  initrd = initrd-4.4.75.gz
  label = Slackware
  read-only
  append="root=/dev/sdb2 vga=normal ro"

#
image=vmlinuz-huge-4.4.75
        label=vmlinuz-huge
        read-only
        append="root=/dev/sdb2 vga=normal ro"

that's it.

if your elilo conf just uses generic names, without version number, than copy is enough.

Didier Spaier 07-02-2017 12:50 PM

Quote:

Originally Posted by a4z (Post 5729809)
if everything is already setup and you just need to update the kernel

just copy your kernel to /boot/efi/EFI/Slackware

edit the elilo.conf in there and point it to the kernel

Code:

tree /boot/efi/EFI/Slackware/
/boot/efi/EFI/Slackware/
├── elilo.conf
├── elilo.efi
├── initrd-4.4.75.gz
├── vmlinuz-generic-4.4.75
└── vmlinuz-huge-4.4.75

less /boot/efi/EFI/Slackware/elilo.conf
Code:

chooser=simple
delay=2
timeout=2

image = vmlinuz-generic-4.4.75
  initrd = initrd-4.4.75.gz
  label = Slackware
  read-only
  append="root=/dev/sdb2 vga=normal ro"

#
image=vmlinuz-huge-4.4.75
        label=vmlinuz-huge
        read-only
        append="root=/dev/sdb2 vga=normal ro"

that's it.

if your elilo conf just uses generic names, without version number, than copy is enough.

No need to do that manually. As laprjns said, just run eliloconfig as root, it will do it for you (and also include a boot entry for Slackware in the firmware's boot menu if asked politely). And that is written in the Slackware ChangeLog
Code:

Fri Jun 30 21:14:15 UTC 2017
...
patches/packages/linux-4.4.75/*: Upgraded.
      This kernel fixes security issues that include possible stack exhaustion,
      memory corruption, and arbitrary code execution.
      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.
      If you use elilo to boot your machine, you should run eliloconfig to copy the
      kernel and initrd to the EFI System Partition.


vencent 07-05-2017 08:13 AM

Thanks, a4z & Didier Spaier

slackb0t 07-05-2017 02:48 PM

edit: Wrong information. Thanks to bormant for catching it.

bormant 07-06-2017 12:07 AM

@slackb0t
One note on this elilo.conf:
this way initrd.gz should contain modules for both 4.9.35 AND 4.9.34 or else one of generic kernel with stock config can not boot without modules for mounting the root partition.

slackb0t 07-07-2017 01:34 PM

edit: Wrong information. Thanks to bormant for catching it.

colorpurple21859 07-11-2017 09:47 AM

Quote:

No need to do that manually. As laprjns said, just run eliloconfig as root
yes, but eliloconfig only copies the kernel that /boot/vmlinuz is linked to, usually the huge kernel, and overwrites the elilo.conf file.

bormant 07-11-2017 11:11 AM

Quote:

Originally Posted by slackb0t (Post 5732036)
I leave the generic .34 and it's modules and source installed. I generally keep 2 or 3 generations back just in case. I can boot any of the .3x kernels right now.

To boot two *generic* kernels fox ex. .34 and .35 with single initrd.gz as shown in you elilo.conf, it should contains drivers for root FS and all other needed kernel modules for both .34 and .35 kernels. But /usr/share/mkinitrd/mkinitrd_command_generator.sh doesn't do this (modules for more than one kernel) for you. And yes of course, you can do this manually, skipping -c (clear current initrd tree) switch for mkinitrd.

slackb0t 07-12-2017 09:56 PM

edit: Wrong information. Thanks to bormant for catching it.

bormant 07-13-2017 01:39 PM

@slackb0t
are you build your own kernels with root system fs driver '=y'?
If so they doesn't need initrd to boot.
If '/' is one of ext fs can we see output of
Code:

# zgrep EXT._FS= /proc/config.gz

slackb0t 07-13-2017 02:29 PM

@bormant

You are 100 percent correct. I edited my posts above so as not to confuse anyone. I appreciate you taking the time to respond b/c you may have saved me a lot of trouble in the future if something had gone wrong.


All times are GMT -5. The time now is 12:41 PM.