• booting by UEFI?

    From Eben King@21:1/5 to All on Sun Dec 29 17:30:01 2024
    I think I've done everything reasonable in my firmware to ensure booting by EFI. I have:

    Storage boot option control UEFI only
    Other PCI device ROM priority UEFI only
    (other options for both are "Legacy only" and "Disabled")

    The boot device is currently /dev/sdb which has a GPT partition table, and
    its first few partitions are

    number size mount point
    1 953MB /boot
    2 2GB /
    3 10GB /usr
    11 9GB /home
    13 48GB swap
    5 953MB unmounted, filesystem="grub2 core.img", flags="bios_grub"

    The first four are ext4.

    I do recall it was a pain to make d-i keep the GPT table not overwrite it
    with an MBR one.

    My motherboard is a Gigabyte H170 with 32 GiB RAM and I run Debian 12.8. I swear I ran a program that showed me EFI boot vars (if they exist) and it showed nothing. But now I can't remember what that program was. How can I ensure that I'm actually booted using EFI?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Eben King on Sun Dec 29 17:40:01 2024
    Hi,

    On Sun, Dec 29, 2024 at 11:26:38AM -0500, Eben King wrote:
    The boot device is currently /dev/sdb which has a GPT partition table, and its first few partitions are

    number size mount point
    1 953MB /boot
    2 2GB /
    3 10GB /usr
    11 9GB /home
    13 48GB swap
    5 953MB unmounted, filesystem="grub2 core.img", flags="bios_grub"

    Does UEFI booting not require an EFI System Partition (ESP) of type vfat typically mounted at /boot/efi on Debian?

    I swear I ran a program that showed me EFI boot vars (if they exist)
    and it showed nothing. But now I can't remember what that program
    was.

    Probably "efivar --list". It's in the "efivar" package and not installed
    by default.

    How can I ensure that I'm actually booted using EFI?

    If you're booted by UEFI then /sys/firmware/efi/ will exist.

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to Eben King on Sun Dec 29 17:40:01 2024
    On 12/29/24 17:26, Eben King wrote:
    How can I
    ensure that I'm actually booted using EFI?


    "/sys/firmware/efi" if present indicates that you are booted in UEFI mode.

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Andy Smith on Sun Dec 29 18:20:01 2024
    On 12/29/24 11:38, Andy Smith wrote:
    Hi,

    On Sun, Dec 29, 2024 at 11:26:38AM -0500, Eben King wrote:
    The boot device is currently /dev/sdb which has a GPT partition table, and >> its first few partitions are

    number size mount point
    ...

    Does UEFI booting not require an EFI System Partition (ESP) of type vfat typically mounted at /boot/efi on Debian?

    eben@cerberus:~$ ls /boot/efi
    ls: cannot access '/boot/efi': No such file or directory

    Fudge.

    I swear I ran a program that showed me EFI boot vars (if they exist)
    and it showed nothing. But now I can't remember what that program
    was.

    Probably "efivar --list". It's in the "efivar" package and not installed
    by default.

    Thanks. It was probably in a live CD environment.

    How can I ensure that I'm actually booted using EFI?

    If you're booted by UEFI then /sys/firmware/efi/ will exist.

    eben@cerberus:~$ ls -ld /sys/firmware/efi
    ls: cannot access '/sys/firmware/efi': No such file or directory

    Bummer. OK. Has anyone booted using EFI with this motherboard? Either
    I've done something wrong, or its EFI implementation is shoddy or remarkable forgiving of incompetent installations.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From debian-user@howorth.org.uk@21:1/5 to Eben King on Sun Dec 29 19:00:02 2024
    Eben King <eben@gmx.us> wrote:

    My motherboard is a Gigabyte H170

    That doesn't seem to be precise enough. They make multiple boards with
    that general name and all but one support UEFI. But the GA-H170TN does
    not mention UEFI, although its spec does say "Use of licensed AMI UEFI
    BIOS".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Sun Dec 29 19:00:02 2024
    Eben King composed on 2024-12-29 11:26 (UTC-0500):

    My motherboard is a Gigabyte H170 with 32 GiB RAM and I run Debian 12.8. I

    This Gigabyte is slightly newer:
    $ inxi -M
    Machine:
    Type: Desktop System: Gigabyte product: B250M-D3H v: N/A
    serial: <superuser required>
    Mobo: Gigabyte model: B250M-D3H-CF v: x.x serial: <superuser required>
    UEFI-[Legacy]: American Megatrends v: F10 date: 12/14/2018
    $

    swear I ran a program that showed me EFI boot vars (if they exist) and it showed nothing. But now I can't remember what that program was. How can I ensure that I'm actually booted using EFI?

    # efibootmgr
    EFI variables are not supported on this system.
    #

    When booted in EFI mode, the result will instead be information about existing EFI
    boot entries, e.g.:
    # efibootmgr
    BootCurrent: 0001
    Timeout: 1 seconds
    BootOrder: 0000,0001,0002,0003
    Boot0000* debian12
    Boot0001* UEFI OS
    Boot0002* Hard Drive
    Boot0003* CD/DVD Drive
    #
    --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to debian-user@howorth.org.uk on Sun Dec 29 19:20:01 2024
    On 12/29/24 12:51, debian-user@howorth.org.uk wrote:
    Eben King <eben@gmx.us> wrote:

    My motherboard is a Gigabyte H170

    That doesn't seem to be precise enough. They make multiple boards with
    that general name and all but one support UEFI. But the GA-H170TN does
    not mention UEFI, although its spec does say "Use of licensed AMI UEFI
    BIOS".
    OK, the manual covers two models, GA-H170-Gaming3 and GA-H170-Gaming3 DDR3. Mine's the one that isn't DDR3. How would I tell if my BIOS is licensed or not?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to eben@gmx.us on Sun Dec 29 19:20:02 2024
    On Sun, 29 Dec 2024 12:19:35 -0500
    eben@gmx.us wrote:

    On 12/29/24 11:38, Andy Smith wrote:
    Hi,

    On Sun, Dec 29, 2024 at 11:26:38AM -0500, Eben King wrote:
    The boot device is currently /dev/sdb which has a GPT partition
    table, and its first few partitions are

    number size mount point
    ...

    Does UEFI booting not require an EFI System Partition (ESP) of type
    vfat typically mounted at /boot/efi on Debian?

    eben@cerberus:~$ ls /boot/efi
    ls: cannot access '/boot/efi': No such file or directory

    Fudge.

    I swear I ran a program that showed me EFI boot vars (if they
    exist) and it showed nothing. But now I can't remember what that
    program was.

    Probably "efivar --list". It's in the "efivar" package and not
    installed by default.

    Thanks. It was probably in a live CD environment.

    How can I ensure that I'm actually booted using EFI?

    If you're booted by UEFI then /sys/firmware/efi/ will exist.

    eben@cerberus:~$ ls -ld /sys/firmware/efi
    ls: cannot access '/sys/firmware/efi': No such file or directory

    Bummer. OK. Has anyone booted using EFI with this motherboard?
    Either I've done something wrong, or its EFI implementation is shoddy
    or remarkable forgiving of incompetent installations.



    The answer may be in an earlier post. The partition on which the boot
    EFI information is stored *must* be one of the FAT varieties,
    containing a FAT filesystem, the modern VFAT being the obvious choice.
    Debian normally puts just the EFI information on the partition and then
    mounts it as /boot/efi. This will happen automatically with an
    installation in UEFI mode (the installer splash screen will contain
    'UEFI').

    There may be more to your problem, but this will definitely be part of
    it.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From eben@gmx.us@21:1/5 to Cindy Sue Causey on Sun Dec 29 20:20:01 2024
    On 12/29/24 13:17, Cindy Sue Causey wrote:

    Good luck with yours. FINALLY fixing this a couple years ago was so empowering. Without boot, we got no computers. :)

    Wow, thanks. I've heard that switching an existing system to EFI can be disruptive and error-prone, so I'll probably try again when I'm upgrading anyhow.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Ehlert@21:1/5 to Eben King on Sun Dec 29 20:40:02 2024
    On 12/29/24 08:26, Eben King wrote:
    I think I've done everything reasonable in my firmware to ensure booting by EFI. I have:

    Storage boot option control UEFI only
    Other PCI device ROM priority UEFI only
    (other options for both are "Legacy only" and "Disabled")
    maybe this will help.
    Debian, and others show in GRUB, but not windows 10.
    HP workstation: I press F9 on boot for a boot menu
    I get a listing:
    UEFI - debian
    other systems<
    UEFI - Windows Boot Manager

    It boots fine.
    Restart and I get GRUB, but without a windows option



    The boot device is currently /dev/sdb which has a GPT partition table, and its first few partitions are

    number size mount point
    1 953MB /boot
    2 2GB /
    3 10GB /usr
    11 9GB /home
    13 48GB swap
    5 953MB unmounted, filesystem="grub2 core.img", flags="bios_grub"

    The first four are ext4.

    I do recall it was a pain to make d-i keep the GPT table not overwrite it with an MBR one.

    My motherboard is a Gigabyte H170 with 32 GiB RAM and I run Debian 12.8. I swear I ran a program that showed me EFI boot vars (if they exist) and it showed nothing. But now I can't remember what that program was. How can I ensure that I'm actually booted using EFI?



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From debian-user@howorth.org.uk@21:1/5 to eben@gmx.us on Sun Dec 29 21:40:02 2024
    eben@gmx.us wrote:
    On 12/29/24 12:51, debian-user@howorth.org.uk wrote:
    Eben King <eben@gmx.us> wrote:

    My motherboard is a Gigabyte H170

    That doesn't seem to be precise enough. They make multiple boards
    with that general name and all but one support UEFI. But the
    GA-H170TN does not mention UEFI, although its spec does say "Use of licensed AMI UEFI BIOS".
    OK, the manual covers two models, GA-H170-Gaming3 and GA-H170-Gaming3
    DDR3. Mine's the one that isn't DDR3. How would I tell if my BIOS is licensed or not?

    I'm tempted to suggest you refer to the same web page I searched for,
    but since it isn't the GA-H170TN what I already said covers it. "They
    make multiple boards with that general name and all but one support
    UEFI."

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to Peter Ehlert on Sun Dec 29 21:30:01 2024
    On Sun, 29 Dec 2024 11:07:18 -0800
    Peter Ehlert <peter@sdi-baja.com> wrote:

    On 12/29/24 08:26, Eben King wrote:
    I think I've done everything reasonable in my firmware to ensure
    booting by EFI. I have:

    Storage boot option control UEFI only
    Other PCI device ROM priority UEFI only
    (other options for both are "Legacy only" and "Disabled")
    maybe this will help.
    Debian, and others show in GRUB, but not windows 10.
    HP workstation: I press F9 on boot for a boot menu
    I get a listing:
    UEFI - debian
    other systems<
    UEFI - Windows Boot Manager

    It boots fine.
    Restart and I get GRUB, but without a windows option


    If you run update-grub, do you see a warning that os-prober will not be executed? After installation or upgrade to grub, os-prober is disabled
    and will not detect Windows or any other OS that may be installed.

    https://forum.manjaro.org/t/grub2-why-is-os-prober-now-disabled-by-default/57599

    The answer is to modify /etc/default/grub and run update-grub again:

    To restore the old behavior, open a terminal and issue sudo echo
    GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub

    Note that you will need to do this again when grub is upgraded.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Ehlert@21:1/5 to Joe on Sun Dec 29 22:30:01 2024
    On 12/29/24 12:24, Joe wrote:
    On Sun, 29 Dec 2024 11:07:18 -0800
    Peter Ehlert <peter@sdi-baja.com> wrote:

    On 12/29/24 08:26, Eben King wrote:
    I think I've done everything reasonable in my firmware to ensure
    booting by EFI. I have:

    Storage boot option control UEFI only
    Other PCI device ROM priority UEFI only
    (other options for both are "Legacy only" and "Disabled")
    maybe this will help.
    Debian, and others show in GRUB, but not windows 10.
    HP workstation: I press F9 on boot for a boot menu
    I get a listing:
    UEFI - debian
    >other systems<
    UEFI - Windows Boot Manager

    It boots fine.
    Restart and I get GRUB, but without a windows option


    If you run update-grub, do you see a warning that os-prober will not be executed? After installation or upgrade to grub, os-prober is disabled
    and will not detect Windows or any other OS that may be installed.

    os-prober is activated. the other Linux distros are listed.


    https://forum.manjaro.org/t/grub2-why-is-os-prober-now-disabled-by-default/57599

    The answer is to modify /etc/default/grub and run update-grub again:

    To restore the old behavior, open a terminal and issue sudo echo
    GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub

    Note that you will need to do this again when grub is upgraded.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to Peter Ehlert on Sun Dec 29 22:40:01 2024
    On Sun, 29 Dec 2024 13:08:17 -0800
    Peter Ehlert <peter@sdi-baja.com> wrote:


    If you run update-grub, do you see a warning that os-prober will
    not be executed? After installation or upgrade to grub, os-prober
    is disabled and will not detect Windows or any other OS that may be installed.

    os-prober is activated. the other Linux distros are listed.


    Sorry, no other ideas. Until recently I had a laptop with Win10
    installed, and still have a desktop with it, and both listed the Win10
    OK. I can't think of a reason why os-prober wouldn't find it.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Cindy Sue Causey on Mon Dec 30 04:10:01 2024
    On Sun 29 Dec 2024 at 13:17:57 (-0500), Cindy Sue Causey wrote:

    Top big must-have *for me* was a dedicated partition for EFI.

    That's true if you're booting in EFI mode. It's not clear whether
    the OP is.

    Somewhere
    I read that HAS to be an extremely early partition on the hard drive.
    Today I learned it can be anywhere so the problems I had years ago were
    NOT due to that. [0]

    It has to be early enough for the firmware to be able to read it.
    That's a property of the computer, so it may be that your problem
    of years ago was caused by the computer of years ago. What you
    learned today is likely to be true for the computers of today, not
    every computer. The old ones will still have their limitations.

    Additionally, until now I've always had an MBR partition at the front of
    my hard drives. Thanks to your question, I've just now learned that is
    NOT recommended and might cause compatibility issues, too. [1] Each User
    has to decide what to do there based on what their multiple operating
    systems demand for booting. I simply reformatted mine as EXT4 (for now).

    I don't know what you mean by an "MBR partition". Assuming from what
    you write below that you boot in EFI mode, can you tell us the type
    of disk partition table (MBR or GPT), and perhaps what's in this
    partition of yours that you reformatted as ext4. That might allow us
    to know what you mean.

    My UEFI partition is formatted as FAT32 then I manually verify that it's flagged as msftdata. I use Gparted that is being a tiny bit unpredictble
    if left on its own to perform that function.

    Why not set it to EF00 (EFI System) on a GPT disk, or EF (EFI FAT-12/16/32)
    on an MBR disk?

    My /etc/fstab mounts EFI partition to Debian and GRUB's default
    /boot/efi hierarchy. The "type" (third declaration on EFI's fstab line)
    is "vfat".

    [ … ]

    [0] https://superuser.com/questions/1834990/how-do-i-rearrange-a-wrong-order-of-efi-and-boot-partitions
    [1] https://superuser.com/questions/739153/uefi-with-mbr-partition-table

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Joe on Mon Dec 30 04:00:01 2024
    On Sun 29 Dec 2024 at 20:24:46 (+0000), Joe wrote:
    The answer is to modify /etc/default/grub and run update-grub again:

    To restore the old behavior, open a terminal and issue sudo echo
    GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub

    Note that you will need to do this again when grub is upgraded.

    My experience has been that upgrading will ask whether you want
    the new/Debian version of the file. I said no, so it placed that
    version into a file called grub.ucf-dist.

    Alternatively, you could echo that line into a file called, say, /etc/default/grub.d/probing.cfg (it's only the .cfg that's important)
    and that file shouldn't be disturbed by upgrades.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Mon Dec 30 10:20:01 2024
    Max Nikulin (12024-12-30):
    Create EFI System Partition: it should have proper partition type UUID and
    it is not recommended to make it too small (<500 MB).

    Only if one wants to have the bootloaders for other systems on it. I
    have been using EFI system partitions of <50 or <80 mega-octets for more
    than a decade without any trouble, and now I am using a 16 mega-octets
    disk image to boot VMs.

    The partition just needs to be large enough to hold what one wants to
    put in it, and booting Linux requires very little.

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 77M 166K 77M 1% /boot/efi

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas George@21:1/5 to All on Tue Dec 31 12:50:01 2024
    Max Nikulin (12024-12-31):
    My fault, I forgot to post a link with some reasoning: <https://fedoraproject.org/wiki/Changes/BiggerESP>

    Nicolas, I am not trying to force *you* to resize ESP partitions on your machines. However I consider it safer to use bigger partition in general case, especially due to some uncertainties in respect to specific configuration.

    Are you sure that fwupd will never try put a large enough file to update firmware of some device?

    Firmware updates are exceptional and critical operations. They should
    not be left to unattended daemons. The system configuration should not
    be tailored for them.

    My experience is that laptop firmware updater,
    launched from a USB stick, creates some files on the internal drive. Are you

    I find hard to believe that it would be necessary. It would mean an impossibility to update the firmware if the internal drive is dead or
    not detected. Most likely there was a more straightforward solution to
    update the firmware. If not, please share the brand of the computer so
    that I can avoid buying one in the future.

    sure that unified kernel images will not become default before the user replaces their drive?

    Are you sure that UEFI will not be replaced by something even more
    bizarrely inexplicable before that happens?

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)