On Monday, 17 April 2023 14:31:08 BST Mark Knecht wrote:

> 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\UBUN
> TU \SHIMX64.EFI)
> mark@science2:~$

This shows the efibootmgr is using the first disk and boots the Windows 
BOOTMGFW.EFI, or Ubuntu's shimX64.efi from there.


> 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 

Are you sure?


> 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

This is where the ESP is mounted, but you'll find /boot directory is on your /
dev/nvme1n1p3 block device, along with your kernels, initrd images and 
vimlinuz symlinks.

Your GRUB EFI bootable image is on /dev/nvme0n1p1, under /boot/efi/EFI/ubuntu/

> tmpfs           3.2G   64K  3.2G   1% /run/user/1000
> mark@science2:~$

I would think Ubuntu installed GRUB on nvme0n1p1 ESP, which it detected by 
scanning your disks.  If your nvme0n1p1 fails and has to be removed, you will 
need to create a new ESP somewhere on the ubuntu disk and then you can 
reinstall GRUB after you reboot with a LiveUSB, or while still running ubuntu.




Reply via email to