LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Using GRUB to boot when ELILO fails (https://www.linuxquestions.org/questions/slackware-installation-40/using-grub-to-boot-when-elilo-fails-4175665364/)

gouttegd 12-03-2019 07:07 PM

Using GRUB to boot when ELILO fails
 
Hi fellow Slackers,

Just for your information, I want to report the case of a machine where ELILO (version 3.16, as provided in Slackware-current as of November 2019) seems completely unable to boot a Linux kernel, while GRUB (version 2.04) has no trouble doing so.

The machine in question is fairly recent. So recent, in fact, that the 14.2 installer fails to boot on it, which is why I decided to use -current. After installing Slackware-current, I installed ELILO, created the initial ramdisk and made sure that all the required files were in place in /boot/efi/EFI/Slackware (the ELILO binary itself, its configuration file, the kernel, and the initrd). I had done that on my previous machine a few years ago and it had worked fine, so I was not expecting any issue.

But this time, upon rebooting all I got was ELILO printing a single line (“Loading the kernel and the initrd”) and then nothing else, even after several minutes. The machine was stuck.

I thus used the USB installer stick again to boot on the newly installed system and decided to test GRUB. Since I was (and still am) not familiar with GRUB (I had always avoided it until then, being happy with (E)LILO), it took me quite a while (and several botched attempts) to figure out what to do, so in case this may help someone, here’s what I ultimately did:

First, install GRUB to the EFI partition (mounted as /boot/efi) and create a UEFI boot entry for it:

Code:

# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --boot-directory=/boot/efi
Then, create a simple configuration for GRUB in /boot/efi/grub/grub.cfg:

Code:

set default=0
set timeout=10
set root=(hd1,gpt1) # Location of the EFI filesystem: second disk, first GPT partition
insmod all_video # Needed for some reason

menuentry "Slackware64-current (stock kernel)" {
  echo "Loading the kernel and initial ramdisk."
  # Paths are relative to the root of the EFI filesystem as defined above
  linux  /EFI/Slackware/vmlinuz
  initrd /EFI/Slackware/initrd.gz
}

And lo and behold, upon rebooting, it worked just fine!

I don’t know why ELILO failed where GRUB succeeded, or if there was anything I could have done to make ELILO work. But I guess it’s possible that ELILO, whose development seems to have completely stopped a few years ago, is just slowly becoming too old for some shiny new hardware.

So if you run into a similar issue while using ELILO, maybe just give GRUB a shot. It’s not as complicated as some distributions make it look and it may just work. :)

mrmazda 12-04-2019 05:03 AM

Debian, Fedora, Mageia, Mint, openSUSE, Ubuntu and I'm sure many others still keep their kernels in /boot/. This is the first I've seen anyone keep them on a (FAT) ESP partition.

The complications of a normal Grub installation are mostly about avoiding boot failure as storage devices and operating systems are added, moved or removed, plus boot menu and automatic menu configuration. In the end, it's a bootloader, something to load (a selected) kernel and initrd.


All times are GMT -5. The time now is 10:58 AM.