first steps with UEFI

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

first steps with UEFI

Post by mimosa »

I just bought a small SSD to try out UEFI with my newish computer.

Using Gparted, I created a GPT partition table; a first, FAT32 bootable EFI partition (128 MB); other Linux partitions for the installation - using the Salix 14.1 XFCE image dd'd onto USB. I entered BIOS to tell it to boot in UEFI mode rather than legacy.

The installation appeared to be successful (with the EFI partition mounted as /boot/efi in fstab), but when I tried to boot it, I was dumped in a UEFI shell.

This is a machine with a temperamental BIOS, so that might have something to do with it, but I wonder if the partitioning I did sounds right to those with more experience of EFI? Or is there something else I've forgotten?
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

EFI partition has to be FAT 32 formatted and at least 300MB in size to be able to boot. This is clearly said in live-mate 14.1 announcement.
If it is FAT16 then can be less than 300MB.
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: first steps with UEFI

Post by laprjns »

mimosa wrote: The installation appeared to be successful (with the EFI partition mounted as /boot/efi in fstab), but when I tried to boot it, I was dumped in a UEFI shell.
Did elilo run at the end of the installation? From experience with my efi system, booting into the UEFI shell is usually the last boot option. So either your efi firmware is not recognizing the 128M ESP or there was a problem with installing elilo. Can you get into the UEFI boot manger menu? if so is there and option
As dejmos said it more likely that your ESP is too small. Its my understanding that all SSD are formatted 4K sectors which require FAT32 partition to be a minimum of 260MB due to the limitation of the FAT32 file format.

See the excellent Arch wiki on this; wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: first steps with UEFI

Post by mimosa »

Thanks djemos, that got me over that hurdle.

The next thing is I need to do a kernel upgrade. I see from a recent thread that the new vmlinuz needs to be copied to /efi/boot. Presumably I will also need to edit /etc/elilo.conf, and do

Code: Select all

sudo elilo -v
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

you can also install grub and just run

Code: Select all

sudo grubconfig
And when upgrade kernel can run

Code: Select all

sudo update-grub
Another benefit is that you can install new kernel with sudo installpkg kernel-xxx and run update-grub and can boot in either kernel.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: first steps with UEFI

Post by mimosa »

That seemed to work okay, but on reboot, Elilo still booted. It doesn't matter though - I can boot.

Code: Select all

mimosa[~]$ sudo grubconfig
mimosa[~]$ sudo update-grub
Generating grub.cfg ...
Found background: /boot/grub/salix.png
Found linux image: /boot/vmlinuz-huge-4.4.4
Found linux image: /boot/vmlinuz-huge
  No volume groups found
Found ELILO Boot Manager on /dev/sda1@/EFI/Salix/elilo.efi
ELILO Boot Manager is not yet supported by grub-mkconfig.
Found Slackware Linux (Slackware 14.1) on /dev/sda2
done
Found Windows (loader) on UEFI ESP
There doesn't seem to be an "elilo -v" command; I just copied the new kernel into place in the /boot/efi/EFI/Salix directory, and it booted. The current kernel gives me X, although there are stil a few kinks - not UEFI-related, though, I don't think, so I won't go into them here.

laprjns, thanks for that link, which I shall study at leisure.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: first steps with UEFI

Post by gapan »

Correct. You don't have to run elilo, as you would run lilo to reinstall it to MBR. Just copy the kernel in your /boot/efi/EFI/Salix/
Image
Image
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

@mimosa: grub finds elilo and use elilo to boot. If grub is installed elilo has to be removed. Cannot have both.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: first steps with UEFI

Post by mimosa »

Ah, I see! I'll try that when I do the next one - because there are two partitions waiting for Salix 14.2, when it is Alpha. In that case, does grub still need any of the things that are in /boot/efi/EFI/Salix ?

Regarding the partitioning, perhaps the installer's cfdisk would have been fine, but I did it in advance using Gparted. The more recent version available in Slackware current repos coped better with the efi aspect (you need dosfstools as well). The first time round, I had to make some corrections using cfdisk.

In line with what laprjns said, a 260 MB ESP partition worked well.

One of my attempts was using Salix 14.1 Mate Live, and it's off-topic here, but I will just mention that install-on-usb.sh threw an error because syslinux wasn't present in whichever system I was using to create the stick (probably the fresh Salix 14.1 installation I had just created on my previous attempt). However, everything still seemed to work, perhaps because I was booting the stick in EFI mode anyway.

Unfortunately I haven't been able to try out the Live Installer, because my hardware requires a kernel upgrade, and I ended up just using the new Slackware Live for partitioning and installing from a standard xfce installation image.
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

mimosa wrote:Ah, I see! I'll try that when I do the next one - because there are two partitions waiting for Salix 14.2, when it is Alpha. In that case, does grub still need any of the things that are in /boot/efi/EFI/Salix ?
No you have to delete the elilo.efi from /boot/efi/EFI/Salix/ if not removed when uninstall elilo.
gubconfig will do everything. No need to do something else.
Regarding the partitioning, perhaps the installer's cfdisk would have been fine, but I did it in advance using Gparted. The more recent version available in Slackware current repos coped better with the efi aspect (you need dosfstools as well). The first time round, I had to make some corrections using cfdisk.

In line with what laprjns said, a 260 MB ESP partition worked well.
Mine is 511 MB. If you have many operating systems installed then size have to be bigger.
One of my attempts was using Salix 14.1 Mate Live, and it's off-topic here, but I will just mention that install-on-usb.sh threw an error because syslinux wasn't present in whichever system I was using to create the stick (probably the fresh Salix 14.1 installation I had just created on my previous attempt). However, everything still seemed to work, perhaps because I was booting the stick in EFI mode anyway.
Yes. But always can install syslinux with slapt-get if it is not installed and run install-on-usb.sh for 32bit or for 64bit on msdos partitions without efi.
Unfortunately I haven't been able to try out the Live Installer, because my hardware requires a kernel upgrade, and I ended up just using the new Slackware Live for partitioning and installing from a standard xfce installation image.
I have installed salix-mate in a partition of my laptop using the live-installer in EFI, without any problem. And i used it for everyday use and also test mate 1.12. I have build the packages for slackware 14.2 and are here. Some packages have been replaced (renamed) by others. mate github
Post Reply