Script that tells if the user has BIOS or UEFI

If you have any suggestions or ideas about improving Salix, here's the place to post them.
Post Reply
Envious
Posts: 15
Joined: 18. Sep 2012, 08:44

Script that tells if the user has BIOS or UEFI

Post by Envious »

Would it be easy to have a script that is run during the installation process that detects if the user is running BIOS or UEFI and chooses whether to install LILO (for BIOS) or eLILO (for UEFI) respectively?

Some distributions already do this during the install process as it makes life a hell of a lot easier for people with modern motherboards and means new users don't have to go to the trouble of finding out how to set their motherboard to legacy BIOS mode.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Script that tells if the user has BIOS or UEFI

Post by gapan »

Yes, that would be very nice to have. Can you point to such a script? I personally cannot create or test anything like it as I don't have any UEFI systems.
Image
Image
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Script that tells if the user has BIOS or UEFI

Post by gapan »

By searching the web, I think that only UEFI hardware can run certain UEFI-only programs. efibootmgr seems to be one of these. You can find packages here:
http://pnboy.pinguix.com/gapan/salix/efibootmgr/

Running this in a PC with a BIOS, only leads to an error. I can only assume that it will run with no errors in a PC with UEFI. Maybe that's a way to distinguish between the two.

For booting you probably need ELILO which you can get from here:
http://sourceforge.net/projects/elilo/

There are binaries for both 32bit and 64bit architectures inside their releases. But I have no idea if this works the same way as LILO does, if it uses the same format for config files etc and I have no way of testing any of it.

So if you have any such hardware, you can help with adding support for them.
Image
Image
Post Reply