[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to get rid of M10



On Wed, Aug 10, 2016 at 12:19 AM Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
Le 09/08/2016 à 15:35, Mark Fletcher a écrit :

> The Debian install media can boot and/or install in UEFI or legacy BIOS
> ("MBR") mode.

BIOS, legacy or CSM mode. MBR is only the disk sector. EFI boot also
uses an MBR. It just does not use the BIOS boot loader inside.


Sorry, I didn't invent the terminology. The fact is a large body of e-literature that anyone following this discussion after the event will find on the web refers to the alternative to EFI boot as "MBR" boot (with or without quotes). Failing to acknowledge that in the name of precision will only make it harder for others to relate what we are saying here to other information they will find on the web. This comes from experience as I was just in this position myself a couple of months ago.
 
> 1) UEFI boot works best (only?) with a GPT partition table.

Not only.
Compliant UEFI firmwares should boot equally well with MSDOS or GPT.
But, as I wrote, some firmwares are broken.
Windows requires GPT for EFI boot and MSDOS for legacy boot. Linux,
GRUB... don't.

Right, that rings a bell.
 
> 2) The partition table layout needs to be right for UEFI, and what works
> for an MBR boot won't work for UEFI.

I'm not sure I understand what you mean.
Legacy and EFI boot have different requirements (legacy needs a boot
loader in the MBR, EFI needs a boot loader in the EFI system partition),
but they are not incompatible, so it is possible to have the same
installation boot either in legacy or EFI mode. When it's not possible
is only due to firmware bugs.


I meant the very fact that EFI requires particular partitions to exist, while non-EFI requires only that at least 1 partition exist. It's entirely feasible to construct a partition scheme that works happily with non-EFI boot but will not work with EFI boot -- indeed, almost any reasonable structure that a user comes up with that makes sense from a legacy perspective in the absence of knowledge of EFI's requirements, will not work with EFI, at least because it doesn't include the EFI boot partition required by EFI. So no, compatible they certainly ain't. Where I was going with my original comment was -- read up in detail on EFI and its requirements before you determine your partition structure, don't do what I originally did and assume that the switchover can be done with minimal changes. I first hit this when building an LFS system, and deferred getting my head around it until after I had finished the build process, which turned out to be a mistake, because I ended up having to back up what I'd just built, wipe everything and re-do the partition structure, then restore the backup into the new structure. I was able to do that because the disk on the machine was relatively small and I had room for it on backup storage media. Had I not, I would have been a very unhappy bunny... It takes several days to build an LFS system from the ground up.
 
> So you need to make the decision early in the process which boot method you
> are going to use. The Debian installer can handle either, installing a
> machine to boot MBR if it was booted MBR and installing to boot UEFI if it
> was installed UEFI.

If the installer was booted in EFI mode it can also install to boot in
legacy mode if it detects another installed OS which boots in legacy mode.

True. I have moved away from dual boot for many years now, only run non-Linux machines in VMs, so don't tend to spend a lot of time thinking about such configurations, but I agree grub does.
 
> What is extremely hard is booting a machine MBR and then setting it up to
> boot UEFI.

I would not say "extremely", but harder than the other way around. One
reason is that you need to create an EFI system partition on the boot
disk, usually going through the hassle of reducing another partition.

Have you ever tried it? grub-install won't be able to work because the system calls it tries to make fail. virtual file systems (efivars or something? I forget exactly) that need to be populated... aren't. Bringing up a machine from a legacy boot and then getting the infrastructure in place to be able to run grub-install is hard. Sufficiently hard that I in fact was unable to do it and had to do the dance I mentioned in my earlier reply to get the machine migrated -- in essence, cheat, and find a way to boot the machine in EFI mode so I could install an EFI boot. The essence of the issue is, grub-install, and all the web literature on how to do this, assume that if you are installing an EFI boot, you booted the machine in EFI mode.

Mark

Reply to: