LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware on UEFI (https://www.linuxquestions.org/questions/slackware-14/slackware-on-uefi-4175448945/)

SlackWar 07-28-2014 06:08 AM

Quote:

Originally Posted by Goobers (Post 5210696)
edit: chances are good... your option to bring up the menu... is F10.

OMG... it was F11 - thanks, now it does make some sense. I'll try that rEFInd in my free time, anyway.

Goobers 07-28-2014 06:55 AM

Quote:

Originally Posted by SlackWar (Post 5210698)
OMG... it was F11 - thanks, now it does make some sense. I'll try that rEFInd in my free time, anyway.

Explains a bit to me too... I thought the (F11) boot menu was what you were trying to avoid... Not realizing until the previous post that you actually meant digging through BIOS (Delete).

jtsn 07-28-2014 07:51 AM

Quote:

Originally Posted by Erik_FL (Post 5210538)
If I'm not mistaken, Intel was responsible for the EFI standard that morphed into UEFI. So, really Intel invented UEFI.

"Wintel" developed EFI to boot Windows on Intel Itanium. The distinction between Microsoft and Intel makes no sense in this context.

Quote:

UEFI is not a 64-bit MSDOS. MSDOS uses the BIOS for I/O and thus can boot anything supported by BIOS extension ROMS. The low-level drivers for MSDOS are in the BIOS. UEFI cannot use BIOS extension ROMS found in older hardware.
Actually it can use them and it does. Without "Legagy ROMs" supported by a "compatibility support module" (CSM) most PCs manufactured in the past years won't boot at all. Of course there is also a new EFI ROM format containing EFI device drivers which must be signed by Microsoft, this is not in wide use yet.

Quote:

UEFI does not provide a mechanism for boot sector loading
UEFI is already a typical single-tasking Disk Operating System on its own and it looks like it has been developed by Microsoft. So the moniker "MS-DOS" fits perfectly. Unlike a traditional 16 bit BIOS UEFI depends on using a disk, the "EFI system partition" is stored on the hard drive.

Quote:

Why did Microsoft choose not to support adding standard EFI programs to the Windows boot menu?
The Windows boot selector is only intended to select a Windows installation to boot. Also this would compromise "Secure Boot".
Quote:

In addition, the Microsoft boot loader resets the firmware boot options to boot the Windows boot loader, ignoring the user's preferred boot order set in the firmware. People should not be forced to rename their boot loader to "/efi/microsoft/boot/bootmgfw.efi" in order to use an alternative boot loader.
Just set a new firmware default using BCDEDIT.

dr.s 07-28-2014 01:36 PM

Quote:

Originally Posted by SlackWar
So having 2 different boot managers installed already - I'll need 3rd one, for my 2 OS-es?
...
You just answered, what the difference is: less "tapping" and shorter waiting time, while selecting the desired OS. Having functional boot-manager I just need to hit "Enter" (or nothing at all, just wait 3 seconds) - or "Down", then "Enter" (to boot Windows).

Maybe I'm missing something (I have this mobo only 2nd day). Yes, I've got in setup the selections, which I can use - well the problem is, that there doesn't show up any boot-menu when starting the machine. I have to enter the setup with "Delete", then dig into proper menu, switch the boot option, "Save and Exit"... really cumbersome.
...
OMG... it was F11 - thanks, now it does make some sense. I'll try that rEFInd in my free time, anyway.

Goobers provided an excellent and detailed answer but let me add this. You can bypass the F11 boot menu altogether (F9/F12 on different machines here) once you install rEFInd or Grub2 (I use Grub2). Trying to do this through the bios is a bit tortuous!
You'll need to correctly create the new efi file entry and set the desired boot order, then you'll be dealing with just one menu. No keystrokes needed here when I'm booting slackware, lots of keystrokes though to get to Windows since it's near the bottom of my menu :D
See the sample commands below (create, list, set boot order).
Code:

# efibootmgr -c -d /dev/sda -p 2 -l \\EFI\\grub\\grubx64.efi -L Grub2
# efibootmgr -v
# efibootmgr -o 2,0,1


Erik_FL 07-28-2014 02:00 PM

Quote:

Originally Posted by jtsn (Post 5210735)
"Wintel" developed EFI to boot Windows on Intel Itanium. The distinction between Microsoft and Intel makes no sense in this context.

Your point has some merit, considering that Microsoft controls licensing of the FAT file-system used in UEFI. However, Intel officially claims the intellectual rights to EFI. Of course, UEFI pretends to be an open standard, which I think is worse than no standard, because companies then use proprietary methods and call them a stadard.


Quote:

Originally Posted by jtsn (Post 5210735)
Actually it can use them and it does. Without "Legagy ROMs" supported by a "compatibility support module" (CSM) most PCs manufactured in the past years won't boot at all. Of course there is also a new EFI ROM format containing EFI device drivers which must be signed by Microsoft, this is not in wide use yet.

I expect compatibility support to be gone just as soon as computer retailers feel they can get away with removing that. The reality is we're moving closer and closer to a Windows only PC. I suspect that we will eventually have to buy "Linux" PCs separately from Windows PCs.

Quote:

Originally Posted by jtsn (Post 5210735)
UEFI is already a typical single-tasking Disk Operating System on its own and it looks like it has been developed by Microsoft. So the moniker "MS-DOS" fits perfectly. Unlike a traditional 16 bit BIOS UEFI depends on using a disk, the "EFI system partition" is stored on the hard drive.

If UEFI is an MS-DOS, it is a poor replacement. For example it does not even read the ISO 9660 file-system on a CD or DVD. It only can read the FAT32 EFI partition stored in an El-Torito boot record of an optical disc. When I see people providing utilities to set disk parameters and flash firmware running on UEFI instead of MS-DOS then I will believe that UEFI has really become as functional as MS-DOS and BIOS. So far companies seem to be implementing what they like of UEFI and leaving out whatever they feel is inconvenient or unprofitable.


Quote:

Originally Posted by jtsn (Post 5210735)
The Windows boot selector is only intended to select a Windows installation to boot. Also this would compromise "Secure Boot".

Just set a new firmware default using BCDEDIT.

How does allowing a user to choose to boot what they want compromise secure boot? Couldn't the boot manager allow users to install certificates for what they want to boot, just like the certificates for the Windows boot manager? Security is always the excuse for taking away liberty.

People have tried to make the Windows boot manager respect the firmware default with mixed results. In some cases Windows re-installs itself as the firmware default (or the computer UEFI firmware does that). This is another case where nobody knows whom to blame because both Microsoft and computer manufacturers don't document exactly how their software works.

I will admit that I have not used UEFI yet. The only computer that I got with UEFI would not boot Windows 7 in UEFI mode. It came with Windows 8 (I would have chosen Windows 7 if that was allowed). The computer retailer was not interested in helping me at all. So, I changed it to use BIOS booting and the BIOS firmware.

To end on a positive note, although we disagree about some things, you obviously have well thought out opinions and persuasive arguments. I tend to be a skeptic. When I don't have a lot of information I sometimes take contrary positions just to hear the opposite side of the story.

I've been writing software in the computer industry since 1978, and dealing with "standards" and the reality of how they are actually implemented by commercial interests. A classic example is the RS232 standard. IBM and other large companies implemented that standard however they chose and basically left it up to the small fish to figure out how to deal with it.

I am very concerned about whether retail computer hardware will continue to be Linux friendly. It will boil down to whether hardware and software developers will provide Linux drivers or release the information needed for open source developers to write their own drivers. Actually, I'm even concerned about how well new computers will continue to support Windows 7. MIcrosoft obviously wants to sell Windows 8 and computer retailers don't like supporting anything but what they are currently selling (if even that).

Didier Spaier 07-28-2014 02:25 PM

FYI Fedora is now shipping in (at least some of) its ISO images a file BOOTX64.EFI in addition to grubx64.efi. According to Peter Jones on IRC, " BOOTX64.EFI isn't grub; it's shim [...] our boot media works on macs as well as newer non-Mac UEFI machines that can use Secure Boot, and that's what shim helps with."

Ref. https://github.com/mjg59/shim

(I have hard time trying to make Slint hybrid ISO images Mac-compatible using "isohybrid -u -m" and won't try to add this shim stuff at the moment though ;) )

jtsn 07-28-2014 05:13 PM

Quote:

Originally Posted by Erik_FL (Post 5210885)
I expect compatibility support to be gone just as soon as computer retailers feel they can get away with removing that. The reality is we're moving closer and closer to a Windows only PC.

The CSM is also required to boot Windows, if you have an add-on graphics card installed.

Quote:

I suspect that we will eventually have to buy "Linux" PCs separately from Windows PCs.
This is already in effect. You can buy a 19" x86-based rack server, which is designed to run Linux, or you can buy a notebook PC, which is supposed to run Windows. Or you can get your Linux-based ARM development boards...

Quote:

Originally Posted by Didier Spanier
According to Peter Jones on IRC, " BOOTX64.EFI isn't grub; it's shim

And this Shim is signed by Microsoft, so it is compatible with "Secure Boot" enabled.

Goobers 07-28-2014 09:32 PM

dr.s, does grub2 check the efi partition? is it independent of the distro of linux it was installed with?

in my laptop, I have win8.1 in one SSD drive. a single 1 tb drive for storage. Then I added two mSATA drives, one of which got Slack. the other might get "hackintosh." suffice it to say, linux and windows have pretty much nothing to do with each other... kill one by wiping the partition (not necessarily drive, since the efi is partition next to the windows partition on the same drive) and the other wouldn't bat an eye.

I know that, in the past, prior to uefi, i had to set up chainloading, even if the OSes were on different drives... and wiping out one OS (down to erasing the partition), could potentially kill the other.

I guess my question is... would grub2 still run if you killed the linux partition via say... mistaken fdisk command (assuming only one distro of linux is installed).

edit: nevermind... found the answer... because grub2 can be installed in one of two ways, completely with support files in ESP or split with support files in the linux partition. so, if it's completely in esp, it won't be too bad if linux gets killed.

Erik_FL 07-28-2014 11:00 PM

Quote:

Originally Posted by Goobers (Post 5211078)
edit: nevermind... found the answer... because grub2 can be installed in one of two ways, completely with support files in ESP or split with support files in the linux partition. so, if it's completely in esp, it won't be too bad if linux gets killed.

That is one of the things I like about GRUB2. What I dislike is the complicated way that it creates the boot menu and configuration file. If you don't care about customizing the boot menu it is fine.

GRUB2 is the only UEFI boot loader that I know of where you can put most of the boot loader in some partition other than the EFI system partition. Most of the UEFI boot loaders require the boot configuration, boot loader software and sometimes the kernel being booted to all be in the EFI system partition. ELILO, for example, requires the Linux kernel and initrd files to be in the EFI system partition. I think that Windows requires the boot loader software and boot configuration database to be in the EFI system partition, though "WINLOAD.EFI" and other Windows files can be in a separate Windows partition.

If you use GRUB2 to create your own UEFI compatible boot CDs or DVDs, watch out, because in that case some of the grub files can't be in the EFI system partition (on the CD/DVD). Those grub files have to be in the ISO9660 file system part of the CD/DVD. That's because grub can't access EFI system partitions on optical discs even though EFI can. EFI sees and uses the EFI system partition on a CD/DVD rather than the ISO9660 file system. The EFI system partition on a CD/DVD is a special El-Torito "no emulation" image containing just the FAT file system for an EFI system partition (with no partition table). This is one of the weirder things about the EFI standard, because it allows (and requires) partitioned CDs that use the El-Torito headers instead of a partition table to denote partitions. Normally it is expected that there will only be one "partition" on an optical disc and that will be the default EFI system partition.

Using the grub scripts to create an optical boot disc should create the required El-Torito and ISO9660 sections of the disc with the correct files. Usually, the only thing in the EFI system partition of the optical disc is the "EFI\BOOT\BOOTX64.EFI" file which contains the grub kernel image.

You might also want to download an EFI command shell compatible with your computer's UEFI firmware version. Then add the EFI command shell to the grub and/or firmware boot menu. The EFI command shell will let you set firmware variables, list files and look at the devices detected by the UEFI firmware. Although computer manufacturers don't always supply the command shell, it can be downloaded or built from the UEFI open source. Even if the version isn't exactly the same as the firmware it will often still work.

dr.s 07-28-2014 11:04 PM

Quote:

Originally Posted by Goobers (Post 5211078)
dr.s, does grub2 check the efi partition? is it independent of the distro of linux it was installed with?

in my laptop, I have win8.1 in one SSD drive. a single 1 tb drive for storage. Then I added two mSATA drives, one of which got Slack. the other might get "hackintosh." suffice it to say, linux and windows have pretty much nothing to do with each other... kill one by wiping the partition (not necessarily drive, since the efi is partition next to the windows partition on the same drive) and the other wouldn't bat an eye.

I know that, in the past, prior to uefi, i had to set up chainloading, even if the OSes were on different drives... and wiping out one OS (down to erasing the partition), could potentially kill the other.

I guess my question is... would grub2 still run if you killed the linux partition via say... mistaken fdisk command (assuming only one distro of linux is installed).

edit: nevermind... found the answer... because grub2 can be installed in one of two ways, completely with support files in ESP or split with support files in the linux partition. so, if it's completely in esp, it won't be too bad if linux gets killed.

Yes Grub2 is independent, assuming you're using GPT of course and installing Grub2 to the EFI system partition. You install it once, then just manually edit the menu entries in the config file as needed, I do this when playing around with a new release/distro or even to boot an ISO image directly.

Goobers 07-29-2014 02:12 AM

I'll be honest... I think rEFInd is prettier... I'd probably go with that (over grub2).:D

mscole 10-10-2014 04:27 AM

This thread has become unwieldy. Where do we stand at this point? I would like to buy a new machine and dual boot Slack and Windows, not because I am keen to run Windows, but because I need it for some things for my job. Last year I bought a used computer (built in 2007)with Win 7 that I am dual booting with Slack 14.1, but I would like something with a little more horsepower. However, I would rather stick with what I have for now than buy a lot of headaches. Any thoughts? Mike.

Didier Spaier 10-10-2014 04:54 AM

Quote:

Originally Posted by mscole (Post 5251822)
This thread has become unwieldy.

Open your own thread then, stating exactly what you plan to do and what are your questions.

mscole 10-10-2014 05:54 AM

Sorry, just trying to follow the protocol of not starting a new thread when one already exists.

Didier Spaier 10-10-2014 06:29 AM

Quote:

Originally Posted by mscole (Post 5251845)
Sorry, just trying to follow the protocol of not starting a new thread when one already exists.

I assume that such a "protocol" can be relevant only if you are sure that your issue is exactly the same as the topic of the existing thread. But that's only MHO, of course ;)


All times are GMT -5. The time now is 09:16 AM.