UEFI BIOS + Linux



Sounds good, oh intrepid, bereted one. Keep us posted.
 
I forsee some reading in my future! ;)
me too ! AdamW Essay - i got to the same page but thats 2014; so is it a bit sparse out there on in-depth info? i'm not that keen on Wikipedia its like reading something that has been pre-treated with dettol . now Adam Williamson he shoots from the hip and has passion at least you don't nod off reading his stuff
 
good news and mixed news; my laptop boots (good news) and now shows a grub splash.

what I did :

first I used slpkg (note i dont mean slackpkg) to search for grub2; i found a grub2 package at slack repository; i installed that package. So then i had package grub2 installed but not made use of .

Then I took a usb stick /dev/sdc and using gparted made a new gpt partition table on it . That might have been a mistake. [I had an error with installing rEFInd onto a usb , putting on a gpt partition table. I got an email from Roderick Smith and if i understood him he said proably what happned is that I ended up with two gpt at start and one at end. When i used msdos partition table it worked]

next i used cgdisk and put a 100MB partition onto /dev/sdc of type EF00

which became /dev/sdc1

next i read i needed to mount that efi partition of sdc1. Looking in /mnt i saw hd, which i've used before so didn't bother creating new directory.

I mounted:
# mount /dev/sdc1 /mnt/hd

then :
grub-install --target=x86_64-efi --efi-directory=/mnt/hd --bootloader-id=GRUB

//where /mnt/hd should represent /dev/sdc1

// i got no errors but read i had to do a bit more:
// i think this is where i messed up:

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

that put grub stuff on main PC. I'm now going to boot from rEFInd usb just to see what it sees.

So what do i conclude from this ? i messed up grub onto usb but successfully got grub2 with efi onto laptop ?
 
got grub on usb :

used gparted to put gpt partition table on usb

Code:
usb was /dev/sdc


# cgdisk /dev/sdc

// i created 100MB of type EF00 using cgdisk 

that efi became /dev/sdc1

#mount /dev/sdc1 -t vfat /boot/efi 
#modprobe dm-mod
#grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
#mkdir -p /boot/grub/locale
#cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Configure grub.cfg with

#grub-mkconfig -o /boot/grub/grub.cfg
that was it
 
got grub on usb :

used gparted to put gpt partition table on usb

Code:
usb was /dev/sdc


# cgdisk /dev/sdc

// i created 100MB of type EF00 using cgdisk

that efi became /dev/sdc1

#mount /dev/sdc1 -t vfat /boot/efi
#modprobe dm-mod
#grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
#mkdir -p /boot/grub/locale
#cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Configure grub.cfg with

#grub-mkconfig -o /boot/grub/grub.cfg
that was it
Everything working now and setup as you want with grub now as your boot loader?
 
I for one love by being both spoiled, challenged, and entertained all at the same time, by Linux. It is so refreshing a change from the alternatives.
+1 over and over
ayers_rock.png

What's that bluish sagebrush-looking plant, @wizardfromoz ?
 
Last edited:
To answer your question yes(source):
"A boot loader is a piece of software started by the firmware (BIOS or UEFI). It is responsible for loading the kernel with the wanted kernel parameters, and initial RAM disk based on configuration files. In the case of UEFI, the kernel itself can be directly launched by the UEFI using the EFI boot stub. A separate boot loader or boot manager can still be used for the purpose of editing kernel parameters before booting."
It's all a chain of events, with many layers, and many interactions.

It all begins with engaging the start/power button on your computer. The power goes to the motherboard, where the BIOS/UEFI starts activating the hardware with the firmware burned into the hardware. The BIOS/UEFI finds the designated, or first bootable OS device, and based on what it finds on that bootable device, loads boot code into memory, which finds where the OS loader is and loads that into memory and executes that code. From the OS takes over and finishes initiating drivers, and so on ...

When a user instructs the OS to perform some activity (i.e., save file to location /some/storage/place/on/some/disk), the OS feeds code to the CPU, the CPU then sends instructions over the appropriate bus on the motherboard, which directs the instructions to the (.../some/disk) device's firmware on the controller to write the data/file to the disk (bits and bytes).

So it's an interaction of the user, the OS, the CPU, the motherboard, some device, and some firmware on that device, and back again. Layers of interactions.
 
Making progress!
Still have a lot of reading to do but I like reading and I like learning :)

A couple of quick tidbits I have picked up thus far:

Referring to "legacy" BIOS;
In the BIOS world, absolutely all forms of multi-booting are handled above the firmware layer. The firmware layer doesn't really know what a bootloader is, or what an operating system is. Hell, it doesn't know what a partition is. All it can do is run the boot loader from a disk's MBR. You also cannot configure the boot process from outside of the firmware. (Emphasis mine)

The BOOTx64.EFI (or whatever) file handles the rest of the boot process from there, booting the actual operating system contained on the medium.

What a Linux distribution actually does, so far as bootloading is concerned, when you do a UEFI native install is really pretty simple: it creates an EFI system partition if one does not already exist, installs an EFI boot loader with an appropriate configuration - often grub2-efi, but there are others - into a correct path in the EFI system partition, and calls efibootmgr to add an appropriately-named UEFI boot manager entry pointing to its boot loader.

Have as many EFI partitions as you want!
Most distros will use an existing EFI system partition if there is one, though it's perfectly valid to create a new one and use that instead: as we've noted, UEFI is a permissive spec, and if you follow the design logically, there's really no problem with having just as many EFI system partitions as you want.

Hmmmmm...... interesting. I'm gonna have another question regarding this.
As we've noted above, unlike in the BIOS world, you can actually configure the UEFI boot process from the operating system level
 
I have found this at /boot/efi ─ and it is the real content of my ESP partition at sda1:

Code:
root@Linux12:/boot/efi # tree
.
├── EFI
│   ├── arch_grub
│   │   └── grubx64.efi
│   ├── boot
│   │   ├── BOOTIA32.EFI
│   │   ├── bootx64.efi
│   │   ├── fallback.efi
│   │   ├── fbia32.efi
│   │   ├── fbx64.efi
│   │   └── mmx64.efi
│   ├── Debian
│   │   ├── BOOTX64.CSV
│   │   ├── fbx64.efi
│   │   ├── grub.cfg
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi
│   │   └── shimx64.efi
│   ├── fedora
│   │   ├── BOOTIA32.CSV
│   │   ├── BOOTX64.CSV
│   │   ├── fonts
│   │   │   └── unicode.pf2
│   │   ├── gcdia32.efi
│   │   ├── gcdx64.efi
│   │   ├── grub.cfg
│   │   ├── grubenv
│   │   ├── grubia32.efi
│   │   ├── grubx64.efi
│   │   ├── mmia32.efi
│   │   ├── mmx64.efi
│   │   ├── shim.efi
│   │   ├── shimia32.efi
│   │   ├── shimia32-fedora.efi
│   │   ├── shimx64.efi
│   │   └── shimx64-fedora.efi
│   ├── mageia
│   │   └── grubx64.efi
│   ├── MX19
│   │   └── grubx64.efi
│   ├── neon
│   │   ├── BOOTX64.CSV
│   │   ├── grub.cfg
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi
│   │   └── shimx64.efi
│   ├── opensuse
│   │   ├── boot.csv
│   │   ├── fw
│   │   ├── fwupdx64.efi
│   │   ├── grub.cfg
│   │   ├── grub.efi
│   │   ├── grubx64.efi
│   │   ├── MokManager.efi
│   │   └── shim.efi
│   ├── pclinuxos
│   │   └── grubx64.efi
│   └── ubuntu
│       ├── BOOTX64.CSV
│       ├── grub.cfg
│       ├── grubx64.efi
│       ├── mmx64.efi
│       └── shimx64.efi
├── mach_kernel
└── System
    └── Library
        └── CoreServices
            └── SystemVersion.plist

16 directories, 51 files
root@Linux12:/boot/efi #

What I could see, since January, with a new PC with UEFI-GPT capable hardware is here. ─ There is a Translate button at the top of right column, for desktop screens.
 
