LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 01-27-2024, 04:08 AM   #1
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Rep: Reputation: 45
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.
 
Old 01-27-2024, 04:54 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,592
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
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.

Last edited by hazel; 01-27-2024 at 05:02 AM.
 
Old 01-27-2024, 07:18 AM   #3
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by hazel View Post
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.
 
Old 01-27-2024, 07:49 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,592
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
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.
 
Old 01-27-2024, 08:28 AM   #5
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Original Poster
Rep: Reputation: 45
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
?
 
Old 01-27-2024, 08:36 AM   #6
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Original Poster
Rep: Reputation: 45
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?
 
Old 01-27-2024, 09:11 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,592
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
Quote:
Originally Posted by Wed View Post
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.
 
1 members found this post helpful.
Old 01-27-2024, 04:30 PM   #8
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 591

Rep: Reputation: Disabled
Quote:
Originally Posted by Wed View Post
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".
 
Old 01-27-2024, 05:45 PM   #9
BrianW
Member
 
Registered: Jul 2003
Location: Montana
Posts: 297

Rep: Reputation: Disabled
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
 
Old 01-28-2024, 12:17 AM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,592
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
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.
 
Old 01-28-2024, 03:10 AM   #11
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,795

Rep: Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477
Quote:
Originally Posted by Wed View Post
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.
 
1 members found this post helpful.
Old 01-28-2024, 03:41 AM   #12
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,795

Rep: Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477
Quote:
Originally Posted by Wed View Post
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.

Last edited by Petri Kaukasoina; 01-28-2024 at 03:42 AM.
 
1 members found this post helpful.
Old 01-28-2024, 11:38 PM   #13
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 335

Rep: Reputation: Disabled
Quote:
Originally Posted by Wed View Post
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
 
Old 01-29-2024, 01:44 PM   #14
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by BrianW View Post
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.
 
Old 01-29-2024, 01:56 PM   #15
Wed
Member
 
Registered: Sep 2005
Location: Sweden
Distribution: Slackware
Posts: 249

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Petri Kaukasoina View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Install issues - elilo install 64-14.2-current huge Jeff-G Slackware - Installation 3 07-13-2018 06:24 PM
[SOLVED] [-CURRENT] NVME elilo install failed Freaksta Slackware - Installation 3 06-18-2017 03:08 PM
[SOLVED] how to install elilo after installing windows 7? rubankumars Slackware 1 08-21-2014 12:57 AM
14.1 Install on a Thinkpad W530.... where is elilo; fdisk and cgdisk discrepancies bimboleum Slackware - Installation 2 12-20-2013 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration