On Sun, May 07, 2023 at 06:22:55PM +0200, Mark Kettenis wrote:
> > Date: Sat,  6 May 2023 22:47:55 +0000
> > From: Klemens Nanni <k...@openbsd.org>
> > 
> > On Sat, Apr 29, 2023 at 06:47:48PM +0000, Klemens Nanni wrote:
> > > Installing to a wiped disk on EFI machines suggests MBR not GPT when 
> > > chosing
> > > (E)dit because MBR vs. GPT in this manual case is picked based on existing
> > > data on the disk, not whether it has EFI.
> > > 
> > > Fix that so users get correct instructions and don't end up with legacy
> > > partitioning in fresh installs on new machines.
> > > 
> > > Feedback? OK?
> > 
> > Anyone?
> > 
> > Put differently, in the manual (E)dit case, the guidance message should
> > be oriented towards the actual system (this diff) and not whatever is on
> > the disk that's about to be set up by hand (-current).
> 
> Makes no sense to me.  If you choose (E)dit, you want to make changes
> to the partition table that is already on the disk.

If the disk has random garbage or you zero it, the (E)dit case looks for GPT
which is not there and then suggests to to MBR instead.

> EFI firmware doesn't really care whether you have a GPT partition
> table or a traditional MBR partition table.

That might work, but shouldn't you go for GPT with an ESP on UEFI systems?

In the case I describe and hit, our installer advises to just create an MBR
with one OpenBSD partition, whereas I think we should rather hint users at GPT
with ESP and an OpenBDS partition on UEFI systems.

Afterall, this is only about which message we print, both cases land in
'fdisk -e' and you're on your own, so no real functional change, but still...

> > Index: install.md
> > ===================================================================
> > RCS file: /cvs/src/distrib/amd64/common/install.md,v
> > retrieving revision 1.60
> > diff -u -p -U10 -r1.60 install.md
> > --- install.md      26 Apr 2023 22:45:32 -0000      1.60
> > +++ install.md      6 May 2023 22:45:36 -0000
> > @@ -79,21 +79,21 @@ md_prep_fdisk() {
> >                     if [[ $MDEFI != y ]]; then
> >                             ask_yn "An EFI/GPT disk may not boot. Proceed?"
> >                             [[ $resp == n ]] && continue
> >                     fi
> >  
> >                     echo -n "Setting OpenBSD GPT partition to whole 
> > $_disk..."
> >                     fdisk -gy -b 532480 $_disk >/dev/null
> >                     echo "done."
> >                     return ;;
> >             [eE]*)
> > -                   if disk_has $_disk gpt; then
> > +                   if [[ $MDEFI == y ]]; then
> >                             # Manually configure the GPT.
> >                             cat <<__EOT
> >  
> >  You will now create two GPT partitions. The first must have an id
> >  of 'EF' and be large enough to contain the OpenBSD boot programs,
> >  at least 532480 blocks. The second must have an id of 'A6' and will
> >  contain your OpenBSD data. Neither may overlap other partitions.
> >  Inside the fdisk command, the 'manual' command describes the fdisk
> >  commands in detail.
> >  
> > 
> > 
> 

Reply via email to