Article 4YK77 Slackware64-current UEFI-booting newbie questions

Slackware64-current UEFI-booting newbie questions

by
Exaga
from LinuxQuestions.org on (#4YK77)
Hi guys. Over the last couple of days I've been trying to get to grips with, and understand, the concepts and processes of booting Slackware64 using the UEFI method. Some things are not making sense and I wondered if someone better informed could enlighten me.

The first puzzle I have relates to Slackware64-current 'setup'. I'm installing on a Samsung 850 EVO SSD [250GB] which is my boot/root device. The process generally goes as smooth as silk until the point where 'efibootmgr' is writing a boot menu entry and it's at that point which produces an error - [ https://imgur.com/v6IiTly - see this screenshot ] - which results in no boot menu entry being written; and consequently on rebooting after 'setup' all I get is a, hex-dump formatted, half-filled screen of number 9's. However, I did find a way to circumvent this error - I've discovered that if I wipe the drive's superblock before running Slackware64-current 'setup' then there is no 'efibootmgr' error. First I thought it was just the EFI partition that needed wiping but after a few hours of testing I found that it was actually the superblock. My question here is; is it normal and/or expected procedure to completely wipe the drive [a.k.a. 'dd if=/dev/zero of=/dev/sdX' fashion] before running Slackware64-current 'setup' if you're planning on booting with UEFI?

Another puzzle I have relates to the persistent naming of devices. Whenever I add a drive to my system [which I do on a regular basis] it throws the known device ID list out of the window and the hardware seems to enjoy making up its own. So, I thought persistent naming was the way to go. However, after configuring the system so that partitions would remain the same "ID" across the board, it makes no difference and, when an additional drive is connected, the device IDs change the same as before. I'm using PARTUUID for this purpose. I have a SSD boot/root [/dev/sdb] and 2x 2TB HDD drives [/dev/sda and /dev/sdc] connected to the system. Let me show you my setup and config outputs.

So, I get the PARTUUID from 'blkid' command output.

Code:root@spex:~# blkid
/dev/sdb1: UUID="DFED-49CB" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="UEFI" PARTUUID="7dfbd7c8-253d-400b-b9f6-59951e4bdfa2"
/dev/sdb4: UUID="9743612a-411a-413d-b04d-b7f58e22b622" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="ROOT" PARTUUID="7fdc1b32-70e8-42eb-a3a0-b24851c28fa8"
/dev/sda1: UUID="a449e776-96d5-41cc-a067-6d759bdfd504" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="HOME" PARTUUID="8e89f78b-88ef-42fd-9f2e-cf5278daf201"
/dev/sdb2: UUID="b86c81c1-b676-4e42-a494-44f26d429d5b" BLOCK_SIZE="1024" TYPE="ext4" PARTLABEL="BOOT" PARTUUID="f343187e-28c6-4f5b-a70c-9d09b939b6a3"
/dev/sdb3: UUID="1d19884a-0576-4e2e-b0a3-7172f53c7e48" TYPE="swap" PARTLABEL="SWAP" PARTUUID="a1ea22c1-99cd-4cce-a223-58d93513c19d"
/dev/sdc1: UUID="1003c192-17d3-4c6f-a77f-d656b44b4542" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="DATA" PARTUUID="5ef00b40-c0cd-4045-ac03-92d6199b2a41"Then I use the correct PARTUUID in /etc/fstab to identify my partitions.

Code:root@spex:~# cat /etc/fstab
#/dev/sdb3
PARTUUID=a1ea22c1-99cd-4cce-a223-58d93513c19d swap swap defaults 0 0
#/dev/sdb4
PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8 / ext4 defaults 1 1
#/dev/sdb2
PARTUUID=f343187e-28c6-4f5b-a70c-9d09b939b6a3 /boot ext4 defaults 1 2
#/dev/sda1
PARTUUID=8e89f78b-88ef-42fd-9f2e-cf5278daf201 /home ext4 defaults 1 2
#/dev/sdc1
PARTUUID=5ef00b40-c0cd-4045-ac03-92d6199b2a41 /data ext4 defaults 1 2
#/dev/sdb1
PARTUUID=7dfbd7c8-253d-400b-b9f6-59951e4bdfa2 /boot/efi vfat defaults 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs nosuid,nodev,noexec 0 0In elilo.conf I've specified 'root=' using the correct PARTUUID for /dev/sdb4.

Code:root@spex:~# cat /boot/efi/EFI/Slackware/elilo.conf
chooser=simple
delay=1
timeout=6
#
image=vmlinuz
label=vmlinuz
root=PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8
initrd=initrd.gz
read-only
append="vga=normal ro"With all the above in place, if I connect another SATA storage drive to the system then this setup is not relevant and the new drive becomes /dev/sdb, the current /dev/sdb becomes /dev/sdc, /dev/sdc becomes /dev/sdd, and so forth. I have found it easier to boot with the Slackware DVD or USB-boot and just work from there, but it's not ideal doing this each time. My question is; what am I doing wrong, or not doing at all, which is still causing this device ID to change?

The last question I have relates to 'eliloconfig'. Having set the PARTUUID of the devices in /etc/fstab and /boot/efi/EFI/Slackware/elilo.conf I have read on Slackdocs and elsewhere on the Internet that one should run 'eliloconfig' after making any changes - as it is with 'lilo' under the same conditions. However, when I do, I find that 'root=PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8' in my elilo.conf file has been replaced with an append of 'root=/dev/sdb4', Which is the correct device ID but I would expect it to be identified by PARTUUID instead:

Code:root@spex:~# cat /boot/efi/EFI/Slackware/elilo.conf
chooser=simple
delay=1
timeout=6
#
image=vmlinuz
label=vmlinuz
initrd=initrd.gz
read-only
append="root=/dev/sdb4 vga=normal ro"So I looked in the /usr/sbin/eliloconfig file to see what it was doing and I found the following code [line 60(ish)]:

Code:root@spex:~# vi /usr/sbin/eliloconfig

# Determine the root partition (such as /dev/sda1)
ROOT_DEVICE=$2
if [ "$ROOT_DEVICE" = "" ]; then
if [ -r $TMP/SeTrootdev ]; then
ROOT_DEVICE="$(cat $TMP/SeTrootdev)"
else
ROOT_DEVICE="$(mount | grep ' / ' | cut -f 1 -d ' ' | head -n 1)"
fi
fiSo, ${ROOT_DEVICE} has grepped '/' from the output of the 'mount' command. When I view the output of 'mount' is tells me:

Code:root@spex:~# mount
/dev/sdb4 on / type ext4 (rw,relatime)
/dev/sdb2 on /boot type ext4 (rw,relatime)
/dev/sda1 on /home type ext4 (rw,relatime)
/dev/sdc1 on /data type ext4 (rw,relatime)
/dev/sdb1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)My final question(s); it's obvious 'eliloconfig' is programmed to append 'root=' with the /dev/sdX of '/' but, can I not use 'eliloconfig' at all and retain the PARTUUID settings in my /boot/efi/EFI/Slackware/elilo.conf file which I set manually? More importantly, why is the persistent naming not working when I have done all of the above? What am I missing?

[EDIT] I haven't touched /boot/efi/EFI/Slackware/elilo.efi but I'd guess that it has a lot to do with this.

[EDIT2] I forgot to mention - I made sure the system is booting in UEFI mode...

Code:root@spex:~# ls /sys/firmware|grep efi
efi/Thanks for your interest and any advice on this issue.latest?d=yIl2AUoC8zA latest?i=FJYoO4wyqfg:yWXoqrixONA:F7zBnMy latest?i=FJYoO4wyqfg:yWXoqrixONA:V_sGLiP latest?d=qj6IDK7rITs latest?i=FJYoO4wyqfg:yWXoqrixONA:gIN9vFwFJYoO4wyqfg
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