Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#821341: debian-installer: unbootable, no gpt partition for uefi install

79 views
Skip to first unread message

josh

unread,
Apr 17, 2016, 4:40:03 PM4/17/16
to
Package: debian-installer
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.


-- System Information:
Debian Release: 8.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored:
LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Steve McIntyre

unread,
Apr 18, 2016, 10:10:03 AM4/18/16
to
Control: merge -1 821340
Control: reassign 821340 partman-efi
Control: retitle 821340 partman-efi: add extra warning about preferring GPT for USE installation

Hi Josh,

I'm merging this with your other bug report - they're clearly the same
issue.

On Sun, Apr 17, 2016 at 10:37:53PM +0200, josh wrote:
>Package: debian-installer
>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.

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.

--
Steve McIntyre, Cambridge, UK. st...@einval.com
"Since phone messaging became popular, the young generation has lost the
ability to read or write anything that is longer than one hundred and sixty
characters." -- Ignatios Souvatzis

josh

unread,
Apr 18, 2016, 4:40:03 PM4/18/16
to
Hi Steve,

thanks for your reply.

> It depends very much on the machine involved, to be honest - many will
> boot UEFI from appropriately partitioned MBR-partitioned disks. It
> depends very much on the firmware of the machine here.

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."


> This is clearly difficult to do in some cases, e.g. if
> other OSes are on the system already.
>

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

Steve McIntyre

unread,
Apr 19, 2016, 8:30:03 PM4/19/16
to
Hey Josh,

On Mon, Apr 18, 2016 at 10:33:31PM +0200, josh wrote:
>Hi Steve,
>
>thanks for your reply.
>
>> It depends very much on the machine involved, to be honest - many will
>> boot UEFI from appropriately partitioned MBR-partitioned disks. It
>> depends very much on the firmware of the machine here.
>
>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."

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.

>> This is clearly difficult to do in some cases, e.g. if
>> other OSes are on the system already.
>
>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.

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!

>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...).

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. :-)

>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.

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!
:-)

--
Steve McIntyre, Cambridge, UK. st...@einval.com
"I can't ever sleep on planes ... call it irrational if you like, but I'm
afraid I'll miss my stop" -- Vivek Das Mohapatra

josh

unread,
Apr 21, 2016, 8:10:03 AM4/21/16
to
Hi Steve,

thanks for your reply.

On 20.04.2016 02:23, Steve McIntyre wrote:
>
> 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.

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.

> 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!


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.


> In terms of improving d-i, we *can* add a warning message that some
> machines may not boot UEFI on MBR.

Considering that uefi should boot from mbr, this is more than I could
expect!

> Patches welcome if you'd like to help here! :-)

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

Lehman

unread,
Apr 19, 2020, 11:40:03 AM4/19/20
to


--
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.

Валерий Заподовников

unread,
Jul 13, 2020, 9:30:03 PM7/13/20
to
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

LAW OFFICE AKOUDE

unread,
Apr 22, 2021, 9:50:03 AM4/22/21
to
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)
0 new messages