LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-02-2020, 05:53 PM   #1
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Rep: Reputation: 18
Question Can /boot/efi/EFI/Slackware/elilo.conf be manually edited?


Can /boot/efi/EFI/Slackware/elilo.conf be manually edited to add entries, and if so, does something need to be updated after the edit?
 
Old 05-02-2020, 06:14 PM   #2
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
Yes, you can. After all, if you edit the entries manually, you can add as many entries as you want and have them with a configuration that suits your needs. Also is good to learn the syntax by editing that file manually, so if you ever find a problem you can fix it on your own at the moment.

Last edited by slac; 05-02-2020 at 09:29 PM. Reason: spellchecking
 
1 members found this post helpful.
Old 05-02-2020, 06:23 PM   #3
DarrenDrapkin
Member
 
Registered: Aug 2014
Location: Leeds, England
Distribution: Slackware x86 64 version 15.0
Posts: 127
Blog Entries: 3

Rep: Reputation: 27
if you prefer to use a configurator, eliloconfig can do most of the basics.
 
Old 05-02-2020, 07:00 PM   #4
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Original Poster
Rep: Reputation: 18
Yes, the goal is to add multiple entries and not have to rely on eliloconfig.

Does something have to be run after updating the elilo.conf?
 
Old 05-02-2020, 08:48 PM   #5
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
I've just started learning how to work with EFI on my X1 Carbon so I'm no expert, but no, you don't have to run anything after updating elilo.conf. Since I triple boot Windows, Slackware, and OpenBSD I actually use refind but it works pretty much the same way. I just create menu entries in refind.conf and when I reboot, they are just there.
 
1 members found this post helpful.
Old 05-02-2020, 08:54 PM   #6
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Original Poster
Rep: Reputation: 18
Thanks all for your responses. Marked as SOLVED.
 
Old 05-02-2020, 08:54 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Confirmed. This is because the .efi file is a program that reads the file elilo.conf every time it runs, and it runs every time you boot.
 
Old 05-02-2020, 09:25 PM   #8
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
Talking

The script: eliloconfig automates some things but it only adds one entry by default, it usually is the Slackware operative system and boots it up using the vmlinuz-huge image and initrd.gz

Quote:
Originally Posted by ardya View Post
Yes, the goal is to add multiple entries and not have to rely on eliloconfig.

Does something have to be run after updating the elilo.conf?
No, it is not necessary to run any script after manually editing elilo.conf, if you run, ie: the script eliloconf after manually editing elilo.conf, you are going to overwrite the changes you manually made.

There is only one thing you need to do after editing elilo.conf and that is to add the files that you are going to use in the new entries at elilo.conf, ie: If you are going to add an entry to boot up slackware using the official generic kernel, you will need to manually copy from /boot the vmlinuz-generic-version file to /boot/efi/EFI/Slackware or to whatever your ELILO entry is located. Do not make symbolic links of these files, because an EFI partition uses FAT32 format and such format does not support symbolic links, just as I said before, just copy the vmlinuz and initrd files that you use in your new elilo entries.

The elilo.efi file is needed to boot up the system. That file is just a copy of the elilo-*.efi files that are stored in /boot, mine is a copy of elilo-x64_64.efi it is just renamed from such name to elilo.efi and it is stored at /boot/efi/EFI/Slackware. It only needs to be done once but I just said it in case you lost that file, so you do not have to run eliloconf and lost your elilo.conf changes.

Also you can create another ELILO entry (different from /boot/efi/EFI/Slackware, ie: /boot/efi/EFI/SlackwareELILO) and know you know how to manually get all the files that the eliloconfig script creates.

Last edited by slac; 05-02-2020 at 09:38 PM. Reason: spellchecking
 
1 members found this post helpful.
Old 05-02-2020, 10:20 PM   #9
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
Post

Quote:
Originally Posted by slac View Post
Also you can create another ELILO entry (different from /boot/efi/EFI/Slackware, ie: /boot/efi/EFI/SlackwareELILO) and know you know how to manually get all the files that the eliloconfig script creates.
If you do something like that, you will need to use the command efibootmgr. That program manipulates the UEFI boot manager.

First, you will need to create a new boot variable and add it to the boot order, ie:

Code:
EFI_DEVICE=$(mount | grep vfat | grep -w /boot/efi | cut -b 1-8)
EFI_PARTITION=$(mount | grep vfat | grep -w /boot/efi | cut -f 1 -d ' ' | cut -b 9-)
efibootmgr -q -c -d $EFI_DEVICE -p $EFI_PARTITION -l "\\EFI\\SlackwareELILO\\elilo.efi" -L "SlackwareELILO"
Then you can set the boot order as whatever you need or like, to see the boor order and boot numbers of each entry just execute the command "efibootmgr" as root.

To set the boot order, do something like this:

Code:
efibootmgr -o 0000,0001,0002
Those are just examples, be sure to adapt the commands to your system.
 
1 members found this post helpful.
Old 05-03-2020, 01:10 AM   #10
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 663

Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
I have multiboot computers some of which still boot with LILO but
most of the newer ones have EFI.
Sometimes I used to cause myself trouble by upgrading -current and forgetting to run
Lilo or eliloconfig and then I'd have to reboot the system from a usb or from another partition
and go in and manually edit and make repairs. I've spent many
a past midnight hour trying to figure out what I had done and how to get
my system back up again. I don't regret that learning curve.
I've had some flavours of Debian in the past and I've tried to learn grub2 and found it
to be quite unfriendly to me but I did reach the level that I could fix grub2 problems.
I can't say that I ever liked grub.
I have been using ReFind for quite some time and it saves me from ever having to edit
the boot directory files manually any more. ReFind works great for me and has saved my bacon
many times. I've even been able to patch complex (to me, anyway) problems with Windows10
through the use of Refind and the help pages on the Refind website.
 
