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 12-25-2023, 11:02 PM   #1
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 106

Rep: Reputation: 55
Does Slackware's Installer work on UEFI?


I got a new laptop for Christmas that only supports UEFI, no legacy BIOS options. I have tried and failed a dozen times to get Slackware installed on it. I'm convinced the Slackware installer is defective when it comes to UEFI.

It sees the UEFI partition and offers to format it.
It says LILO won't work, and offers to skip LILO and go to ELILO install, but then it installs my mouse.

Never does it install elilo nor grub.
Also although it claims to make /etc/fstab entries, these never get written.

I tried manually mounting all the drives, and trying to run eliloconfig or to setup grub, but since the Slackware installer auto unmounts everything and apparently removes any chroots, the commands no longer exist on the install disk by the time you can get back to a shell.

Apparently I now have installed the install disk to UEFI, because all I can do is reboot into the install disk, over and over.

Does anyone know how to get a fresh install of Slackware onto a UEFI system and actually have it work?

Thanks in advance.
 
Old 12-25-2023, 11:27 PM   #2
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
I've gone through the install process a few times on an EFI system, the elilo install works for me. I have now gone 100% with grub.

This is what I do. I skip lilo and elilo. At the end of the installation, I exit to the shell. I then chroot to /mnt

Once chroot'd I then run

'grub-install /dev/sda' (substitute your device)
'grub-mkconfig -o /boot/grub/grub.cfg'

Then reboot. Works for me at least. Just did this yesterday.

Note: you will need to turn of secure boot if you can.

I yet to deal with secure boot and signing of kernels.

Edit: The Slackware installer does not even try to install grub, you have to do it manually as I described above. What works for me, may not work for you.

Last edited by chrisretusn; 12-26-2023 at 05:25 AM.
 
Old 12-25-2023, 11:48 PM   #3
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 663

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Quote:
Originally Posted by BradReed View Post
I got a new laptop for Christmas that only supports UEFI, no legacy BIOS options. I have tried and failed a dozen times to get Slackware installed on it. I'm convinced the Slackware installer is defective when it comes to UEFI.

It sees the UEFI partition and offers to format it.
It says LILO won't work, and offers to skip LILO and go to ELILO install, but then it installs my mouse.

Never does it install elilo nor grub.
Also although it claims to make /etc/fstab entries, these never get written.

I tried manually mounting all the drives, and trying to run eliloconfig or to setup grub, but since the Slackware installer auto unmounts everything and apparently removes any chroots, the commands no longer exist on the install disk by the time you can get back to a shell.

Apparently I now have installed the install disk to UEFI, because all I can do is reboot into the install disk, over and over.

Does anyone know how to get a fresh install of Slackware onto a UEFI system and actually have it work?

Thanks in advance.
https://youtu.be/OZeJd5JPQro?si=prAqQFYI1RXbFThV everything you need is in this video
 
Old 12-25-2023, 11:50 PM   #4
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 336

Rep: Reputation: Disabled
Quote:
Originally Posted by BradReed View Post
Never does it install elilo nor grub.
Also although it claims to make /etc/fstab entries, these never get written.
Since your fstab doesn't get amended, I can not help wondering whether you have told the installer to format the relevant partition(s).

Further if the install fails, when you try again, get the installer to do a slow format of the target, root, partition.

I would also check the partition table when going through the install process.

Quote:
Does anyone know how to get a fresh install of Slackware onto a UEFI system and actually have it work?
My UEFI Slackware desktop works nicely for me. I just basically followed the prompts.

To digress slightly. I own a laptop (now a brick) which, according to the BIOS, doesn't have a primary HDD and no distro that I tried would install to the, BIOS, secondary HDD. So details of your laptop would be appreciated. (Make and model, etc)

ps This thread could probably sit nicely install the Slackware install lounge.
 
Old 12-25-2023, 11:58 PM   #5
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
This start makes me wonder if you have a gpt partition table.
 
Old 12-26-2023, 12:15 AM   #6
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 106

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by chrisretusn View Post
This is what I do. I skip lilo and elilo. At the end of the installation, I exit to the shell. I then chroot to /mnt

Once chroot'd I then run

'grub-install /dev/sda' (substitute your device)
'grub-mkconfig -o /boot/grub/grub.cfg'

Then reboot. Works for me at least. Just did this yesterday.
Thanks for the suggestions!

I re-ran the install, exited out to shell, chrooted /mnt.

grub-install --target=x86_64-efi /dev/nvme0n1p1 complained it couldn't find the EFI directory, but If I mounted it, there was an EFI directory. For the fun of it, I cd-ed into that /EFI/BOOT dir and ran the make-grub.sh script in it, which seems to have made a newer bootx64.efi file.

"grub-mkconfig -o /boot/grub/grub.cfg" did not work at all for me. In the chroot it complained grub-probe: error: cannot find device for / (is /dev mounted?)
If I exited the chroot, it errored with: grub-mkconfig: line 52: /usr/share/grub/grub-mkconfig_lib: No such file or directory.

Too much fun. :-) I'll try rebooting into this new bootx64.efi file. Thanks.

Edit: And I'm back in the Slackware install disk.

Last edited by BradReed; 12-26-2023 at 12:17 AM.
 
Old 12-26-2023, 12:26 AM   #7
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 106

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by Tonus View Post
This start makes me wonder if you have a gpt partition table.
both fdisk and cfdisk says it is a gpt partition table.
/dev/nvme0n1 1.86TiB,

4 partitions
/dev/nvme0n1p1 240M EFI System
/dev/nvme0n1p2 32GB Linux swap
/dev/nvme0n1p3 200G Linux filesystem
/dev/nvme0n1p4 1.6T Linux filesystem
 
Old 12-26-2023, 12:37 AM   #8
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 106

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by quickbreakfast View Post
Since your fstab doesn't get amended, I can not help wondering whether you have told the installer to format the relevant partition(s).

Further if the install fails, when you try again, get the installer to do a slow format of the target, root, partition.
As I have gone through the install about a dozen times, I have tried reformatting, and also tried not reformatting, to save time installing all the packages again.


Quote:
Originally Posted by quickbreakfast View Post
So details of your laptop would be appreciated. (Make and model, etc)
It is a Dell XPS 15 9530. It is slightly annoying as it only has USB C type USB ports, so I have had to use adapters to connect my older USB thumb drives to the USB C ports for the install. The Bios identifies as version 1.8 and fortunately, once Safe Boot was disabled, the install USBs are seen in the bios and it allows me to boot to them.
 
Old 12-26-2023, 03:43 AM   #9
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493
A couple of thoughts.

There is no need to reinstall all the packages time after time. They were on the disk already the first time. Next time you could have skipped formatting disk and installing packages.

Quote:
Apparently I now have installed the install disk to UEFI, because all I can do is reboot into the install disk, over and over.
Have you tried to remove the install stick and to reboot without it?
If it doesn't work, you maybe only miss the boot loader.

-Boot the usb stick. When the boot: prompt comes, you can read the info on the screen. It tells you can boot to your installed system by typing to the 'boot:' prompt:
Code:
huge.s root=/dev/nvme0n1p3 initrd= ro
if your root file system is /dev/nvme0n1p3. Or is it /dev/nvme0n1p4 ?
If your new system now works, you can remove the usb stick and install grub next, so you don't need the usb stick to boot.

-If it didn't work, boot from the usb stick and press enter to start the installer system. Don't run setup. Mount and chroot:
Code:
mount /dev/nvme0n1p3 /mnt      # or is it /dev/nvme0n1p4 ?
mount /dev/nvme0n1p1 /mnt/boot/efi
mkbindmounts
chroot /mnt
Then remove the usb stick and install grub. (mkbindmounts takes care of mounting dev proc sys)

Quote:
Originally Posted by BradReed View Post
Also although it claims to make /etc/fstab entries, these never get written.
How do you know? Did you look at file /etc/fstab of the installer or of the installed system on the disk?

Last edited by Petri Kaukasoina; 12-26-2023 at 06:14 AM.
 
Old 12-26-2023, 06:41 AM   #10
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 663

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Quote:
Originally Posted by BradReed View Post
grub-install --target=x86_64-efi /dev/nvme0n1p1 complained it couldn't find the EFI directory,
This command is NOT for UEFI systems.
For UEFI chroot again and try this
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
if that fail just try again in the same chroot like this
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --removable
and then just update grub
Code:
grub-mkconfig -o /boot/grub/grub.cfg
 
Old 12-26-2023, 08:19 AM   #11
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108Reputation: 4108
Some threads I've bookmarked, they may be useful

lilo, elilo, grub, refind, etc, etc
https://www.linuxquestions.org/quest...tc-4175699913/

EFI partition
https://www.linuxquestions.org/quest...on-4175699303/
 
Old 12-26-2023, 08:47 AM   #12
chud1950
Member
 
Registered: Jan 2008
Posts: 49

Rep: Reputation: 4
When i installed slack15 on my hardware I couldn't get elilo to work, so i used grub instead.
I needed to create a BIOS boot partition at the start of my partitions.
My partitions look like this:

Number Start (sector) End (sector) Size Code Name
1 2048 22527 10.0 MiB EF02 BIOS boot partition
2 22528 1251327 600.0 MiB EF00 EFI System
3 1251328 34805759 16.0 GiB 8200 Linux swap
4 34805760 7814037134 3.6 TiB 8300 Linux filesystem

My notes say I used the following to install grub:
# grub-install --modules=part_gpt /dev/sda <<< slack15 is on /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
 
Old 12-26-2023, 09:22 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,364

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
the efi partition needs to be formatted fat32 and mounted at /boot/efi

Last edited by colorpurple21859; 12-26-2023 at 09:25 AM.
 
1 members found this post helpful.
Old 12-26-2023, 11:40 AM   #14
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 106

Original Poster
Rep: Reputation: 55
Thanks to all the replies and suggestions I finally got a system that will boot up to a login prompt and not the installer.

When the Slackware installer found the EFI directory and offered to format it and make the /etc/fstab entry, it created a line like this:

/dev/nvme0n1p1 ESP /boot/efi vfat (rest skipped)

But when I would try to install grub I would get the error:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

EFI variables are not supported on this system
EFI variables are not supported on this system
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.

Why is that ESP being inserted in /etc/fstab? I removed the ESP and the drive mounted without errors.
 
Old 12-26-2023, 12:23 PM   #15
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 786

Rep: Reputation: 250Reputation: 250Reputation: 250
Make sure the efivarsfs is mounted and it is read-write. Grub can't do much without it as far as EFI goes. The efivarsfs should be set up in rc.S.
Code:
mount -o rw -t efivarfs none /sys/firmware/efi/efivars
You should see stuff under /sys/firmware/efi/efivars. The ESP is supposed to be in fstab. When you install Grub initially, it will write into it.
Code:
ls -l /boot/efi/EFI/slackware-15.0+/
total 136
-rwxr-xr-x 1 root root 139264 Apr 10  2023 grubx64.efi*
This system came installed with Windows-whatever, which already had an ESP so I used that.
 
1 members found this post helpful.
  


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
UEFI Class 3 :: To use UEFI, or not to use UEFI? jheengut Slackware 19 12-30-2020 09:24 AM
Start Slackware installer without disabling UEFI Secure Boot first? average_user Slackware 37 09-23-2020 06:05 PM
UEFI boot support in the slackware installer rkelsen Slackware 13 03-16-2013 07:58 AM
Help Creating UEFI A MENU For My Bootable (BIOS/UEFI) CDROM ssenuta Linux - Hardware 0 08-27-2012 09:11 PM

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

All times are GMT -5. The time now is 09:02 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