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:

Re: first steps with UEFI

Post by mimosa »

grub didn't work for me (I had to chroot into the installation and reinstall elilo). Could this be because my grub (from 14.1 repos) was too old?

I'm not inclined to try again, because it took me a good half an hour to fix - I'm just reporting it.
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: first steps with UEFI

Post by laprjns »

Give rEFInd boot manager a try then. I've made a package with a Salix theme. Here's a video of the package installation on a multi-boot VM in VirtualBox
https://youtu.be/sV_C-YW0HzE

Image

Package is here. http://people.salixos.org/laprjns/refind/0.10.2/
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

mimosa wrote:grub didn't work for me (I had to chroot into the installation and reinstall elilo). Could this be because my grub (from 14.1 repos) was too old?

I'm not inclined to try again, because it took me a good half an hour to fix - I'm just reporting it.
This is the grub which is working in salixlive-mate
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: first steps with UEFI

Post by mimosa »

So supposing I try either of those with a fresh installation of Salix alongside my existing one (which currently boots with elilo), what should I do during installation (which offers the choice of elilo, lilo, or nothing); and assuming I do want to start with elilo, how should I proceed before replacing it?

My understanding about the answer to the second question for grub is:

Code: Select all

sudo slapt-get -i --remove elilo
sudo mv /boot/efi/EFI/Salix/elilo.efi /boot/efi/EFI/Salix/elilo.efi_backup
sudo grubconfig
sudo update-grub
which is what I did before, but it wouldn't boot either as EFI, or legacy.

Just to complete the picture, I will mention I need to do a kernel upgrade to boot into X. That step will no longer apply when installing 14.2. I've been replacing the stock kernel, not keeping it, which saves on boot entries.

Uninstalling elilo removed the arch-specific .efi files, leaving behind elilo.conf and elilo.efi, and also of course vmlinuz, which I'd manually copied from /boot after that upgrade, deleting the old one.

One final point, instead of uninstalling elilo, would it be enough to rename some of its files? Which ones, perhaps just all those in /boot/efi/EFI/Salix? Then if anything should go wrong, it would be much easier to fix, and I'd feel more comfortable experimenting too.
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:So supposing I try either of those with a fresh installation of Salix alongside my existing one (which currently boots with elilo), what should I do during installation (which offers the choice of elilo, lilo, or nothing); and assuming I do want to start with elilo, how should I proceed before replacing it?
rEFInd is independent of the OS bootloader that get installed as default, so in the case of Salix, just let the installer install elilo. rEFINd will detect and present a boot menu item that will boot EFI/Salix/elilo.efi.

Also, no matter which you install, you going to need to change the Salix directory name in your ESP partition from "EFI/Salix" to something different, like "EFI/Salix_xfce" When elilo is installed, it want to name this directory "EFI/Salix" and will over write existing the existing directory with that name.
“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 »

When elilo is installed, it want to name this directory "EFI/Salix" and will over write existing the existing directory with that name.
I don't quite understand this part. I can see that would be useful as a backup, if experimenting with Grub; but surely when installing elilo, whether for the first Salix or multbooting two or more, it's going to detect all OSs, and so the new files overwriting EFI/Salix will still work, if booting from elilo?
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: first steps with UEFI

Post by djemos »

If someone has also windows installed, cannot use elilo to boot in windows or slackware. ELILO unlike LILO isn't a boot manager, so you have to install one. Your options are rEFInd, GRUB 2 and SYSLINUX 6.x.
rEFInd is a boot manager, meaning that it presents a menu of options to the user when the computer first starts up. rEFInd is not a boot loader, which is a program that loads an OS kernel and hands off control to it.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: first steps with UEFI

Post by mimosa »

I think light is beginning to dawn. So there is no point in writing a second stanza in elilo.conf, pointing at another partition; installing elilo during Salix installation will make that the only boot option, unless other steps are taken. Is this going to be the same in 14.2? Because that looks harder for anyone who wants to dual boot with Windows, for example, compared to Lilo.

So, I have two directories, EFI/Salix and EFI/Salix_sda5. In each directory, there is elilo.efi, which is identical to the file elilo-x86_64.efi. refind presents those as separate boot options (seeing double as it were) but if the duplciates are deleted, there are only two (one each) instead of four.

The next thing to try is uninstalling elilo, and installing grub, using the newer package djemos linked to above. But should I also uninstall refind first? Presumably, if so, it would in fact be sufficient just to rename the EFI/refind directory in order to temporarily take it out of commission.
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:So there is no point in writing a second stanza in elilo.conf, pointing at another partition;
elilo has very limited boot manger capabilities and cannot automatically detect boot loaders and present menu items as rEFInd and Grub 2 can. It also cannot load boot loaders that are outside of it directory, which eliminates booting Windows. So if you want to be able to multi-boot with elilo you would not only have to manually create stanza for each OS you also need install each operating systems kernel and initrd in the same directory, Using elilo as a boot manager is really only usefully if you want to boot different kernels with the same root file system or you want to have various boot options to pass to the kernel. If you recall back about a year or two, when dejmos was developing the Live versions of Salix, he used elilo as a boot manager to launch the various kernels and language combinations. I believe that he had over 30 stanza setup to boot the various combinations. He eventually switched over to Grub 2.
mimosa wrote:installing elilo during Salix installation will make that the only boot option, unless other steps are taken.
Yes, and those other steps are to either used the UEFI firmware boot manager (all UEFI system have this, you just need to know which key to press when you boot your system) or install a boot manger like rEFInd or Grub 2.
Is this going to be the same in 14.2?
Yup, as long as Slackware uses elilo as it UEFI boot loader.
Because that looks harder for anyone who wants to dual boot with Windows, for example, compared to Lilo
You still can use the UEFI boot manger to launch other installed OS or install a boot manager.
mimosa wrote:So, I have two directories, EFI/Salix and EFI/Salix_sda5. In each directory, there is elilo.efi, which is identical to the file elilo-x86_64.efi. refind presents those as separate boot options (seeing double as it were) but if the duplciates are deleted, there are only two (one each) instead of four.
rEFInd, in it default configuration, searches all the file systems on the system hard drive and present menu items for all files that ending in .efi. In your case it is finding the elilo.efi files in EFI/Salix and EFI/Salix_sda5 along with the elilo-x86_64.efi files in the /boot directory of your two root file system. I'm pretty sure that the elilo-x86_64.efi menu items will failed to boot because there is no elilo.conf in the /boot directories.
If your are getting these "double" entries, then you must have installed rEFInd from another source than my package, because I change the refind.conf file to ignore all .efi files in /boot directories. The configuration file that I included in my package only detects .efi in the ESP partition as I found that most others that it detects will not boot anyway.
mimosa wrote: But should I also uninstall refind first? Presumably, if so, it would in fact be sufficient just to rename the EFI/refind directory in order to temporarily take it out of commission.
There is no need to uninstall rEFInd. When the OS installer run elilo, or Grub 2 or even when installing rEFInd, they all run a program called efibootmgr which manages the boot options stored in the UEFI firmwares NVRAM. NVRAM holds pointers to all the register bootloaders along with the boot order. The two things that efibootmgr does when it is invoked is to register the new bootloader to the UEFI boot menu and sets the new boot loader as the first options which result in the newly installed OS to directly boot on the next system reboot. In effect it becomes the default boot option and make it appears that your other OS are not there. (On no!! I installed Ubuntu and now Window install is gone!). So you can keep rEFInd installed, it just will not be the first boot option. To check what OS are registered and what the boot option are run efibootmgr in a termina. efibootmgr does need efivars module loaded befor you can run it. Here is what mine looks like.

Code: Select all

rich[EFI]$ sudo modprobe efivars
rich[EFI]$ sudo efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0002,0005,0003,0007,000F,0008,0001,0012,0011
Boot0000* rEFInd Boot Manager
Boot0001* UEFI Shell
Boot0002* Salix_Xfce
Boot0003* Salix_Mate
Boot0005* Windows Boot Manager
Boot0007* Salix_OB
Boot0008* Slackware
Boot000F* ubuntu
Boot0011* UEFI: IP4 Realtek Ethernet Controller
Boot0012* UEFI: ADATA USB Flash Drive 1100
You can change the boot order using efibootmgr -o option. So If i wanted to have Windows as the first boot option i would do the following

Code: Select all

#efibootmgr -o 0005,0000,0002,0003,0007,000F,0008,0001,0012,0011
If your going to be setting up multi-boot UEFI system, then you need to get familiar with efibootmgr.
“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 »

In fact, the extra .efi files are present in /EFI/Salix as well as at the top level of /boot. This maybe the result of something odd I did earlier; in any case, the duplication is easily fixed by removing them.

Thanks for all the info - I will continue exploring!
Post Reply