Old 05-03-2020, 08:57 AM   #11
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by slac View Post
If you do something like that, you will need to use the command efibootmgr.
That's one way to have multiple EFI boot options. As an example, below is an elilo.conf that offers a selection of 4 boot kernels with a default. If the EFI menu is invoked (press tab during boot) then all 4 boot options are displayed for selection.

Code:
prompt
timeout=50
default=Gen5.4.38
image=vmlinuz-generic-5.4.36
  label=Gen5.4.36
  initrd=initrd-5.4.36.gz
  read-only #5.4.36
  append="root=/dev/mapper/myroot vga=0x37d ro" #5.4.36
image=vmlinuz-huge-5.4.36
  label=Hug5.4.36
  initrd=initrd-5.4.36.gz
  read-only #5.4.36
  append="root=/dev/mapper/myroot vga=0x37d ro" #5.4.36
image=vmlinuz-generic-5.4.38
  label=Gen5.4.38
  initrd=initrd-5.4.38.gz
  read-only #5.4.38
  append="root=/dev/mapper/myroot vga=0x37d ro" #5.4.38
image=vmlinuz-huge-5.4.38
  label=Hug5.4.38
  initrd=initrd-5.4.38.gz
  read-only #5.4.38
  append="root=/dev/mapper/myroot vga=0x37d ro" #5.4.38
Hope that helps.
 
Old 05-03-2020, 09:13 AM   #12
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Original Poster
Rep: Reputation: 18
Dumped to UEFI shell at boot

I'm testing EFI booting using Virtualbox 6.0.20 as hypervisor, and slackware-current.

I was able to compile a newer kernel, cp'd the kernel and newly created initrd to /boot/efi/EFI/Slackware, edited elilo.conf and added new entry pointing to new kernel and initrd, rebooted and got the elilo menu with the two entries I have listed. Rebooted two more times just to make sure things were working, but on the second reboot instead of getting the elilo menu, I'm dumped to Virtualbox UEFI shell. Subsequent reboots dump me to this shell. I can type exit and am in the UEFI configuration menu (looks like a bios configuration menu), and from there I can boot from file and eventually find elilo.efi which then loads the elilo menu.

Code:
/boot/efi/EFI/Slackware:

-rwxr-xr-x 1 root root      321 May  3 00:02 elilo.conf*
-rwxr-xr-x 1 root root   238531 Jun 12  2018 elilo.efi*
-rwxr-xr-x 1 root root 10926218 May  2 23:51 initrd-5.6.10.gz*
-rwxr-xr-x 1 root root 10201456 May  2 02:56 initrd.gz*
-rwxr-xr-x 1 root root  6527360 Apr 30 04:00 vmlinuz*
-rwxr-xr-x 1 root root  6680352 May  2 23:51 vmlinuz-5.6.10*
Code:
elilo.conf:

chooser=simple
delay=50
timeout=50
prompt
default=5.6.10
image=vmlinuz-5.6.10
        label=5.6.10
        initrd=initrd-5.6.10.gz
        read-only
        append="root=/dev/sda2 vga=normal ro"
image=vmlinuz
        label=5.4.36
        initrd=initrd.gz
        read-only
        append="root=/dev/sda2 vga=normal ro"

I don't know if this is an issue with Virtualbox's implementation of UEFI, or something on the VM I'm using to test with.
I've attached a screenshot of the UEFI shell I'm dumped into at boot, maybe it can provide some more information on my EFI configuration.
Attached Thumbnails
Click image for larger version

Name:	uefi-screen.png
Views:	199
Size:	10.5 KB
ID:	33162  

Last edited by ardya; 05-03-2020 at 09:17 AM.
 
Old 05-03-2020, 11:18 AM   #13
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Original Poster
Rep: Reputation: 18
Further research indicates that Virtualbox UEFI implementation does not save the UEFI boot entries so drops to a shell, from https://superuser.com/questions/1145...in-virtual-box:

Quote:
If you've installed an OS in your VirtualBox session, chances are it installed a boot loader on the EFI System Partition (ESP). Most OSes register these boot loaders with the firmware, which remembers them and boots them automatically. One quirk of VirtualBox is that it usually forgets these boot manager entries. The result is that the VM boots up into the EFI shell by default.
Continuing on...
 
Old 05-03-2020, 11:49 AM   #14
ardya
Member
 
Registered: Mar 2006
Distribution: Slackware since 1997
Posts: 89

Original Poster
Rep: Reputation: 18
For others having issues with UEFI boot in Virtualbox.

I created /boot/efi/startup.nsh with the line:

Code:
fs0:\EFI\Slackware\elilo.efi
and now elilo loads with every reboot. You can point to any EFI loader in this script.
I had rEFInd installed and could load it this way as well.
 
Old 05-03-2020, 12:48 PM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
I switched from VirtualBox to Qemu a while ago and never looked back.
 
  


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] Ooooy. EFI boot mmx64.efi.efi not found bulgin Linux - Newbie 12 12-20-2018 11:03 AM
[SOLVED] Can't find /boot/efi/EFI/Slackware/vmlinuz kernel configuration ironQiu Slackware 4 02-09-2015 06:21 AM
[SOLVED] Cant boot in EFI mode: elilo doesnt load from the UEFI menu in a Asus motherboard. Linux-at-last Slackware 5 04-03-2014 04:23 PM
[SOLVED] elilo package missing x86_64 EFI binary? cendryon Slackware 6 02-16-2013 07:31 PM
Can Mageia Repos be edited manually Etcetera. theKbStockpiler Mandriva 5 02-05-2012 08:09 PM

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

All times are GMT -5. The time now is 10:29 PM.

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