LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-29-2020, 09:49 AM   #16
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Original Poster
Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665

Quote:
Originally Posted by captain_sensible View Post
this is well worth a read: http://slackware.uk/slackware/slackw...EADME_UEFI.TXT

if you do any editing to elio.conf and then run eliloconf i'm pretty sure its just going to over write your edits. I think with any superblock issue its probably a case of making sure hd is fixed of issues before installing
Thanks for all this. You've pretty much described what I did with different issues involved. I did a full (longggggggggggg) 'smartctl' check of the SSD before trying to understand why the 'libefivar' error was appearing because I thought the same - that the drive may have faults. However, it came back 100% clean with no errors.
 
Old 01-29-2020, 09:51 AM   #17
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by bifferos View Post
In EFI land, you may need to in addition delete the boot entries, which can only be done using the efibootmgr utility.
That's not quite true. You can always go into your UEFI at early boot time and configure it by hand, just like you would with a BIOS, only it's a pain in the neck. efibootmgr is supposed to protect you from that. But some UEFIs rearrange the efibootmgr settings behind your back as Rod Smith points out in his UEFI/rEFInd book. And the UEFI on my Lenovo Thinkstation apparently allows the preferred boot option to be changed once but never again!
 
Old 01-29-2020, 10:11 AM   #18
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Original Poster
Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by bifferos View Post
So in the past dd if=/dev/zero of=/dev/sda bs=512 count=1 was the answer to most of your problems. In EFI land, you may need to in addition delete the boot entries, which can only be done using the efibootmgr utility. So I think setup in Slackware probably wants to show the user what's already there and/or validate it instead of the current 'would you like a boot entry' question so the user can make an informed decision, perhaps they'd like to delete any stale boot entries at this stage.
That appears logical. However not much I have experienced regarding UEFI is that logical. Thanks for sharing info - I am aware of the benefits of using GPT partitions which is why I chose that route when replacing the HDDs on my Slackbox. It's just a shame I can't get the persistent naming to work because it seems that I will have to endure my devices exchanging IDs whenever I connect a new drive via SATA. Which is damned annoying!
 
Old 01-29-2020, 10:23 AM   #19
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
You have about five different ways of specifying a partition these days.

1) Device names, optionally with a udev rule to keep them constant.
2) Filesystem UUIDs.
3) Your own labels, set with e2label.
4) GPT partition IDs (GUIDs).
5) GPT labels.

Don't any of these work for you?
 
Old 01-29-2020, 10:56 AM   #20
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Original Poster
Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by hazel View Post
You have about five different ways of specifying a partition these days.

1) Device names, optionally with a udev rule to keep them constant.
2) Filesystem UUIDs.
3) Your own labels, set with e2label.
4) GPT partition IDs (GUIDs).
5) GPT labels.

Don't any of these work for you?
I've only tried PARTUUID because I don't need to build an initrd in order to implement it, or so I read on the Internet. I use 'cgdisk' [Name] to change the LABEL on my GPT partitions.

Last edited by Exaga; 01-29-2020 at 11:22 AM. Reason: typo
 
Old 01-29-2020, 10:57 AM   #21
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Exaga View Post
It's just a shame I can't get the persistent naming to work because it seems that I will have to endure my devices exchanging IDs whenever I connect a new drive via SATA. Which is damned annoying!
So, persistent naming won't prevent /dev/sda from becoming /dev/sdc when different devices are plugged in. But when persistent naming is used in your fstab, it will make sure those drives are mounted in the correct location, regardless of whether they're /dev/sdb3 or /dev/sdf3

Now, your fstab looks fine, but I think part of your problem with persistent naming is your initrd. You put the root option in your stanza on your elilo.conf, but that is overridden by the root option that is specified when making your initrd. So, when using an initrd, the root= option in your stanza is ignored.

If you run the /usr/share/mkinitrd/mkinitrd_command_generator.sh command, it will spit out a long command. What you want to adjust is the -r option. You'll want to change the -r /dev/sdb4 to -r "PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8" and keep the rest of the command the same (unless you want to change the name of the output file at the end). Then make sure that initrd is copied to /boot/efi/EFI/Slackware/ and is referenced properly in your elilo.conf.

There is no need to rerun eliloconfig unless you want it to automatically copy your kernel and initrd from /boot to the correct location on your EFI partition and reset your elilo.conf. EFI is different than the older systems like lilo. lilo was required to be run after kernel updates or lilo.conf changes because it needed to let the BIOS know the direct location of those files, since the BIOS doesn't understand filesystems or partitions. It just says start booting this kernel that starts at this location on the harddrive. UEFI firmware is notified where the EFI stub is located (in a default Slackware system, it is /boot/efi/EFI/Slackware/elilo.efi) and then that is able to figure out everything from there, so as long as the efi stub doesn't change location you never need to update the UEFI firmware like you did with lilo.
 
1 members found this post helpful.
Old 01-29-2020, 11:09 AM   #22
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Original Poster
Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by bassmadrigal View Post
So, persistent naming won't prevent /dev/sda from becoming /dev/sdc when different devices are plugged in. But when persistent naming is used in your fstab, it will make sure those drives are mounted in the correct location, regardless of whether they're /dev/sdb3 or /dev/sdf3

Now, your fstab looks fine, but I think part of your problem with persistent naming is your initrd. You put the root option in your stanza on your elilo.conf, but that is overridden by the root option that is specified when making your initrd. So, when using an initrd, the root= option in your stanza is ignored.

If you run the /usr/share/mkinitrd/mkinitrd_command_generator.sh command, it will spit out a long command. What you want to adjust is the -r option. You'll want to change the -r /dev/sdb4 to -r "PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8" and keep the rest of the command the same (unless you want to change the name of the output file at the end). Then make sure that initrd is copied to /boot/efi/EFI/Slackware/ and is referenced properly in your elilo.conf.

There is no need to rerun eliloconfig unless you want it to automatically copy your kernel and initrd from /boot to the correct location on your EFI partition and reset your elilo.conf. EFI is different than the older systems like lilo. lilo was required to be run after kernel updates or lilo.conf changes because it needed to let the BIOS know the direct location of those files, since the BIOS doesn't understand filesystems or partitions. It just says start booting this kernel that starts at this location on the harddrive. UEFI firmware is notified where the EFI stub is located (in a default Slackware system, it is /boot/efi/EFI/Slackware/elilo.efi) and then that is able to figure out everything from there, so as long as the efi stub doesn't change location you never need to update the UEFI firmware like you did with lilo.
Can't thank you enough for this very astute reply. It's the precise information and answers that I was looking (and asking) for... and then some.

At some point in the very near future I will endevour to follow your advice and build an initrd. I have already read about this somewhere on the Internet (Slackdocs I think) but the guide was geared for 'lilo'. Now I know the principle is much the same I shall pursue it. Thanks very much!
 
Old 01-29-2020, 11:26 AM   #23
bifferos
Member
 
Registered: Jul 2009
Posts: 401

Rep: Reputation: 149Reputation: 149
Quote:
Originally Posted by hazel View Post
That's not quite true. You can always go into your UEFI at early boot time and configure it by hand
You posted this in another thread, and I wondered why I don't see UEFI shell as boot option, but I've come to the conclusion there's something wrong with my firmware. Just as some people get forcibly dumped into UEFI shell when they don't want to, I think it's the other way round for me, it's simply not there as an option.
 
Old 01-29-2020, 11:33 AM   #24
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by bifferos View Post
You posted this in another thread, and I wondered why I don't see UEFI shell as boot option, but I've come to the conclusion there's something wrong with my firmware. Just as some people get forcibly dumped into UEFI shell when they don't want to, I think it's the other way round for me, it's simply not there as an option.
EFI shell is a separate program and it's not always there by default. I don't have it on my machine either. But you can download it and put it on the EFI system partition, then create an option to boot into it.
 
1 members found this post helpful.
Old 01-29-2020, 12:07 PM   #25
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by Exaga View Post
My question is; what am I doing wrong, or not doing at all, which is still causing this device ID to change
Looks to me like you're using the wrong elements from blkid output.

For your own use, humanly memorable yet sufficiently unique volume labels are much more practical whether using MBR or UEFI tables. Try creating volume labels, then e.g. this for fstab:
Code:
#/dev/sda1
#PARTUUID=8e89f78b-88ef-42fd-9f2e-cf5278daf201 /home	ext4 defaults 1 2 # omit me
LABEL=wd1P01home	/home        ext4    defaults     1   2
#/dev/sdb1
#PARTUUID=7dfbd7c8-253d-400b-b9f6-59951e4bdfa2 /boot/efi vfat defaults 1 0 # omit me
LABEL=EVOP01ESP		/boot/efi    vfat    defaults     1   0
#/dev/sdb2
#PARTUUID=f343187e-28c6-4f5b-a70c-9d09b939b6a3 /boot	ext4 defaults 1 2 # omit me
LABEL=evoP02boot	/boot        ext4    defaults     1   2
#/dev/sdb3
#PARTUUID=a1ea22c1-99cd-4cce-a223-58d93513c19d swap	swap defaults 0 0 # omit me
LABEL=evoP03swap	swap         swap    defaults     0   0
#/dev/sdb4
#PARTUUID=7fdc1b32-70e8-42eb-a3a0-b24851c28fa8 /	ext4 defaults 1 1 # omit me
LABEL=evoP04root	/            ext4    defaults     1   1
#/dev/sdc1
#PARTUUID=5ef00b40-c0cd-4045-ac03-92d6199b2a41 /data	ext4 defaults 1 2 # omit me
LABEL=hgst1P01data	/data        ext4    defaults     1   2
and in /boot/efi/EFI/Slackware/elilo.conf
Code:
chooser=simple
delay=1
timeout=6
#
image=vmlinuz
        label=vmlinuz
        root=LABEL=evoP04root
        initrd=initrd.gz
        read-only
        append="vga=normal ro"
 
Old 01-29-2020, 12:13 PM   #26
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by bassmadrigal View Post
Now, your fstab looks fine, but I think part of your problem with persistent naming is your initrd. You put the root option in your stanza on your elilo.conf, but that is overridden by the root option that is specified when making your initrd. So, when using an initrd, the root= option in your stanza is ignored.
Slack must be different from other distros. In those I use, the root= contained in the initrd is a fallback which is overridden if the kernel cmdline contains one. AFAICT, there is no way for the grub configfile generator to not include a root= parameter, which makes the fallback in the initrd no more than bloat.
 
Old 01-29-2020, 12:20 PM   #27
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Original Poster
Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by mrmazda View Post
Looks to me like you're using the wrong elements from blkid output.

For your own use, humanly memorable yet sufficiently unique volume labels are much more practical whether using MBR or UEFI tables. Try creating volume labels, then
Thanks for the advice, but...

If I should ever connect a drive that has the same LABEL as an existing drive that's going to cause BIG trouble. That may be a possibility for me. Safer with PARTUUID I think. When I sort out an initrd, as bassmadrigal advised, that will be the telling point in all of this.
 
Old 01-29-2020, 12:20 PM   #28
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
[OT]A basic grub setup is way easier.[/OT]
 
Old 01-29-2020, 12:34 PM   #29
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,852
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by Exaga View Post
Thanks for the advice, but...

If I should ever connect a drive that has the same LABEL as an existing drive that's going to cause BIG trouble. That may be a possibility for me. Safer with PARTUUID I think.
The possibility is a big if here. Keyword was "sufficiently unique". I include the last 3 or 4 characters of the HD or SSD serial number as well as what I typed. Sometimes I leave out the P, sometimes I put the P# first, sometimes last, so uniqueness is quite sufficient.

If and when there is a conflict, you'll see so in a boot message, dmesg or journal. I've tested. IIRC mounts will be RO or fail entirely. The "trouble" need be no more than a temporary nuisance, until the duplication can be corrected.
 
Old 01-29-2020, 12:51 PM   #30
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by mrmazda View Post
Looks to me like you're using the wrong elements from blkid output.
There is nothing wrong with using PARTUUID. Labels can be easier for some, but like Exaga, I use similar or the same labels for hard drives when I replace them. I like the look better when I'm seeing it in file managers. And using UUID or PARTUUID is a one time configuration option I use. I don't need to reference them all the time, so it really doesn't matter which one I use, but using UUIDs in my case prevent issues if I happen to plug in an older drive that has the same label as its replacement.

Quote:
Originally Posted by mrmazda View Post
Slack must be different from other distros. In those I use, the root= contained in the initrd is a fallback which is overridden if the kernel cmdline contains one. AFAICT, there is no way for the grub configfile generator to not include a root= parameter, which makes the fallback in the initrd no more than bloat.
Maybe it depends on the bootloader. I remember the root= line not being honored when I was using an initrd with lilo and never really tried it any other time. Maybe it doesn't apply on other bootloaders or I was doing something wrong.
 
1 members found this post helpful.
  


Reply

Tags
efi, elilo, eliloconfig, slackware64-current, uefi



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
Slackware64 current UEFI Indiaum Slackware 8 01-16-2018 04:56 PM
Slackware64-current(>14.2): bug with UEFI install onto DELL Inspiron 14-3452 laptop ( eMMC 32GB drive ) from usb-stick image ckrzen Slackware - Installation 4 11-27-2016 08:24 AM
slackware64-current iso installed on UEFI machine ,but not showing on EFI section or at boot sinar.kk Slackware 34 02-04-2016 09:24 AM
Slackware64-14.1 UEFI - Booting with Secure Boot enabled turtleli Slackware 12 11-15-2015 08:43 AM
Updating from Slackware64-current to Slackware64 13. glore2002 Slackware 4 08-28-2009 06:50 PM

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

All times are GMT -5. The time now is 06:29 AM.

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