util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Dubbs <bruce.dubbs@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: Util-Linux <util-linux@vger.kernel.org>
Subject: Re: fdisk request for functionality (or info)
Date: Thu, 5 Oct 2017 11:04:13 -0500	[thread overview]
Message-ID: <59D657FD.6070009@gmail.com> (raw)
In-Reply-To: <20171005105900.s5uctyqsxzlfwhsk@ws.net.home>

Karel Zak wrote:
> On Wed, Oct 04, 2017 at 09:41:38AM -0500, Bruce Dubbs wrote:

>> Would it be reasonable to set that flag by default
>> when 'g create a new empty GPT partition table' is selected?
>
> Not sure, according to UEFI standard the boot flag should be ignored
> by EFI boot loaders and for non-EFI systems the behavior is undefined.
>
> The first partition on protective MBR covers all disk and the start
> offset of the partition is the place where is GPT header. So, the
> partition is useless as source for boot.

Agree.  The problem is the BIOS on fairly old Core2Duo systems.  These 
systems are in a classroom with 16 identical computers.  I've complained 
for a couple of years now that the computers are slow and way out of date 
for what is supposed to be a class teaching technology.

> The question is what your old BIOS expects and why does it parses MBR
> at all :) It should be enough for BIOS to read boot-bits (begin of the
> disk) where is boot loader rather than try to be smart and parse any
> PT...)

What the BIOS should do and what is does are different.  In a different 
classroom with better systems there is no problem.

> If you want to boot from the MBR than it's probably some kind of crazy
> hybrid MBR and it's completely out of fdisk/parted interest.

No, I do not want to boot from the MBR.  I am trying to instruct the 
students how to install and use a GPT.  It seems that the Debian expert 
installer has no option to create a GPT, although it will use it if found. 
  What I have the students do during install is to drop to the command 
line and run fdisk manually, creating a new, empty GPT and new partitions 
for the installer.  It is a good learning exercise.

The problem then, after install, is that the BIOS returns "No bootable 
disk found".  Using a rescue disk and setting the pmbr boot flag allows 
the system to boot properly.

> fdisk and sfdisk allows to manually work with (hybrid)MBR, but it's
> under user's control and fdisk does not do anything by default in this
> case.
>
> So, from my point of view all we need is to make changes to fdisk main
> menu to make PMBR/HybridMBR easy to access for creative users with
> legacy BIOS.

Even an entry in the expert menu would be OK for me. This is probably
a rare enough situation that it does not need to be in the main menu.

> BTW, what returns:
>
>      # fdisk  /dev/sda --type dos --list
>
> for standard PMBR on EFI system it's:
>
>          Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
>          Units: sectors of 1 * 512 = 512 bytes
>          Sector size (logical/physical): 512 bytes / 512 bytes
>          I/O size (minimum/optimal): 512 bytes / 512 bytes
>          Disklabel type: dos
>          Disk identifier: 0x00000000
>
>          Device     Boot Start       End   Sectors   Size Id Type
>          /dev/sda1           1 468862127 468862127 223.6G ee GPT

Yes, that's what I get too.  Setting the pmbr boot bit adds an asterisk 
under boot.

   -- Bruce



      reply	other threads:[~2017-10-05 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 16:57 fdisk request for functionality (or info) Bruce Dubbs
2017-10-04  8:27 ` Karel Zak
2017-10-04  8:59   ` Peter Cordes
2017-10-04  9:47     ` Karel Zak
2017-11-02 12:52       ` Karel Zak
2017-10-04 14:41   ` Bruce Dubbs
2017-10-05 10:59     ` Karel Zak
2017-10-05 16:04       ` Bruce Dubbs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59D657FD.6070009@gmail.com \
    --to=bruce.dubbs@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).