LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How to install elilo (https://www.linuxquestions.org/questions/slackware-installation-40/how-to-install-elilo-4175733243/)

Wed 01-27-2024 04:08 AM

How to install elilo
 
This is really a continuation of a previous problem. When booting into a freshly installed 15.0 system, basically nothing works.

It turns out that the updated kernel from a previous install gets booted to a system that works on the older installer, so a mismatch.

cfdisk tells me that I have a boot partition with an EFI-type system.

Code:

/dev/nvme0n1p1  150M EFI  /boot
/dev/nvme0n1p2  10G Linux swap
/dev/nvme0n1p3  100G Linux /
/dev/nvme0n1p4  821G Linux /home

The install went through ok but never showed me the boot partition to create, format or modify. It also gave me no other options but to install or not install lilo. I need elilo.

The boot process seem to find the boot partition just fine, and boots the wrong kernel.

I believe I need to overwrite the previous files on the boot partition with relevant information to the current install.

How can I provoke the install of elilo after the completed installation?

lilo says you can run liloconfig afterwards (I haven't tried). eliloconfig however doesn't do anything at all.

hazel 01-27-2024 04:54 AM

Mount your EFI system partition on /boot/efi and have a look at its contents. There should be a directory called EFI and, within it, one called Slackware containing the bootloader file elilo.efi, its configuration file elilo.conf, and various kernels and initrd images.

When you install a new kernel with pkgtools, it goes into the /boot directory and you are expected to create an initrd image for it. Hint: Go to /usr/share/mkinitrd and you will find a very useful script written by Patrick himself which will tell you what modules to specify when running mkinitrd. And of course you will also have to specify the kernel version you want the initrd to work with (it defaults to the one you are currently running). That's typical of Slackware btw. You have to do things for yourself rather than having them silently done for you by some automated process in the background, but you are given plenty of help and instructions on how to do them.

Once you have the kernel and the initrd in /boot, you can copy them over to /boot/efi/EFI/Slackware and just modify elilo.conf to boot the new images. Don't take any notice of messages mentioning lilo; that's just a hangover from old times.

No doubt there is a way of automating all this using eliloconfig but doing it by hand is not difficult and gives you the satisfaction of understanding how the boot is going to work.

Wed 01-27-2024 07:18 AM

Quote:

Originally Posted by hazel (Post 6479609)
Mount your EFI system partition on /boot/efi and have a look at its contents. There should be a directory called EFI and, within it, one called Slackware containing the bootloader file elilo.efi, its configuration file elilo.conf, and various kernels and initrd images.

I made a directory called booot, to not disturb the one already there and mounted /dev/nvme0n1p1 to it.

Code:

ls /mnt/booot/EFI/Slackware
reveals: elilo.conf*, elilo.efi*, initrd.gz* and vmlinuz*.

elilo.conf is the only readily readable one and it ends with an append
Code:

append="root=/dev/nvme0n1p3 vga=normal ro"
Quote:

When you install a new kernel with pkgtools, it goes into the /boot directory and you are expected to create an initrd image for it.
The installer did this for me. Just not on the boot partition, but the boot directory it seems.

Quote:

Hint: Go to /usr/share/mkinitrd and you will find a very useful script written by Patrick himself which will tell you what modules to specify when running mkinitrd. And of course you will also have to specify the kernel version you want the initrd to work with (it defaults to the one you are currently running). That's typical of Slackware btw. You have to do things for yourself rather than having them silently done for you by some automated process in the background, but you are given plenty of help and instructions on how to do them.

Once you have the kernel and the initrd in /boot, you can copy them over to /boot/efi/EFI/Slackware and just modify elilo.conf to boot the new images. Don't take any notice of messages mentioning lilo; that's just a hangover from old times.

No doubt there is a way of automating all this using eliloconfig but doing it by hand is not difficult and gives you the satisfaction of understanding how the boot is going to work.
I'm happy to learn and I feel the need to. But where do I get the proper kernel from?

The computer is not yet restarted since the installation and the USB with the installer is still stuck in.

I did ls /dev/sda, sda1 and sda2, but nothing is there.

hazel 01-27-2024 07:49 AM

Can you find the kernels on your installation image? There should be two: the huge kernel and the generic kernel. The generic kernel is the recommended one for an installed system. You will also need the corresponding kernel modules package.

Copy them both over to a suitable place such as root's personal directory (/root) and use the installpkg command to install them. Then make an initrd for your new kernel and copy over both the kernel and the initrd from /boot to /boot/efi/EFI/Slackware. Finally edit elilo.conf to make an entry for your new kernel; you can model it on the existing one.

Wed 01-27-2024 08:28 AM

I'm willing to risk it. Installing again isn't new. First a little thought though. A short sliver of clarity hit me just now.

/dev/sda should contain the installmedia (but I'm not certain). There are no other sd* anything.

I seem to have everything 5.15.19 in /mnt/boot (should be nvme0n1p3 i.e. /). Even though I never ran or configured lilo during the installation. But there is no directory called EFI.

eliloconfig under /mnt/booot (should be nvme0n1p1 /boot) seems to point to root=/dev/nvme0n1p3.

Would it help at all to
Code:

cp /mnt/boot/* /mnt/booot
?

Wed 01-27-2024 08:36 AM

Last time I restarted after installation:

Code:

uname -r
5.15.117

Code:

ls -1 /var/adm/packages/kernel-*
5.15.19 ...

I'd like the installer to detect that elilo is needed as it did with the virgin system. Is it a way forward to format the boot partition and rerun the setup?

hazel 01-27-2024 09:11 AM

Quote:

Originally Posted by Wed (Post 6479636)
I did ls /dev/sda, sda1 and sda2, but nothing is there.

No, that wouldn't work! You can't use ls with unmounted devices. The device file represents the disk hardware, not the filesystem on it. To access that, you have to mount the partition on some directory.

/dev/sda is clearly your usb thumb drive and sda1 and sda2 are partitions on it. My guess is that sda1 is the image's EFI system partition for booting under UEFI and sda2 is the installation image, probably a squashfs compressed disc image.

You could try mounting sda1 (say on /mnt) and see what it contains. My bet is that it will contain a huge kernel, not the generic one, but you could copy that over to your system ESP and try booting from it. Unlike the generic kernel, it won't require modules because it has everything built in. And once you have a bootable system, you'll be better equipped to install a proper generic kernel and modules and get them set up.

Windu 01-27-2024 04:30 PM

Quote:

Originally Posted by Wed (Post 6479636)
I made a directory called booot, to not disturb the one already there and mounted /dev/nvme0n1p1 to it.

Code:

ls /mnt/booot/EFI/Slackware
reveals: elilo.conf*, elilo.efi*, initrd.gz* and vmlinuz*.

This EFI partition should be mounted on a subdirectory of /boot , specifically on /boot/efi . Look inside your computer's /etc/fsab and fix that mount definition.
It should then end up as:
Code:

/dev/nvme0n1p1      /boot/efi      vfat        defaults        1  0
Then on reboot, I expect that everything will "just work".

BrianW 01-27-2024 05:45 PM

Are you dead set on using eLILO? I had issues with eLILO and bailed (for good, sorry trusty LILO) to grub and have had great success with it.

Utilizing grub at install/before first reboot of Slackware:
https://www.youtube.com/watch?v=OZeJd5JPQro About 29 minutes is where he bails from the Slackware installer to configure grub.
Code:

chroot /mnt /bin/bash
source /etc/profile
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg

After that, its pretty simple on kernel updates to run:
Code:

grub-mkconfig -o /boot/grub/grub.cfg

hazel 01-28-2024 12:17 AM

I've never had any problem with elilo and I've been using it now for several years. I really like it because it is simple where grub is complex, and because it has the same configuration interface as lilo. Better in fact, because I no longer need to run /sbin/lilo each time I make a change.

I gather that Patrick will be removing it from the next Slackware release but I will go on using it.

Petri Kaukasoina 01-28-2024 03:10 AM

Quote:

Originally Posted by Wed (Post 6479595)
The install went through ok but never showed me the boot partition to create, format or modify. It also gave me no other options but to install or not install lilo. I need elilo.

I guess you booted the install USB in legacy (non-UEFI) mode. You should have selected UEFI.

If directory /sys/firmware/efi exists, the install scripts know the system is running under UEFI. Only then it checks whether the EFI system partition is found or should be created. It can format the partition if not formatted yet. And adds it in fstab.

/usr/sbin/eliloconfig does nothing if /sys/firmware/efi does not exist, either, because then the system is not running under EFI.

Petri Kaukasoina 01-28-2024 03:41 AM

Quote:

Originally Posted by Wed (Post 6479650)
I'd like the installer to detect that elilo is needed as it did with the virgin system. Is it a way forward to format the boot partition and rerun the setup?

When you boot the install USB, select the boot device correctly from the computer "BIOS" boot device menu. It should be UEFI USB, not legacy. After booting, make sure directory /sys/firmware/efi exists. You can rerun setup, skip package installation, go to CONFIGURE step. It should run eliloconfig now.

quickbreakfast 01-28-2024 11:38 PM

Quote:

Originally Posted by Wed (Post 6479595)
This is really a continuation of a previous problem. When booting into a freshly installed 15.0 system, basically nothing works.

The boot process seem to find the boot partition just fine, and boots the wrong kernel.

A few details please.

What kernel is it trying to boot?

And what kernel is in /boot/efi/EFI/Slackware?

By the way have you made the initrd file with regards to the kernel in ....../Slackware?

Quote:

I believe I need to overwrite the previous files on the boot partition with relevant information to the current install.
My guess is that the kernel and the initrd file are both in /boot and waiting to be moved into /boot/efi/EFI/Slackware

Quote:

How can I provoke the install of elilo after the completed installation?
If it is finding the kernel, then I reckon elilo is installed, so does not need to be "provoked"

Please list the contents of /boot/efi/EFI/Slackware and post your elilo.conf

Wed 01-29-2024 01:44 PM

Quote:

Originally Posted by BrianW (Post 6479731)
Are you dead set on using eLILO? I had issues with eLILO and bailed (for good, sorry trusty LILO) to grub and have had great success with it.

No, I just want to get the system up and running. lilo and elilo seems small tried and true. Grub had me frustrated many years ago.

Wed 01-29-2024 01:56 PM

Quote:

Originally Posted by Petri Kaukasoina (Post 6479779)
When you boot the install USB, select the boot device correctly from the computer "BIOS" boot device menu. It should be UEFI USB, not legacy. After booting, make sure directory /sys/firmware/efi exists. You can rerun setup, skip package installation, go to CONFIGURE step. It should run eliloconfig now.

This did the trick!

I rebooted and chose the second entry of the USB drive. The boot partition did not show up in the list and that had me scared, but I pressed on. After fstab had been amended with my choices, the installer presented me with the fact that the efi system on the /boot partition also hade been added.

I have no idea why I repeatedly not chose the uefi entry. I really hope I will remember this until the next time ...

Much obliged! And relieved.


All times are GMT -5. The time now is 11:32 PM.