Re: Boot Order
On Sat, 24 Feb 2018 14:59:44 -0500
Dan Norton <dnorton@mindspring.com> wrote:
> On Sat, 24 Feb 2018 18:37:02 +0100
> Ben Hutchings <ben@decadent.org.uk> wrote:
>
> > On Fri, 2018-02-23 at 22:18 -0500, Dan Norton wrote:
> > > Installing either stretch or buster via netinst results in changes
> > > to the bios menu. Under "UEFI Boot Sources" the term "Hard Drive"
> > > is replaced with "debian" and this entry is put first in the boot
> > > order.
> > >
> > > The PC is:
> > > Hewlett-Packard HP Pro 3400 Series MT/2ABF, BIOS 7.16 03/23/2012
> > >
> > > Please tell me the justification for putting "debian" in the menu
> > > and having it boot first, ahead of CD/DVD/USB. Thanks.
> >
> > If there are multiple bootable operating systems on local hard
> > drives, I think the installer sets Debian to be higher priority
> > than the other operating systems.
> >
>
> In my case, there are multiple debian installations and the installer
> positions the last installation at the top of the *grub* menu. This
> makes sense. But why change the *bios* menu? With the variability in
> manufacturers bios code, changing the bios menu seems like a risky,
> tricky, and tedious undertaking. AFAICT it's instigated by the
> installer and presumably a necessary thing. I've searched for the
> rationale, but have missed it, if it's out there. Can you refer me to
> something?
>
> > But as far as I am aware, the relative priority of boot entries on
> > removable vs hard drives is solely controlled by the BIOS/UEFI
> > firmware.
> >
>
> That just doesn't seem logical. There was a perfectly good priority,
> before installs of Debian, I think it went:
>
> UEFI Boot Sources
> ATAPI CD/DVD Drive
> USB Floppy/CD
> Hard Drive
> USB Hard Drive
> Legacy Boot Sources
> ATAPI CD/DVD Drive
> USB Floppy/CD
> Hard Drive
> SATA0
>
> After installing stretch, it changed to:
>
> UEFI Boot Sources
> debian
> ATAPI CD/DVD Drive
> USB Floppy/CD
> USB Hard Drive
> Legacy Boot Sources
> [...]
>
> If done by firmware, wouldn't grub or the installer have to tell
> the firmware to put "debian" in the bios menu and make it first? In
> its past life, this PC ran Windows 7 but in order to boot from
> mountable media there was no need for the user to change the boot
> order.
>
There is a description of sorts for UEFI and bios booting in [1] and in
the section on "The UEFI boot manager" it says "Linux distributions
contain a tool called efibootmgr which is used to manipulate the
configuration of the UEFI boot manager"
$ man efibootmgr
DESCRIPTION
...This application can create and destroy boot entries, change
the boot order, ... and more.
OPTIONS
[...]
-c | --create
Create new variable bootnum and add to bootorder
[...]
-L | --label LABEL
Boot manager display label (defaults to "Linux")
Debian Code Search for "efibootmgr" shows that grub2 code calls it and
uses the -c and -L options, among others.
I was not able to figure out how "Linux" is replaced by "debian" but it
looks like this is what is changing the boot order but I still don't
know *why* - any hints?
[1]
https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/
Reply to: