Article 4ZDYX Simultaneous setup for booting with LILO for BIOSes and ELILO for UEFIs - for a system hosted in an external USB hard drive?

Simultaneous setup for booting with LILO for BIOSes and ELILO for UEFIs - for a system hosted in an external USB hard drive?

by
ZhaoLin1457
from LinuxQuestions.org on (#4ZDYX)
Gentlemen, I need your help to setup my USB based "rescue system" to boot both in pure BIOS and pure UEFI (with no CSM) .

Basically, is is about an 160GB laptop hard drive, mounted in an USB enclosure, and hosting a full installation of -current and a "data" partition. Until now, I managed for years to boot it using LILO under BIOS based boxes and I used it as a rescue system, from where fixed different issues on my computers.

BUT, today the computers fleet from my house has new members, particularly a MinisForum Z83-F which is a really small mini-PC with a 2W TDP quad core Atom, 4G RAM and 64G eMMC. And Windows 10 Pro, until now.

However, this mini-PC sports a pure UEFI, with no CSM, then I cannot boot devices which aren't UEFI aware, even it permits booting from its both USB2 and USB3 ports.

So, how I intend to play with Slackware on it, firstly I should add this UEFI support to my beloved rescue system - making it able to run on this mini-PC to see how behaves and tune this particular Linux distribution, without touching the internal eMMC yet.

Still, my future additional UEFI setup on this portable hard drive should not touch the host system, and to permit me to update it randomly, even when the hard drive is connected to a BIOS only box.

From what I read, I need an ESP partition, which I did already, re-configuring my partitions setup on this external hard drive, adding an 1G partition, with the type EF and formatted FAT32. Then what?

Please note that I use this "/etc/lilo.conf" snippet, with the UUIDs usage:
Code:# Linux bootable partition config begins
image = /boot/vmlinuz-generic
root = "UUID=1ccc6d7b-f714-4ce8-9d5d-7e7dca521c40"
label = Linux
initrd = /boot/initrd-generic.img

addappend = "usb-storage.quirks=174c:55aa:uf zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=20 zswap.zpool=z3fold rootflags=noatime,commit=60,errors=remount-ro,defau
lts"

read-only
# Linux bootable partition config endsand this script to setup the initrd and bootloader running from the rescue system:
Code:#!/bin/sh

KVERSION=5.4.20

KMODULES="bfq:usb-storage:uas:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:mbcache:jbd2:ext4"

ROOTDEV="UUID=1ccc6d7b-f714-4ce8-9d5d-7e7dca521c40"
ROOTFS="ext4"

# Create the base initrd.
mkinitrd -c -k "$KVERSION" -r "$ROOTDEV" -f "$ROOTFS" -m "$KMODULES" -u -M -w 5 -o /boot/initrd-${KVERSION}.gz

if [ -f /boot/ucode.cpio ]; then
# Concatenate the ucode.cpio and base initrd on the final initrd.
cat /boot/ucode.cpio /boot/initrd-${KVERSION}.gz > /boot/initrd-generic-${KVERSION}.img

rm -f /boot/initrd-${KVERSION}.gz
else
# Move the initrd on its final location.
mv /boot/initrd-${KVERSION}.gz /boot/initrd-generic-${KVERSION}.img
fi

# Symlink the final initrd.
ln -sf initrd-generic-${KVERSION}.img initrd-generic.img

# Run the LILO.
lilo -P ignoreSo, what I should put on the ESP partition, to setup ELILO and to update it from the same generator script?

Please also note that I am an absolute noob on the noble art of booting from UEFI.latest?d=yIl2AUoC8zA latest?i=VE9zE6Sn8Wo:xB5ruRido44:F7zBnMy latest?i=VE9zE6Sn8Wo:xB5ruRido44:V_sGLiP latest?d=qj6IDK7rITs latest?i=VE9zE6Sn8Wo:xB5ruRido44:gIN9vFwVE9zE6Sn8Wo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments