Page 1 of 1

Script that tells if the user has BIOS or UEFI

Posted: 18. Sep 2012, 08:52
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.

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

Posted: 20. Sep 2012, 14:06
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.

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

Posted: 29. Sep 2012, 09:26
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.