- Package:
- debian-installer
- Source:
- debian-installer
- Description:
- Debian Installer documentation
- Submitter:
- josh
- Date:
- 2021-04-22 13:39:02 UTC
- Severity:
- important
After installation system was not bootable. During the installation it said that it had detected that I had UEFI booted the installation CD and proposed to make an EFI boot partion which I accepted. However, after installation, Debian wasn't bootable. I tracked the problem down to the fact that even though it said it was installing a UEFI bootable system, the hard drive was still partitioned with an MBR, which is not UEFI boot compatible. There seemed to be no option for selecting/forcing gpt partitioning. Using a rescue cd and converting the MBR to a gpt and then reinstalling grub-uefi solved the problem without having to reinstall the system. It would seem to me that if the installer detects an uefi booted system and is installing an efi boot partition then it should automatically partition with a gpt and not an mbr.
Hi Josh, I'm merging this with your other bug report - they're clearly the same issue. Again, it should be possible to do this (select GPT) using expert mode rather than having to restart. Maybe we should add a warning during partman-efi setup that some machines won't boot in MBR mode, and offer to switch. This is clearly difficult to do in some cases, e.g. if other OSes are on the system already.
Hi Steve, thanks for your reply. hmmm...I didn't wade through the 1000+ page UEFI specs myself, but this entry on superuser.com cites them and claims that according to the specs, a UEFI boot partition /must/ reside on a gpt disk (this makes some sense since gpt is part of the UEFI specs afaik...): http://superuser.com/questions/563074/do-hard-drives-need-a-guid-partition-table-gpt-to-boot-in-uefi-mode This MSDN article states the same (https://msdn.microsoft.com/en-us/library/windows/hardware/dn640535%28v=vs.85%29.aspx#gpt_faq_mixed_gpt_mbr): "Systems that support UEFI require that boot partition must reside on a GPT disk. Other hard disks can be either MBR or GPT." I agree that if somebody's installing to drive that already has something installed on it, than you can't just go and change the mbr to a gpt without asking. I was doing a virgin install of a new machine originally partitioning and formatting a new blank disk. In this case you should definitely have at least the option of having a gpt and probably a notification that this would be preferable. As far as I remember, I /did/ select expert install and I didn't find an option for choosing gpt. Are you saying there is one, and I missed it? If so, it doesn't seem easily findable (or I'm blind, or didn't select expert install after all...). If it is the case that the UEFI specs actually require a gpt for efi boot, than a gpt should be the *default* for an UEFI install imho. If d-i detects another OS and the disk is mbr, than d-i should display a message either asking whether the disk should be converted to mbr stating the risks and/or state that the system likely won't be UEFI bootable if a gpt is not selected. All this should be available even in a non-expert install, again imho. Also, if it is the case that the UEFI specs require a gpt for efi boot, and some systems are uefi booting from mbrs, than those are the buggy ones, and whether one hopes it or not, one might expect that more and more mainboard chipsets will implement the specs correctly and not uefi boot from non-gpt disks. I have an MSI mainboard, which I think are pretty good, and it definitely refused to boot from an mbr disk with an efi partition. cheers, Josh
Hey Josh, That's just for Windows booting - see further down the same page "Do only GPT Disks have ESPs? No, MBR disks can also have ESPs. UEFI specifies booting from either GPT or MBR. The ESP on an MBR disk is identified by partition type 0xEF. However, Windows does not support booting UEFI from MBR disks or 0xEF partitions." Section 5.2 in UEFI 2.5 (http://www.uefi.org/sites/default/files/resources/UEFI%202_5.pdf) deals with UEFI and MBR, and specifcally lists supporting an ESP with partition type 0xEF. The superuser.com answer may sound authoritative, but I believe it to be incorrect. If your disk was blank and you've booted the installer in UEFI mode, it will choose GPT by default. That's the standard flow. If you choose to "use entire disk", it will deliberately choose to switch from MBR partitioning to GPT partitioning at that point. I've just tested exactly this with the 8.4.0 amd64 netinst. Are you totally sure that your disk was blank up-front? I'm wondering why you've not had the same experience I've had developing and using this code! There is a question available, at priority=low which is what the expert installer uses, yes. If you select the disk itself in the partitioning menu, it will ask you if you want to create a new blank partition table and then it will ask you what partition format to use. It's not the most obvious, admittedly. :-) We *do* default to GPT for most UEFI installations right now, but even so I'm fairly convinced that MBR should work on most machines (both from experience and from reading the specifications). It's not uncommon that edge conditions bite people, though - various UEFI implementations in the wild are notoriously buggy and ignore parts of the specification in favour of "just do what Windows works with, and test that only." :-( See http://wiki.osdev.org/Broken_UEFI_implementations for a table of known bugs that the Linux distro developers have put together to share our experiences in this area. It might be worth mentioning that your MSI mainboard doesn't like MBR UEFI boot there. In terms of improving d-i, we *can* add a warning message that some machines may not boot UEFI on MBR. I'll try to get to that before the stretch release, but I'll be honest and say that it's not going to be a high priority for me. Patches welcome if you'd like to help here! :-)
Hi Steve, thanks for your reply. You are right! The even more interesting section is 3.1.2 on Load Option Processing for the uefi boot manager. The 3rd paragraph on p. 72 of the spec you referenced clearly states: "The boot manager must also support booting from a sh ort-form device path.... If the drive supports the GPT partitioning scheme .... *If the drive supports the PC-AT MBR scheme the signature in the hard drive media device path is compared with the UniqueMBRSignature in the Legacy Master Boot Record...*" So that seals it. Hmmm....this is the only part that still gets me. My system /was/ brand-new and unused and verified unbootable with no efi partition and nothing bootable on the hard drive before I installed. I didn't select "use the entire disk" in the sense that I remember choosing that option or one similar which wanted to put everything into one partition, and then went back and chose another option that allowed me to partition the disk. I did make a partition for a yet-to-be-done and at that point not even attempted installation of windows. I also know that after the first installation of 8.3 amd64-netinstall, the system was not uefi bootable and that the disk had an mbr. I did look again after I found this out, and did not find an option for a gpt. What I don't know is how I could repeat this without overwriting my now working system. Considering that uefi should boot from mbr, this is more than I could expect! This interests me, but you know the usual problems one has with time and spreading oneself too thin, but I will put it on my list. Maybe I'll have a look. Can I just download a source package for d-i from a deb apt source link like for "regular" debian pkgs? I enjoyed this interaction. Thank you Steve! Cheers, Josh
-- Good Day To You Please i need your kind Assistance. I will be very glad if you can assist me to receive this sum of ( $22. Million US dollars.) into your bank account for the benefit of our both families, reply me if you are ready to receive this fund.
What is the status of this bug? Also can somebody delete one spam message above. We should support 0xEF MBR. Also look at the note here about "UEFI to the MBR handle". What the hell is that? https://books.google.ru/books?id=ePNODQAAQBAJ&pg=PT524&lpg=PT524&dq=mbr+0xef+UEFI&source=bl&ots=QAyIhjP_gS&sig=ACfU3U2dHce5h6O7So55jIuS7pLBi4EP6w&hl=ru&sa=X&ved=2ahUKEwjDrpyGtsvqAhV1w8QBHc0qBoEQ6AEwBHoECAMQAQ#v=onepage&q=mbr%200xef%20UEFI&f=false
Bonne journée , Je vous contacte au sujet de l'héritage non réclamé d'un membre de votre famille décédé. Veuillez répondre à cet e-mail dès que possible pour procéder aux détails. Cordialement votre, A. Atoko, (Avocat)