Last edited:
@Vrai - I actually cut and pasted your post into a text file I'll save as a reference -- thanks for your efforts. Makes more sense than anything else I've read -- here or elsewhere!
 
Last edited:
I have found this at /boot/efi ─ and it is the real content of my ESP partition at sda1:

Code:
root@Linux12:/boot/efi # tree
.
├── EFI
│   ├── arch_grub
│   │   └── grubx64.efi
│   ├── boot
│   │   ├── BOOTIA32.EFI
│   │   ├── bootx64.efi
│   │   ├── fallback.efi
│   │   ├── fbia32.efi
│   │   ├── fbx64.efi
│   │   └── mmx64.efi
│   ├── Debian
│   │   ├── BOOTX64.CSV
│   │   ├── fbx64.efi
│   │   ├── grub.cfg
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi
│   │   └── shimx64.efi
│   ├── fedora
│   │   ├── BOOTIA32.CSV
│   │   ├── BOOTX64.CSV
│   │   ├── fonts
│   │   │   └── unicode.pf2
│   │   ├── gcdia32.efi
│   │   ├── gcdx64.efi
│   │   ├── grub.cfg
│   │   ├── grubenv
│   │   ├── grubia32.efi
│   │   ├── grubx64.efi
│   │   ├── mmia32.efi
│   │   ├── mmx64.efi
│   │   ├── shim.efi
│   │   ├── shimia32.efi
│   │   ├── shimia32-fedora.efi
│   │   ├── shimx64.efi
│   │   └── shimx64-fedora.efi
│   ├── mageia
│   │   └── grubx64.efi
│   ├── MX19
│   │   └── grubx64.efi
│   ├── neon
│   │   ├── BOOTX64.CSV
│   │   ├── grub.cfg
│   │   ├── grubx64.efi
│   │   ├── mmx64.efi
│   │   └── shimx64.efi
│   ├── opensuse
│   │   ├── boot.csv
│   │   ├── fw
│   │   ├── fwupdx64.efi
│   │   ├── grub.cfg
│   │   ├── grub.efi
│   │   ├── grubx64.efi
│   │   ├── MokManager.efi
│   │   └── shim.efi
│   ├── pclinuxos
│   │   └── grubx64.efi
│   └── ubuntu
│       ├── BOOTX64.CSV
│       ├── grub.cfg
│       ├── grubx64.efi
│       ├── mmx64.efi
│       └── shimx64.efi
├── mach_kernel
└── System
    └── Library
        └── CoreServices
            └── SystemVersion.plist

16 directories, 51 files
root@Linux12:/boot/efi #

What I could see, since January, with a new PC with UEFI-GPT capable hardware is here. ─ There is a Translate button at the top of right column, for desktop screens.
No I don't think that's what's on the actual circa 100mb partition of file type EF00 thats a tree of directories contains other stuff that's to do with uefi .cfg for instance config files . that's why uefi is so confusing .I believe what's on the actual efi can be seen using efibootmgr from command line.its not very interesting either mostly loads numbers I can post a sample if you want
 
my objective really was to get ready for next C
Everything working now and setup as you want with grub now as your boot loader?
My objective wasn't really to have grub per se , but to know how to install it, learn anything else and get ready for next Century when Mr Volkerding inroduces it into the distro . But yes the splash on boot was grub but , i've identified a caveat when Slackware15 comes out, since I will be doing a system upgrade at that point from my current (5.4.12) to stable 15.

Two things to ponder then this weekend:

1) leave it as it is , take out grub now i know how to install it
2) Should i be excessively decadent this weekend and increase virgin olive oil to 50ml in pizza recipe 225 flour, 150 ml water, 25 ml olive oil
 
Got me :) , we could do fauna, too? If the weather is merry (Flora, Fauna and Merryweather)
 
No I don't think that's what's on the actual circa 100mb partition of file type EF00 thats a tree of directories contains other stuff that's to do with uefi .cfg for instance config files . that's why uefi is so confusing .I believe what's on the actual efi can be seen using efibootmgr from command line.its not very interesting either mostly loads numbers I can post a sample if you want

Well, it is just an abstract:

Code:
$ sudo efibootmgr
[sudo] password for flavio:
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0004,0007,0006,0001,0002,0008,0005,0009,000A,000B,000C
Boot0000* opensuse-secureboot
Boot0001* debian
Boot0002* Fedora
Boot0003* opensuse
Boot0004* mageia
Boot0005* arch_grub
Boot0006* ubuntu
Boot0007* MX19
Boot0008* neon
Boot0009* debian
Boot000A* UEFI:CD/DVD Drive
Boot000B* UEFI:Removable Device
Boot000C* UEFI:Network Device

If you want to see the real content of an ESP partition ─ let's say /dev/sda1 ─ run a live session, mount it at /mnt, and you will understand why can I tell you my real content:

Code:
$ mount /dev/sda1 /mnt

2020-01-16_21-07-41_LiveNeon.jpg


2020-01-16_20-56-44_LiveNeon.jpg


Then, open a filemanager, go to /mnt and browse all folders and subfolders within it.

It is exactly the same content you can see from inside an installed distro, at its /boot/efi mountpoint.

These images (above) are from January, 16, when I had installed just PCLinuxOS, openSUSE, Fedora and KDE Neon.

I have saved another summary March, 7, with a different parameter, for compare:

Code:
2020-01-16 ---------- from Live KDE Neon                     2020-03-07 ---------- from installed PCLinuxOS

# ls -o -R /mnt                                              # ls -n -R /boot/EFI
/mnt:                                                        /boot/EFI:
total 12                                                     total 12
drwxr-xr-x 8 root 4096 Oct 23 18:02 EFI                      drwxr-xr-x 8 0 0 4096 Oct 23 18:02 EFI/
drwxr-xr-x 3 root 4096 Oct 23 18:05 System                   -rwxr-xr-x 1 0 0   34 Jul 25  2019 mach_kernel*
-rwxr-xr-x 1 root   34 Jul 25 20:04 mach_kernel              drwxr-xr-x 3 0 0 4096 Oct 23 18:05 System/

/mnt/EFI:                                                    /boot/EFI/EFI:
total 24                                                     total 24
drwxr-xr-x 2 root 4096 Oct 23 18:05 boot                     drwxr-xr-x 2 0 0 4096 Oct 23 18:05 boot/
drwxr-xr-x 3 root 4096 Jan 14 18:06 fedora                   drwxr-xr-x 3 0 0 4096 Mar  5 11:34 fedora/
drwxr-xr-x 2 root 4096 Jan 12 16:43 neon                     drwxr-xr-x 2 0 0 4096 Jan 12 16:43 neon/
drwxr-xr-x 3 root 4096 Jan 13 01:39 opensuse                 drwxr-xr-x 3 0 0 4096 Jan 13 01:39 opensuse/
drwxr-xr-x 2 root 4096 Jan 10 20:22 pclinuxos                drwxr-xr-x 2 0 0 4096 Jan 10 20:22 pclinuxos/
drwxr-xr-x 3 root 4096 Jan 12 16:43 ubuntu                   drwxr-xr-x 2 0 0 4096 Feb 19 00:26 ubuntu/

/mnt/EFI/boot:                                               /boot/EFI/EFI/boot:
total 3096                                                   total 3096
-rwxr-xr-x 1 root  975536 Oct  2  2018 BOOTIA32.EFI          -rwxr-xr-x 1 0 0  975536 Oct  2  2018 BOOTIA32.EFI*
-rwxr-xr-x 1 root 1210776 Oct  2  2018 bootx64.efi           -rwxr-xr-x 1 0 0 1210776 Oct  2  2018 bootx64.efi*
-rwxr-xr-x 1 root  358768 Jan 11 17:09 fallback.efi          -rwxr-xr-x 1 0 0  358768 Jan 11 17:09 fallback.efi*
-rwxr-xr-x 1 root  257472 Oct  2  2018 fbia32.efi            -rwxr-xr-x 1 0 0  257472 Oct  2  2018 fbia32.efi*
-rwxr-xr-x 1 root  357248 Oct  2  2018 fbx64.efi             -rwxr-xr-x 1 0 0  357248 Oct  2  2018 fbx64.efi*

/mnt/EFI/fedora:                                             /boot/EFI/EFI/fedora:
total 14840                                                  total 14840
-rwxr-xr-x 1 root     112 Oct  2  2018 BOOTIA32.CSV          -rwxr-xr-x 1 0 0     112 Oct  2  2018 BOOTIA32.CSV*
-rwxr-xr-x 1 root     110 Oct  2  2018 BOOTX64.CSV           -rwxr-xr-x 1 0 0     110 Oct  2  2018 BOOTX64.CSV*
drwxr-xr-x 2 root    4096 Jan 12 21:37 fonts                 drwxr-xr-x 2 0 0    4096 Feb  2 23:47 fonts/
-rwxr-xr-x 1 root 1468744 Dec  5 09:59 gcdia32.efi           -rwxr-xr-x 1 0 0 1468744 Jan 13 17:11 gcdia32.efi*
-rwxr-xr-x 1 root 2271560 Dec  5 09:59 gcdx64.efi            -rwxr-xr-x 1 0 0 2271560 Jan 13 17:11 gcdx64.efi*
-rwxr-xr-x 1 root   12611 Jan 12 15:47 grub.cfg              -rwxr-xr-x 1 0 0   12611 Jan 12 15:47 grub.cfg*
-rwxr-xr-x 1 root    1024 Jan 14 18:06 grubenv               -rwxr-xr-x 1 0 0    1024 Mar  5 11:41 grubenv*
-rwxr-xr-x 1 root 1468744 Dec  5 09:59 grubia32.efi          -rwxr-xr-x 1 0 0 1468744 Jan 13 17:11 grubia32.efi*
-rwxr-xr-x 1 root 2271560 Dec  5 09:59 grubx64.efi           -rwxr-xr-x 1 0 0 2271560 Jan 13 17:11 grubx64.efi*
-rwxr-xr-x 1 root  927824 Oct  2  2018 mmia32.efi            -rwxr-xr-x 1 0 0  927824 Oct  2  2018 mmia32.efi*
-rwxr-xr-x 1 root 1159560 Oct  2  2018 mmx64.efi             -rwxr-xr-x 1 0 0 1159560 Oct  2  2018 mmx64.efi*
-rwxr-xr-x 1 root 1210776 Oct  2  2018 shim.efi              -rwxr-xr-x 1 0 0 1210776 Oct  2  2018 shim.efi*
-rwxr-xr-x 1 root  969264 Oct  2  2018 shimia32-fedora.efi   -rwxr-xr-x 1 0 0  975536 Oct  2  2018 shimia32.efi*
-rwxr-xr-x 1 root  975536 Oct  2  2018 shimia32.efi          -rwxr-xr-x 1 0 0  969264 Oct  2  2018 shimia32-fedora.efi*
-rwxr-xr-x 1 root 1204496 Oct  2  2018 shimx64-fedora.efi    -rwxr-xr-x 1 0 0 1210776 Oct  2  2018 shimx64.efi*
-rwxr-xr-x 1 root 1210776 Oct  2  2018 shimx64.efi           -rwxr-xr-x 1 0 0 1204496 Oct  2  2018 shimx64-fedora.efi*

/mnt/EFI/fedora/fonts:                                       /boot/EFI/EFI/fedora/fonts:
total 2504                                                   total 2504
-rwxr-xr-x 1 root 2560080 Dec  5 09:59 unicode.pf2           -rwxr-xr-x 1 0 0 2560080 Jan 13 17:11 unicode.pf2*

/mnt/EFI/neon:                                               /boot/EFI/EFI/neon:
total 3644                                                   total 3644
-rwxr-xr-x 1 root     108 Jan 12 16:43 BOOTX64.CSV           -rwxr-xr-x 1 0 0     108 Jan 12 16:43 BOOTX64.CSV*
-rwxr-xr-x 1 root     126 Jan 12 16:43 grub.cfg              -rwxr-xr-x 1 0 0     126 Jan 12 16:43 grub.cfg*
-rwxr-xr-x 1 root 1116024 Jan 12 16:43 grubx64.efi           -rwxr-xr-x 1 0 0 1116024 Jan 12 16:43 grubx64.efi*
-rwxr-xr-x 1 root 1269496 Jan 12 16:43 mmx64.efi             -rwxr-xr-x 1 0 0 1269496 Jan 12 16:43 mmx64.efi*
-rwxr-xr-x 1 root 1334816 Jan 12 16:43 shimx64.efi           -rwxr-xr-x 1 0 0 1334816 Jan 12 16:43 shimx64.efi*

/mnt/EFI/opensuse:                                           /boot/EFI/EFI/opensuse:
total 3904                                                   total 3904
-rwxr-xr-x 1 root 1158688 Jan 11 17:09 MokManager.efi        -rwxr-xr-x 1 0 0      58 Feb 25 16:57 boot.csv*
-rwxr-xr-x 1 root      58 Jan 11 17:09 boot.csv              drwxr-xr-x 2 0 0    4096 Jan 13 01:39 fw/
drwxr-xr-x 2 root    4096 Jan 13 01:39 fw                    -rwxr-xr-x 1 0 0   64776 Feb 16 09:43 fwupdx64.efi*
-rwxr-xr-x 1 root   64776 Jan 13 01:39 fwupdx64.efi          -rwxr-xr-x 1 0 0     155 Feb 25 16:57 grub.cfg*
-rwxr-xr-x 1 root     155 Jan 11 17:09 grub.cfg              -rwxr-xr-x 1 0 0 1238896 Feb 25 16:57 grub.efi*
-rwxr-xr-x 1 root 1238880 Jan 11 17:09 grub.efi              -rwxr-xr-x 1 0 0  307200 Feb 25 16:57 grubx64.efi*
-rwxr-xr-x 1 root  307200 Jan 11 17:09 grubx64.efi           -rwxr-xr-x 1 0 0 1158688 Feb 25 16:57 MokManager.efi*
-rwxr-xr-x 1 root 1208968 Jan 11 17:09 shim.efi              -rwxr-xr-x 1 0 0 1208968 Feb 25 16:57 shim.efi*

/mnt/EFI/opensuse/fw:                                        /boot/EFI/EFI/opensuse/fw:
total 0                                                      total 0

/mnt/EFI/pclinuxos:                                          /boot/EFI/EFI/pclinuxos:
total 124                                                    total 124
-rwxr-xr-x 1 root 123904 Jan 10 20:22 grubx64.efi            -rwxr-xr-x 1 0 0 123904 Feb 16 08:09 grubx64.efi*

/mnt/EFI/ubuntu:                                             /boot/EFI/EFI/ubuntu:
total 84                                                     total 4
drwxr-xr-x 2 root  4096 Jan 12 16:43 fw                      -rwxr-xr-x 1 0 0 126 Jan 12 16:43 grub.cfg*
-rwxr-xr-x 1 root 75992 Jan 12 16:43 fwupx64.efi
-rwxr-xr-x 1 root   126 Jan 12 16:43 grub.cfg

/mnt/EFI/ubuntu/fw:
total 0

/mnt/System:                                                 /boot/EFI/System:
total 4                                                      total 4
drwxr-xr-x 3 root 4096 Oct 23 18:05 Library                  drwxr-xr-x 3 0 0 4096 Oct 23 18:05 Library/

/mnt/System/Library:                                         /boot/EFI/System/Library:
total 4                                                      total 4
drwxr-xr-x 2 root 4096 Oct 23 18:05 CoreServices             drwxr-xr-x 2 0 0 4096 Oct 23 18:05 CoreServices/

/mnt/System/Library/CoreServices:                            /boot/EFI/System/Library/CoreServices:
total 4                                                      total 4
-rwxr-xr-x 1 root 384 Jul 25 20:04 SystemVersion.plist       -rwxr-xr-x 1 0 0 384 Jul 25  2019 SystemVersion.plist*

2020-07-31_10-59-32_Mx.jpg


Now, I have installed also Debian, Arch, Mageia 7, Mint, reinstalled Mageia (8 alpha1), Void, MX ─ but I "told" Void not to install its bootloader.
 


Top