[Solved] Multiple folders in EFI partition

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

[Solved] Multiple folders in EFI partition

#1 Post by hades »

I installed Debian on my machine which had Linux Mint previously. I used the same SSD and formatted and partitioned it during the installation process. However I have to manually boot Debian each time through the GRUB shell using the following commands.

Code: Select all

set root=(hd0,gpt2)
set prefix=($root)/boot/grub
configfile $prefix/grub.cfg
I looked at the root and prefix variable before setting them and they were (hd0,gpt1) and (hd0,gpt1)/boot/grub respectively.
The (hd0,gpt1) is the EFI partition and it contains three folders: /efi -> /ubuntu /boot /debian.

What can I do to directly boot up Debian on start? There aren't any other OSes in the machine.
I did see a solution in this forum to manually remove the /ubuntu and /boot folder. But wouldn't removing them cause problems?
Last edited by hades on 2024-08-30 06:43, edited 1 time in total.

User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [Installation] Multiple folders in EFI partition

#2 Post by sunrat »

Show us the output of:

Code: Select all

efibootmgr
also install the package boot-info-script, run it and post the output.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#3 Post by hades »

Here is the output of efibootmgr

Code: Select all

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2001,2002,2004
Boot0000* ubuntu
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk
And here is the output of bootinfoscript

Code: Select all

                 Boot Info Script 0.78      [09 October 2019]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi 
                       /efi/debian/fbx64.efi /efi/debian/grubx64.efi 
                       /efi/debian/mmx64.efi /efi/debian/shimx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/debian/grub.cfg 
                       /efi/ubuntu/grub.cfg

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 12 (bookworm)
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda3: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb: ___________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: CT250MX500SSD1  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1   488,397,167   488,397,167  ee GPT


GUID Partition Table detected.

Partition  Attrs   Start Sector    End Sector  # of Sectors System
/dev/sda1                 2,048     1,050,623     1,048,576 EFI System partition
/dev/sda2             1,050,624   486,395,903   485,345,280 Data partition (Linux)
/dev/sda3           486,395,904   488,396,799     2,000,896 Swap partition (Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        7FC4-548F                              vfat       
/dev/sda2        bed3d46f-4053-42e6-a47c-ddc915196b3a   ext4       
/dev/sda3        e00ce4a8-d8ea-42a2-a795-52d8c195c002   swap       
/dev/sdb                                                           

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 Aug 26 12:53 ata-CT250MX500SSD1_2213E6212A2C -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 26 12:53 ata-CT250MX500SSD1_2213E6212A2C-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 26 12:53 ata-CT250MX500SSD1_2213E6212A2C-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 26 12:53 ata-CT250MX500SSD1_2213E6212A2C-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Aug 26 12:53 ata-HGST_HTS541010A9E680_JD100ADM06J9AK -> ../../sdb
lrwxrwxrwx 1 root root  9 Aug 26 12:53 wwn-0x5000cca827c2f76b -> ../../sdb
lrwxrwxrwx 1 root root  9 Aug 26 12:53 wwn-0x500a0751e6212a2c -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 26 12:53 wwn-0x500a0751e6212a2c-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 26 12:53 wwn-0x500a0751e6212a2c-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 26 12:53 wwn-0x500a0751e6212a2c-part3 -> ../../sda3

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sda2        /                        ext4       (rw,relatime,errors=remount-ro)


========================== sda1/efi/debian/grub.cfg: ===========================

--------------------------------------------------------------------------------
search.fs_uuid bed3d46f-4053-42e6-a47c-ddc915196b3a root hd1,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--------------------------------------------------------------------------------

========================== sda1/efi/ubuntu/grub.cfg: ===========================

--------------------------------------------------------------------------------
search.fs_uuid e580da07-8daa-4125-bb59-ac76ffcc25f9 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--------------------------------------------------------------------------------

=========================== sda2/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
else
  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_IN
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
else
  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
fi
insmod png
if background_image /usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
	else
	  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
	fi
	echo	'Loading Linux 6.1.0-23-amd64 ...'
	linux	/boot/vmlinuz-6.1.0-23-amd64 root=UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-6.1.0-23-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-23-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-23-amd64-advanced-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
		else
		  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
		fi
		echo	'Loading Linux 6.1.0-23-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-23-amd64 root=UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-23-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-23-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-23-amd64-recovery-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
		else
		  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
		fi
		echo	'Loading Linux 6.1.0-23-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-23-amd64 root=UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-23-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-22-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-22-amd64-advanced-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
		else
		  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
		fi
		echo	'Loading Linux 6.1.0-22-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-22-amd64 root=UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-22-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 6.1.0-22-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-22-amd64-recovery-bed3d46f-4053-42e6-a47c-ddc915196b3a' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  bed3d46f-4053-42e6-a47c-ddc915196b3a
		else
		  search --no-floppy --fs-uuid --set=root bed3d46f-4053-42e6-a47c-ddc915196b3a
		fi
		echo	'Loading Linux 6.1.0-22-amd64 ...'
		linux	/boot/vmlinuz-6.1.0-22-amd64 root=UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-6.1.0-22-amd64
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda2/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=bed3d46f-4053-42e6-a47c-ddc915196b3a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdb1 during installation
UUID=7FC4-548F  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sdb3 during installation
UUID=e00ce4a8-d8ea-42a2-a795-52d8c195c002 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda2: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  72.634387970 = 77.990580224   boot/grub/grub.cfg                             1
 210.453899384 = 225.973153792  boot/vmlinuz-6.1.0-22-amd64                    1
  48.438274384 = 52.010201088   boot/vmlinuz-6.1.0-23-amd64                    1
  48.438274384 = 52.010201088   vmlinuz                                        1
 210.453899384 = 225.973153792  vmlinuz.old                                    1
  32.412536621 = 34.802696192   boot/initrd.img-6.1.0-22-amd64                 1
 129.229511261 = 138.759131136  boot/initrd.img-6.1.0-23-amd64                 1
 129.229511261 = 138.759131136  initrd.img                                     1
  32.412536621 = 34.802696192   initrd.img.old                                 1



User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [Installation] Multiple folders in EFI partition

#4 Post by sunrat »

Set Debian as first in EFI boot order (as sudo or root):

Code: Select all

efibootmgr -o 0002,2001,2002,2004
Remove the ubuntu entry:

Code: Select all

efibootmgr -b 0000 -B
You may have to update-grub as well.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#5 Post by hades »

So I tried this two times. The first time I did this I noticed there was no command for update-grub. So I ran it with:

Code: Select all

sudo grub-mkconfig -o /boot/grub/grub.cfg
But upon restarting I was greeted with the GRUB shell.
I booted it normally and ran efibootmgr to find ubuntu and the old boot order again!

I decided to try it again but now it cannot find the grub-mkconfig command...
Not only that grub-install command is missing as well.

User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [Installation] Multiple folders in EFI partition

#6 Post by sunrat »

What do you mean "no command" "command is missing"?
Post the exact commands you ran including the exact error messages. Don't paraphrase.
Did you run with sudo or as root with su? You need to use "su -" for root to run those commands.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#7 Post by hades »

I am sorry. So for both the commands I received a "command not found" error

Code: Select all

bash: update-grub: command not found
And the output I received for the efibootmgr commands were:

Code: Select all

hades@hades:~$ sudo efibootmgr -o 0002,2001,2002,3000
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,2001,2002,3000
Boot0000* ubuntu
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

hades@hades:~$ sudo efibootmgr -b 0000 -B
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,2001,2002,3000
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk
Here is what I got for running the mkconfig one

Code: Select all

hades@hades:~$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-23-amd64
Found initrd image: /boot/initrd.img-6.1.0-23-amd64
Found linux image: /boot/vmlinuz-6.1.0-22-amd64
Found initrd image: /boot/initrd.img-6.1.0-22-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
But it was my mistake I didn't try running the update-grub as root. How do I run it as root because the root user is disabled I think

Code: Select all

hades@hades:~$ su -
Password: 
su: Authentication failure

User avatar
sunrat
Site admin
Site admin
Posts: 7320
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 130 times
Been thanked: 640 times

Re: [Installation] Multiple folders in EFI partition

#8 Post by sunrat »

You should be able to run update-grub with sudo:

Code: Select all

sudo update-grub
Or to create a password for root:

Code: Select all

sudo passwd root
Then you should be able to get root with su -
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#9 Post by hades »

Unfortunately that didn't work :/
I ran the efibootmgr commands as before

Code: Select all

hades@hades:~$ sudo efibootmgr -o 0002,2001,2002,3000
[sudo] password for hades: 
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,2001,2002,3000
Boot0000* ubuntu
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

hades@hades:~$ sudo efibootmgr -b 0000 -B
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,2001,2002,3000
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk
Then the update-grub using sudo

Code: Select all

hades@hades:~$ sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-23-amd64
Found initrd image: /boot/initrd.img-6.1.0-23-amd64
Found linux image: /boot/vmlinuz-6.1.0-22-amd64
Found initrd image: /boot/initrd.img-6.1.0-22-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
It seemed to work but I had to enter through the grub shell again as usual
This was the output of efibootmgr after booting up

Code: Select all

hades@hades:~$ efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0002,2001,2002,2004
Boot0000* ubuntu
Boot0002* debian
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot3000* Internal Hard Disk or Solid State Disk

mrmazda
Posts: 499
Joined: 2023-06-02 02:22
Has thanked: 14 times
Been thanked: 62 times

Re: [Installation] Multiple folders in EFI partition

#10 Post by mrmazda »

If /boot/efi/EFI/ubuntu still exists, remove it, then run sudo efibootmgr -b 0000 -B. Some BIOS don't like to accept efibootmgr removals for currently existing ESP directories.

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#11 Post by hades »

That worked! @sunrat and @mrmazda thank you for your help! Any reason that ubuntu folder was there in /boot/efi/EFI/? Maybe because I had used Mint on this machine before?

mrmazda
Posts: 499
Joined: 2023-06-02 02:22
Has thanked: 14 times
Been thanked: 62 times

Re: [Installation] Multiple folders in EFI partition

#12 Post by mrmazda »

hades wrote: 2024-08-29 17:14 Any reason that ubuntu folder was there in /boot/efi/EFI/? Maybe because I had used Mint on this machine before?
No maybe about it. Mint is a Ubuntu derivative. That both use that same directory by default creates no small amount of consternation among would-be multibooters of the both of them.

hades
Posts: 7
Joined: 2024-08-26 05:44
Has thanked: 2 times

Re: [Installation] Multiple folders in EFI partition

#13 Post by hades »

I see. That makes sense. Again thank you for your help! I'll mark this as solved.

Post Reply