[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] updating /boot directory EFI
From:       Mark Knecht <markknecht () gmail ! com>
Date:       2023-04-17 13:31:08
Message-ID: CAK2H+ecwSrMS_v7gtp6J4bLuVTfuboJVO5CbQOzvkSoeJi8sXA () mail ! gmail ! com
[Download RAW message or body]

On Mon, Apr 17, 2023 at 4:57 AM Michael <confabulate@kintzios.com> wrote:
>
> On Monday, 17 April 2023 00:29:49 BST Arsen Arsenović wrote:
> > Wol <antlists@youngman.org.uk> writes:
> > > On 16/04/2023 22:30, Mitch D. wrote:
> > >> Wol, can you elaborate on why you think Grub is deprecated on EFI
> > >> systems?
> > >
> > > Because EFI is a boot manager?
> >
> > That is not the case any more than the classic IBM PC boot procedure is.
> > There is technical capability for UEFI firmware to act in such a manner,
> > but, in practice, this is not at all the case.
> >
> > The technical capability comes from the fact that boot entities have a
> > lil' bit of metadata attached to them.
>
> The ability of UEFI to boot linux kernels, as long as they are built with
the
> EFI boot stub enabled, may render 3rd party boot managers and their boot
> loaders redundant.  However, as already mentioned below, the flexibility
and
> customisability of GRUB and other boot manager exceeds any UEFI firmware
I've
> come across.
>
>
> > > Why chain-load boot managers?
> >
> > In theory, EFI implementations should provide boot
> > managers. Unfortunately, in practice these boot managers are often so
> > poor as to be useless. The worst I've personally encountered is on
> > Gigabyte's Hybrid EFI, which provides you with no boot options
> > whatsoever, beyond choosing the boot device (hard disk vs. optical disc,
> > for instance). I've heard of others that are just as bad. For this
> > reason, a good EFI boot manager—either standalone or as part of a boot
> > loader—is a practical necessity for multi-booting on an EFI
> > computer. That's where rEFInd comes into play.
> >   - https://rodsbooks.com/refind/
>
> I've stopped using GRUB and have been using the UEFI firmware to boot
directly
> Gentoo for more than 10 years now.  Given I have also flashed some of the
> MoBos' chipset with new UEFI firmware a dozen times or more, I have not
> experienced any MoBo failures as yet.  Also, the ESP partition formatted
with
> FAT32 has remained quite resilient too.  No loss of data or fs corruption
yet
> (keeps fingers crossed and checks backups).
>
> My particular systems setup and use case suits this approach, but I
appreciate
> people who multiboot daily/frequently, or need to boot LiveISOs off the
disk
> may find GRUB and friends to be a more suitable solution.
>
>

My needs are quite simple but efibootmgr, set up by the Kubuntu install
on a separate M.2 from the Windows install the machine came with, works for
me. I always start the day in Kubuntu, then reboot to Windows if I'm working
on music:

1) The simple view of the two installations:

mark@science2:~$ efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0000
Boot0000* Windows Boot Manager
Boot0003* ubuntu
mark@science2:~$

2) The more complicated view with GUIDs and such:

mark@science2:~$ efibootmgr -v
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0000
Boot0000* Windows Boot Manager
 HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF
I\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4
.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0003* ubuntu
 HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUNTU
\SHIMX64.EFI)
mark@science2:~$

3) To get to Windows I can choose it in the OS screen if I'm sitting there
but the most reliable way for me to get from Kubuntu to Windows is to just
tell the system to go to Windows at the next boot using a batch file in
Kubuntu:

mark@science2:~$ cat bin/RebootWindows
sudo efibootmgr -n 0000
reboot
mark@science2:~$

The 'problem' with this setup is that all of the grub/efibootmgr stuff
is on both drives and I'm never sure which drive is being used at
which time as I have Kubuntu on nvme1 and Windows boot
manager on nvme0 which I'm never comfortable with but the
Ubuntu stuff figured it out so I don't argue. Pity me if I ever have to
do a reinstall.

mark@science2:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           3.2G  3.7M  3.2G   1% /run
/dev/nvme1n1p3  916G  622G  248G  72% /
tmpfs            16G   66M   16G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/nvme0n1p1   96M   32M   65M  33% /boot/efi
tmpfs           3.2G   64K  3.2G   1% /run/user/1000
mark@science2:~$

[Attachment #3 (text/html)]

<div dir="ltr"><br><br>On Mon, Apr 17, 2023 at 4:57 AM Michael &lt;<a \
href="mailto:confabulate@kintzios.com">confabulate@kintzios.com</a>&gt; \
wrote:<br>&gt;<br>&gt; On Monday, 17 April 2023 00:29:49 BST Arsen Arsenović \
wrote:<br>&gt; &gt; Wol &lt;<a \
href="mailto:antlists@youngman.org.uk">antlists@youngman.org.uk</a>&gt; \
writes:<br>&gt; &gt; &gt; On 16/04/2023 22:30, Mitch D. wrote:<br>&gt; &gt; &gt;&gt; \
Wol, can you elaborate on why you think Grub is deprecated on EFI<br>&gt; &gt; \
&gt;&gt; systems?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Because EFI is a boot \
manager?<br>&gt; &gt;<br>&gt; &gt; That is not the case any more than the classic IBM \
PC boot procedure is.<br>&gt; &gt; There is technical capability for UEFI firmware to \
act in such a manner,<br>&gt; &gt; but, in practice, this is not at all the \
case.<br>&gt; &gt;<br>&gt; &gt; The technical capability comes from the fact that \
boot entities have a<br>&gt; &gt; lil&#39; bit of metadata attached to \
them.<br>&gt;<br>&gt; The ability of UEFI to boot linux kernels, as long as they are \
built with the<br>&gt; EFI boot stub enabled, may render 3rd party boot managers and \
their boot<br>&gt; loaders redundant.   However, as already mentioned below, the \
flexibility and<br>&gt; customisability of GRUB and other boot manager exceeds any \
UEFI firmware I&#39;ve<br>&gt; come across.<br>&gt;<br>&gt;<br>&gt; &gt; &gt; Why \
chain-load boot managers?<br>&gt; &gt;<br>&gt; &gt; In theory, EFI implementations \
should provide boot<br>&gt; &gt; managers. Unfortunately, in practice these boot \
managers are often so<br>&gt; &gt; poor as to be useless. The worst I&#39;ve \
personally encountered is on<br>&gt; &gt; Gigabyte&#39;s Hybrid EFI, which provides \
you with no boot options<br>&gt; &gt; whatsoever, beyond choosing the boot device \
(hard disk vs. optical disc,<br>&gt; &gt; for instance). I&#39;ve heard of others \
that are just as bad. For this<br>&gt; &gt; reason, a good EFI boot manager—either \
standalone or as part of a boot<br>&gt; &gt; loader—is a practical necessity for \
multi-booting on an EFI<br>&gt; &gt; computer. That&#39;s where rEFInd comes into \
play.<br>&gt; &gt;    - <a \
href="https://rodsbooks.com/refind/">https://rodsbooks.com/refind/</a><br>&gt;<br>&gt; \
I&#39;ve stopped using GRUB and have been using the UEFI firmware to boot \
directly<br>&gt; Gentoo for more than 10 years now.   Given I have also flashed some \
of the<br>&gt; MoBos&#39; chipset with new UEFI firmware a dozen times or more, I \
have not<br>&gt; experienced any MoBo failures as yet.   Also, the ESP partition \
formatted with<br>&gt; FAT32 has remained quite resilient too.   No loss of data or \
fs corruption yet<br>&gt; (keeps fingers crossed and checks backups).<br>&gt;<br>&gt; \
My particular systems setup and use case suits this approach, but I \
appreciate<br>&gt; people who multiboot daily/frequently, or need to boot LiveISOs \
off the disk<br>&gt; may find GRUB and friends to be a more suitable \
solution.<br>&gt;<br>&gt;<br><div><br></div><div>My needs are quite simple but \
efibootmgr, set up by the Kubuntu install  </div><div>on a separate M.2 from the \
Windows install the machine came with, works for  </div><div>me. I always start the \
day in Kubuntu, then reboot to Windows if I&#39;m working</div><div>on \
music:</div><br>1) The simple view of the two installations:<br><br>mark@science2:~$ \
efibootmgr   <br>BootCurrent: 0003<br>Timeout: 1 seconds<br>BootOrder: \
0003,0000<br>Boot0000* Windows Boot Manager<br>Boot0003* \
ubuntu<br>mark@science2:~$<br><br>2) The more complicated view with GUIDs and \
such:<br><br>mark@science2:~$ efibootmgr -v<br>BootCurrent: 0003<br>Timeout: 1 \
seconds<br>BootOrder: 0003,0000<br>Boot0000* Windows Boot Manager   \
HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF<br>I\MICROSOFT\B \
OOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.- \
.4<br>.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................<br>Boot0003* \
ubuntu            HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUNTU<br>\SHIMX64.EFI)<br>mark@science2:~$<br><br>3) \
To get to Windows I can choose it in the OS screen if I&#39;m sitting there<div>but \
the most reliable way for me to get from Kubuntu to Windows is to just</div><div>tell \
the system to go  to Windows at the next boot using a batch file \
in</div><div>Kubuntu:</div><div><br>mark@science2:~$ cat bin/RebootWindows   <br>sudo \
efibootmgr -n 0000<br>reboot<br>mark@science2:~$</div><div><br></div><div>The \
&#39;problem&#39; with this setup is that all of the grub/efibootmgr \
stuff</div><div>is on both drives and I&#39;m never sure which drive is being used at \
</div><div>which time as I have Kubuntu on nvme1 and Windows boot</div><div>manager \
on nvme0 which I&#39;m never comfortable with but the  </div><div>Ubuntu stuff \
figured it out so I don&#39;t argue. Pity me if I ever have to</div><div>do a \
reinstall.</div><div><br></div>mark@science2:~$ df -h<br>Filesystem         Size   \
Used Avail Use% Mounted on<br>tmpfs                3.2G   3.7M   3.2G    1% \
/run<br>/dev/nvme1n1p3   916G   622G   248G   72% /<br>tmpfs                  16G    \
66M    16G    1% /dev/shm<br>tmpfs                5.0M   4.0K   5.0M    1% \
/run/lock<br>/dev/nvme0n1p1    96M    32M    65M   33% /boot/efi<br>tmpfs             \
3.2G    64K   3.2G    1% /run/user/1000<br>mark@science2:~$<div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic