LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Does Slackware's Installer work on UEFI? (https://www.linuxquestions.org/questions/slackware-14/does-slackwares-installer-work-on-uefi-4175732144/)

BradReed 12-25-2023 11:02 PM

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.

chrisretusn 12-25-2023 11:27 PM

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.

rizitis 12-25-2023 11:48 PM

Quote:

Originally Posted by BradReed (Post 6472690)
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

quickbreakfast 12-25-2023 11:50 PM

Quote:

Originally Posted by BradReed (Post 6472690)
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.

Tonus 12-25-2023 11:58 PM

This start makes me wonder if you have a gpt partition table.

BradReed 12-26-2023 12:15 AM

Quote:

Originally Posted by chrisretusn (Post 6472694)
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.

BradReed 12-26-2023 12:26 AM

Quote:

Originally Posted by Tonus (Post 6472700)
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

BradReed 12-26-2023 12:37 AM

Quote:

Originally Posted by quickbreakfast (Post 6472698)
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 (Post 6472698)
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.

Petri Kaukasoina 12-26-2023 03:43 AM

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 (Post 6472690)
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?

rizitis 12-26-2023 06:41 AM

Quote:

Originally Posted by BradReed (Post 6472702)
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

marav 12-26-2023 08:19 AM

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/

chud1950 12-26-2023 08:47 AM

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

colorpurple21859 12-26-2023 09:22 AM

the efi partition needs to be formatted fat32 and mounted at /boot/efi

BradReed 12-26-2023 11:40 AM

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.

jayjwa 12-26-2023 12:23 PM

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.


All times are GMT -5. The time now is 10:33 AM.