Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Jan 2019 21:12:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234708] gptboot prompt only supports first nine partitions
Message-ID:  <bug-234708-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234708

            Bug ID: 234708
           Summary: gptboot prompt only supports first nine partitions
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: ian@FreeBSD.org

The gptboot prompt allows overriding the default choice of disk drive and
partition to load /boot/loader from.  The parser only accepts a single-digit
entry for both drive number and partition number.  If you attempt to enter,=
 for
example, 0:da(0p21) it doesn't accept it; the default changes to 0:da(0p2) =
when
the prompt is re-displayed.

The code that parses the string also tries to allow the drive number to be =
left
off and the unit number becomes the drive number (i.e., da(5p11) would be
equivelent to 5:da(0p11)), except that the code doesn't zero out the unit
number after transposing it to the drive number, so you really get 5:da(5p1=
1)
which is unlikely to ever be right (this is just something I noticed while
looking at parse_cmds() in gptboot.c).

I originally intended to just fix the parsing code, but then I discovered t=
hat
its current behavior is undocumented (there is no mention of handling gpt
partitions using a 'pNN' syntax at all, as well as no mention of reinterpre=
ting
unit number as drive number).  That means any change to this code at all mi=
ght
break somebody's existing configuration, and I'm just not going to open that
can of worms today.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234708-227>