From: "Leif Lindholm" <leif.lindholm@linaro.org>
To: Pete Batard <pete@akeo.ie>
Cc: devel@edk2.groups.io, ard.biesheuvel@linaro.org
Subject: Re: [edk2-platforms: PATCH v2 1/1] Platform/RPi3: Add Debian 10 installation in Systems.md
Date: Wed, 7 Aug 2019 16:02:17 +0100 [thread overview]
Message-ID: <20190807150217.GO25813@bivouac.eciton.net> (raw)
In-Reply-To: <7fbd53c0-44f5-4fce-c234-6c55786ed610@akeo.ie>
Hi Pete,
On Wed, Aug 07, 2019 at 03:24:10PM +0100, Pete Batard wrote:
> > > +Below are steps you can follow to install Debian 10 onto an SD card:
> > > +* Partition the media as MBR and create a ~300 MB partition on it with MBR type `0x0e`.
> > > + __Note:__ Make sure that the partition scheme is MBR (not GPT) and the type `0x0e` (not
> > > + `0xef` for instance), as the ondie Broadcom bootloader supports neither the GPT scheme nor
> >
> > ondie -> on-die (or on-SoC may be even more clear to civilians).
>
> I think I'll use "on-CPU" then, as this should be even more explicit.
Works for me.
> > > + the ESP MBR type.
> > > +* Set the partition as active/bootable. This is needed as the Debian partition manager can
> > > + not detect it as ESP otherwise, which we need for GRUB installation. If using `fdisk` on
> > > + Linux, you can use the `a` command to set a partition as active. On Windows, you can use
> > > + `DISKPART` and then type `active` after selecting the relevant disk and partition.
> > > +* Format the partition as FAT. Here again you should make sure that you use FAT rather than
> > > + FAT32 else the Debian partition manager will not detect the partition as ESP. If you
> > > + are using Windows `DISKPART` then `format fs=fat quick` should do it. On Linux, `mkfs.vfat`
> > > + with the default options should do the same as long as the partition isn't too large.
> >
> > It would be preferable if we could have an actual number here - the
> > 12-bit, 16-bit and 32-bit fat size switchover points are known. I
> > assume it is the 32-bit breakpoint (2 or 4Gb?) we want to avoid?
>
> The switchover point actually depends of the utility, since there is overlap
> between 12, 16 and 32. But that's not actually a problem with diskpart on
> Windows as 'fs=fat' does force FAT16 so you'll get an error if the partition
> is too large and can only accommodate FAT32 (which should usually occur past
> the 2 GB point).
>
> In other words, the only potential issue here is with Linux' mkfs.vfat. But
> there too we can add a switch (-F 16) to force FAT16, so I'll alter the
> documentation to have that, plus a note that mentions that the partition
> should be under 2 GB.
Sure, this is fine.
> I'll also take this opportunity to stress out that the only reason we are
> trying to force FAT16 here is because the Debian installer's partition
> manager is very temperamental with regards to its detection of an ESP that
> doesn't have either the relevant GUID for GPT or type 0xef for MBR, none of
> which can be used on a Pi. There are actually cases where I have seen that
> utility also detect a FAT32 MBR partition without type 0xef as an ESP.
Yeah, well. This is pretty much stacking ice cubes next to a furnace,
trying to create an ABI where there is none. Which is fine, because we
do need to provide documentation for non-experts - but this is also why
it needs to be precise, so we don't mislead experts.
> However, I have found out that, in most cases, the presence of FAT32 vs
> FAT16 acts as a switch to demote the partition from ESP, which is the reason
> why the notes promote the use of FAT16 over FAT32. But as mentioned in the
> additional notes however, it's still relatively easy to fix the ESP issue if
> you use FAT32 and/or if the Debian partition manager fails to detect it as
> ESP.
Sure. May be worth adding a forward-pointer to the additional notes
from here then?
> Now, one can only wish that Broadcom had anticipated UEFI usage for their
> hardcoded boot loader, as they'd only needed to have added 0xef, alongside
> the other FAT based MBR partition types they recognize for this whole
> annoyance to be avoided...
In my most optimistic hours, I sometimes dare to hope that the EBBR
explicitly stating these requirements will at some point in the future
start to make a difference.
> I'll send a v3 when I get a chance.
Thanks!
Regards.
Leif
prev parent reply other threads:[~2019-08-07 15:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 15:22 [edk2-platforms: PATCH v2 0/1] Platform/RPi3: Add Debian 10 installation in Systems.md Pete Batard
2019-07-25 15:22 ` [edk2-platforms: PATCH v2 1/1] " Pete Batard
2019-08-06 17:25 ` Leif Lindholm
2019-08-07 14:24 ` Pete Batard
2019-08-07 15:02 ` Leif Lindholm [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-list 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=20190807150217.GO25813@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/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