EasyOS not detected by Grub

Moderator: BarryK

Post Reply
Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

EasyOS not detected by Grub

Post by Ngungu »

I have EndeavourOS (= Arch-based) installed, which uses Grub2.
I put EasyOS on a stick — works fine. Now I want EasyOS installed on my SSD, so I installed the 3 files in the ext4 partition.
I hadto put the boot folder in the boot/esp partition, but there is already the boot folder from Endeavour.

So I tried to fool the system by replacing Endeavour's bootx64.efi by EasyoS's BOOTX64.EFI in the boot folder. But when boot the computer the normal way the Grub menu is still there and does not show EasyOS. I put bootx64.efi back.

How can I get EasyOS in the bootloader menu? I don't mind if Grub is replaced by Limine, as long as Limine will show EndeavourOS too.

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Tue Feb 06, 2024 3:56 pm

I have EndeavourOS (= Arch-based) installed, which uses Grub2.
I put EasyOS on a stick — works fine. Now I want EasyOS installed on my SSD, so I installed the 3 files in the ext4 partition.
I hadto put the boot folder in the boot/esp partition, but there is already the boot folder from Endeavour.

So I tried to fool the system by replacing Endeavour's bootx64.efi by EasyoS's BOOTX64.EFI in the boot folder. But when boot the computer the normal way the Grub menu is still there and does not show EasyOS. I put bootx64.efi back.

How can I get EasyOS in the bootloader menu? I don't mind if Grub is replaced by Limine, as long as Limine will show EndeavourOS too.

You can install limine without remove the bootloader of Endeavour. Limine should be in another directory of the esp partition.

But here the easiest is to add EasyOS at the grub menu :

Source : https://easyos.org/install/easy-frugal- ... ation.html

You could add a stanza in the file /etc/grub.d/40_custom (in Endeavour) :

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /DIR/vmlinuz rw wkg_uuid=UUID wkg_dir=DIR
initrd /DIR/initrd
}

EDIT : addition of the missing brace

where UUID is the uuid of the ext4 partition where is located EasyOS and DIR is the diectory where are the 3 files (easy.sfs, vmlinuz and initrd)
NB you can get the uuid with the command blkid /dev/sdaX where sdaX is the ext4 partition

Then update grub.cfg with the command update-grub if it exists, if not with grub2-mkconfig -o /boot/grub2/grub.cfg (or /boot/grub/grub.cfg if grub.cfg is located in /boot/grub/)

NB: From the easyos web page

Something else that is useful to know: instead of wkg_uuid, you could use "wkg_label" or "wkg_dev", which for the above example would be "wkg_label=easy2" or "wkg_dev=sda3". However, you would need to be certain the filesystem label is unique. Also, for wkg_dev, you would need to be certain that the partition device name doesn't change; for removable drives, the device name is likely to change.

Last edited by Caramel on Thu Feb 08, 2024 2:26 pm, edited 2 times in total.
Clarity
Posts: 3317
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1370 times
Been thanked: 442 times

Re: EasyOS not detected by Grub

Post by Clarity »

Of the 3 choices wkg_uuid (for UUID of the drive partition), wkg_dev (for device partition) or wkg_label (for the name of the partition) Use of "wkg_label" is the best choice because USUALLY that label is/should be unique. Labels are safe and easy to identify for GRUB; understanding that a system's firmware at boot time might change the 'device' designator (for example sda3) from time to time..

Hope this comment is helpful for the GRUB2 stanza.

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

Caramel wrote: Tue Feb 06, 2024 5:58 pm
Ngungu wrote: Tue Feb 06, 2024 3:56 pm

I have EndeavourOS (= Arch-based) installed, which uses Grub2.
I put EasyOS on a stick — works fine. Now I want EasyOS installed on my SSD, so I installed the 3 files in the ext4 partition.
I hadto put the boot folder in the boot/esp partition, but there is already the boot folder from Endeavour.

So I tried to fool the system by replacing Endeavour's bootx64.efi by EasyoS's BOOTX64.EFI in the boot folder. But when boot the computer the normal way the Grub menu is still there and does not show EasyOS. I put bootx64.efi back.

How can I get EasyOS in the bootloader menu? I don't mind if Grub is replaced by Limine, as long as Limine will show EndeavourOS too.

You can install limine without remove the bootloader of Endeavour. Limine should be in another directory of the esp partition.

But here the easiest is to add EasyOS at the grub menu :

Source : https://easyos.org/install/easy-frugal- ... ation.html

You could add a stanza in the file /etc/grub.d/40_custom (in Endeavour) :

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /DIR/vmlinuz rw wkg_uuid=UUID wkg_dir=DIR
initrd /DIR/initrd

where UUID is the uuid of the ext4 partition where is located EasyOS and DIR is the diectory where are the 3 files (easy.sfs, vmlinuz and initrd)
NB you can get the uuid with the command blkid /dev/sdaX where sdaX is the ext4 partition

Then update grub.cfg with the command update-grub if it exists, if not with grub2-mkconfig -o /boot/grub2/grub.cfg (or /boot/grub/grub.cfg if grub.cfg is located in /boot/grub/)

I did all that, to no avail.

The Grub update gave this as a result:

Code: Select all

[sudo] password for ngungu: 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 155
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

Notice the the 3 files are detected, but there are errors so Grub did not update.
I then deleted the code that you recommended for 40_custom, and updated grub again. This time there were no errors and the 3 files were still recognized.

Code: Select all

sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
done

But a reboot still did not show EasyOS in the bootloader menu.

Then I again read this phrase you wrote: "… where is located EasyOS". That made me realize I had not installed EasyOS. But I am now completely confused because on the webpage you linked to it says this:

"To install EasyOS to the ext4 partition on the computer internal drive, copy those three files 'vmlinuz', 'initrd' and 'easy.sfs' across.

In the ext4 partition of the internal drive, create a folder, say "easyos", or, you could go deeper, say "easyos/dunfell", then copy those files into it.

Hey presto, EasyOS is installed!

Yes, that is all there is to it. EasyOS is installed in what we call "frugal mode", which only occupies one folder in the partition. Thus, the rest of the partition is available for anything else."

I had done this and was under the impression I had installed EasyOS, albeit in frugal mode.

n00b
Posts: 6
Joined: Thu Jul 06, 2023 2:43 pm
Been thanked: 1 time

Re: EasyOS not detected by Grub

Post by n00b »

Boot into EFI and select BOOTX64.EFI from the EFI menu (boot from EFI file)?

williwaw
Posts: 1629
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 147 times
Been thanked: 295 times

Re: EasyOS not detected by Grub

Post by williwaw »

Ngungu wrote: Wed Feb 07, 2024 8:34 am

But a reboot still did not show EasyOS in the bootloader menu.

I had done this and was under the impression I had installed EasyOS, albeit in frugal mode.

you can add an entry manually in grub.cfg
please post a copy of your grub.cfg in a codeblock and also, in another codeblock, post the output from running the blkid command.
also supply the complete path to your easy install folder. a screenshot of the filemanger window?

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

you can add an entry manually in grub.cfg

What is the correct syntax for that?

Grub

Code: Select all

#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  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
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
    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_GB
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
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
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'EndeavourOS Linux, with Linux linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-3a0684f9-871b-4c62-aa88-4418bb62d10b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=3a0684f9-871b-4c62-aa88-4418bb62d10b rw  resume=UUID=d1fd324d-93f6-460c-a015-f406df0168a3 loglevel=3 nowatchdog nvme_load=YES intel_pstate=passive module_blacklist=ideapad,ideapad_acpi
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry 'EndeavourOS Linux, with Linux linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-3a0684f9-871b-4c62-aa88-4418bb62d10b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=3a0684f9-871b-4c62-aa88-4418bb62d10b rw  resume=UUID=d1fd324d-93f6-460c-a015-f406df0168a3 loglevel=3 nowatchdog nvme_load=YES intel_pstate=passive module_blacklist=ideapad,ideapad_acpi
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}

### 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 ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### 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 ###

blkid command
blkid /dev/nvme0n1p2
/dev/nvme0n1p2: UUID="3a0684f9-871b-4c62-aa88-4418bb62d10b" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="8969e03d-df40-7247-b65c-e5464e96bded"

complete path to my easy install folder
dev/nvme0n1p2/easyos

Note: nvme0n1p2 is the ext4 root partiton

screenshot of my file manager

  1. I am not sure what you mean - what part of the file manager
  2. I cannot see a way to post screenshots - it seems I have to post it on a siter like Imgur and then give a link to that site's page?
Last edited by Ngungu on Thu Feb 08, 2024 11:27 am, edited 1 time in total.
williwaw
Posts: 1629
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 147 times
Been thanked: 295 times

Re: EasyOS not detected by Grub

Post by williwaw »

assuming /easyos (with easy.sfs, vmlinz and initrd) is in the same partition with the endevor install..........

you can rename your existing grub.cfg to grub.cfg-bak and create a new grub.cfg that contains...

Code: Select all

#
# 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 ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  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
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
    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_GB
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
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
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'EndeavourOS Linux, with Linux linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-3a0684f9-871b-4c62-aa88-4418bb62d10b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=3a0684f9-871b-4c62-aa88-4418bb62d10b rw  resume=UUID=d1fd324d-93f6-460c-a015-f406df0168a3 loglevel=3 nowatchdog nvme_load=YES intel_pstate=passive module_blacklist=ideapad,ideapad_acpi
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}

menuentry 'EndeavourOS Linux, with Linux linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-3a0684f9-871b-4c62-aa88-4418bb62d10b' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=3a0684f9-871b-4c62-aa88-4418bb62d10b rw  resume=UUID=d1fd324d-93f6-460c-a015-f406df0168a3 loglevel=3 nowatchdog nvme_load=YES intel_pstate=passive module_blacklist=ideapad,ideapad_acpi
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}

menuentry 'EasyOs'{
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
	echo	'Loading Linux linux ...'
	linux /easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=easyos
	echo	'Loading initial ramdisk ...'
	initrd /easyos/initrd
}
### 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 ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### 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 ###

I have added a stanza for easyos to yours by modifying three lines of an existing stanza. Edits as caramel has suggested above. lines 116, 124 and 125

not sure why the endevor /ect/grub.d script failed, but see if this gets you working.

Last edited by williwaw on Thu Feb 08, 2024 8:27 am, edited 1 time in total.
Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Caramel wrote: Tue Feb 06, 2024 5:58 pm

But here the easiest is to add EasyOS at the grub menu :

I had copied the stanza of the page https://easyos.org/install/easy-frugal- ... ation.html without seiing that a final brace is missing

Corrected stanza :

Code: Select all

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /DIR/vmlinuz rw wkg_uuid=UUID wkg_dir=DIR
initrd /DIR/initrd
}
Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

[/quote]
I had copied the stanza of the page https://easyos.org/install/easy-frugal- ... ation.html without seiing that a final brace is missing

Corrected stanza :

Code: Select all

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /DIR/vmlinuz rw wkg_uuid=UUID wkg_dir=DIR
initrd /DIR/initrd
}

[/quote]

Hi Caramel, thanks for the feedback. Yes, EasyOS now does appear in the Grub, that is good news.
However, it does not load EasyOS because it says vmlinuz is not in dev/nvme0n1p2.

I don't understand that because when I searched for vmlinuz, it IS there

Code: Select all

/easyos/vmlinuz
/lib/modules/6.1.7-arch1-1/vmlinuz
/boot/vmlinuz-linux

BTW, the info in this code block is obtained with the Endeavour file manager. I also checked via EasyOS and it also shows vmlinuz in nvme0n1p2.
What did I do wrong?

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Thu Feb 08, 2024 12:10 pm

EasyOS now does appear in the Grub, that is good news.
However, it does not load EasyOS because it says vmlinuz is not in dev/nvme0n1p2.

I don't understand that because when I searched for vmlinuz, it IS there

Code: Select all

/easyos/vmlinuz
/lib/modules/6.1.7-arch1-1/vmlinuz
/boot/vmlinuz-linux

BTW, the info in this code block is obtained with the Endeavour file manager. I also checked via EasyOS and it also shows vmlinuz in nvme0n1p2.
What did I do wrong?

Les 2 last lines are files from Endeavour

In the stanza it's the part "wkg_uuid=UUID wkg_dir=DIR" that allows the initrd to find vmlinuz

Could you please share your personalized stanza ?

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

Could you please share your personalized stanza ?

Code: Select all

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=UUID wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}
Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Thu Feb 08, 2024 2:10 pm

Could you please share your personalized stanza ?

Code: Select all

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root UUID
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=UUID wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}

You need to change the two UUID with the uuid de la partition
Try

Code: Select all

blkid /dev/nvme0n1p2 

to get this uuid

an uuid is a sequence of letters and numbers like 054a04b8-0f00-11ed-aeb9-287fcfeb4376

And then update grub.

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

You need to change the two UUID with the uuid de la partition
Try

Code: Select all

blkid /dev/nvme0n1p2 

to get this uuid

And then update grub.

Quel couillon que je suis! Excusez l'expression mais c'est la seule approprié.

After your 1st instruction I had added correctly, but in the 2nd iteration I was so eager, therefore hasty, that I only changed the DIR instances, not the UUID.
Anyway, I corrected the stanza, and this is what it looks like now:

Code: Select all

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}

I updated Grub, then rebooted; it gives 3 lines:
line 1: error /dev/nveme0n1p2/easyos/vmlinuz not found
line 2: error you need to load the kernel first
line 3:"press any key to continue", and when I do that it goes back to the Grub screen.

I am sure vmlinuz is in /dev/nveme0n1p2/easyos/, I checked it 3 times.

Last edited by Ngungu on Fri Feb 09, 2024 5:49 am, edited 1 time in total.
Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Thu Feb 08, 2024 4:07 pm

Quel couillon que je suis! Excusez l'expression mais c'est la seule approprie.

Moi, c'est pas mieux. J'avais une autre erreur sous mon nez et je n'ai rien vu!

Replace

linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd

with

linux /easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=easyos
initrd /easyos/initrd

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

Replace

linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd

with

linux /easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=easyos
initrd /easyos/initrd

I did that, alas I got the exact same 3 lines.

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Fri Feb 09, 2024 5:09 am

I did that, alas I got the exact same 3 lines.

Have you update grub ?

PS : if update-grub is too slow, you can instead directly edit grub.cfg (same modifications as those made on 40_custom). Be careful, if there is an error, the boot could be broken and you would have to use another OS to repair

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

Have you update grub ?

Yes, I did do that.

PS : if update-grub is too slow, you can instead directly edit grub.cfg (same modifications as those made on 40_custom). Be careful, if there is an error, the boot could be broken and you would have to use another OS to repair

So, I put the stanza in /etc/default/grub below the last paragraph in that file, as follows:

Code: Select all

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}

But when I do sudo grub-mkconfig -o /boot/grub/grub.cfg (that is the syntax on an Arch-based system), then the terminal says:

/etc/default/grub: line 66: menuentry: command not found.

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Fri Feb 09, 2024 8:15 am

So, I put the stanza in /etc/default/grub below the last paragraph in that file

Do no modify /etc/default/grub. I was talking about /boot/grub/grub.cfg. And if you update grub by a command, do no touch this file either

Ngungu wrote: Thu Feb 08, 2024 4:07 pm

I updated Grub, then rebooted; it gives 3 lines:
line 1: error /dev/nveme0n1p2/easyos/vmlinuz not found
line 2: error you need to load the kernel first
line 3:"press any key to continue", and when I do that it goes back to the Grub screen.

I am sure vmlinuz is in /dev/nveme0n1p2/easyos/, I checked it 3 times.

Ngungu wrote: Fri Feb 09, 2024 5:09 am

Replace

linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd

with

linux /easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=easyos
initrd /easyos/initrd

I did that, alas I got the exact same 3 lines.

If you have deleted /dev/nveme0n1p2/ in 40_custom and then rebooted, how could it be still in grub.cfg ?

Please share grub.cfg (at least the EasyOS stanza).

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

Do no modify /etc/default/grub. I was talking about /boot/grub/grub.cfg. And if you update grub by a command, do no touch this file either

Sorry about that. I have now deleted the stanza from /etc/default/grub. Then I opened /boot/grub/grub.cfg, and guess what .... the stanza is there!

If you have deleted /dev/nveme0n1p2/ in 40_custom and then rebooted, how could it be still in grub.cfg ?

Of course I have not deleted it, why would I? I have no reason to do so.

Please share grub.cfg (at least the EasyOS stanza).

Here it is:

Code: Select all

### 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.
menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}
### END /etc/grub.d/40_custom ###
williwaw
Posts: 1629
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 147 times
Been thanked: 295 times

Re: EasyOS not detected by Grub

Post by williwaw »

Do you have a second way to boot if something prevents endevor from booting?
A live cd or usb?
Also, it's always good pratice to make a renamed copy of any file you want to open for editing.

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Fri Feb 09, 2024 8:56 am

Do no modify /etc/default/grub. I was talking about /boot/grub/grub.cfg. And if you update grub by a command, do no touch this file either

Sorry about that. I have now deleted the stanza from /etc/default/grub. Then I opened /boot/grub/grub.cfg, and guess what .... the stanza is there!

If you have deleted /dev/nveme0n1p2/ in 40_custom and then rebooted, how could it be still in grub.cfg ?

Of course I have not deleted it, why would I? I have no reason to do so.

Please share grub.cfg (at least the EasyOS stanza).

Here it is:

Code: Select all

### 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.
menuentry "EasyOS " {
insmod ext2
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 3a0684f9-871b-4c62-aa88-4418bb62d10b
linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd
}
### END /etc/grub.d/40_custom ###

By deleted /dev/nveme0n1p2/ in 40_custom i mean remove the text /dev/nveme0n1p2 in the text file 40_custom by replacing

linux /dev/nvme0n1p2/easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=/dev/nvme0n1p2/easyos
initrd /dev/nvme0n1p2/easyos/initrd

with

linux /easyos/vmlinuz rw wkg_uuid=3a0684f9-871b-4c62-aa88-4418bb62d10b wkg_dir=easyos
initrd /easyos/initrd

When you update grub, the modifications of 40_custom are transferred to grub.cfg. So if /dev/nveme0n1p2 is no longer in 40_custom, it must no longer be in grub.cfg

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

When you update grub, the modifications of 40_custom are transferred to grub.cfg. So if /dev/nveme0n1p2 is no longer in 40_custom, it must no longer be in grub.cfg

I manually removed /dev/nveme0n1p2 from /boot and it worked, I was able to boot into EasyOS!
You are a star ★ Many thanks for your help, and esp. your patience. Je vous remercie pour tout.

Caramel
Posts: 332
Joined: Sun Oct 02, 2022 6:25 pm
Location: France
Has thanked: 78 times
Been thanked: 55 times

Re: EasyOS not detected by Grub

Post by Caramel »

Ngungu wrote: Fri Feb 09, 2024 9:36 am

I manually removed /dev/nveme0n1p2 from /boot and it worked, I was able to boot into EasyOS!

It is important to have the right stanza in 40_custom. When Endeavour will update a kernel, it will update grub and so replace the stanza in grub.cfg by the one that is in 40_custom.

And also a good advice from @williwaw

williwaw wrote: Fri Feb 09, 2024 9:09 am

Do you have a second way to boot if something prevents endevor from booting?
A live cd or usb?
Also, it's always good pratice to make a renamed copy of any file you want to open for editing.

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

williwaw wrote: Fri Feb 09, 2024 9:09 am

Do you have a second way to boot if something prevents endevor from booting?
A live cd or usb?

The original .iso I downloaded is on a USB and I still have that, but since Endeavour is a rolling release, the iso quickly gets out of date.
Furthermore, with the USB I cannot boot into the disk where Endeavour is stored, can I?

Also, it's always good pratice to make a renamed copy of any file you want to open for editing.

You mean, like in this case make a copy of the pre-edited version of grub.cfg and save that under a different name, and use it if the edited version of grub.cfg does not work?

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

williwaw wrote: Thu Feb 08, 2024 8:25 am

assuming /easyos (with easy.sfs, vmlinz and initrd) is in the same partition with the endevor install..........

you can rename your existing grub.cfg to grub.cfg-bak and create a new grub.cfg that contains...

I have added a stanza for easyos to yours by modifying three lines of an existing stanza. Edits as caramel has suggested above. lines 116, 124 and 125

not sure why the endevor /ect/grub.d script failed, but see if this gets you working.

Couple of things:

  • The grub code I provided you with might be etc/grub.d/grub — would that be the same as from /boot/grub?
  • Since Caramel got the boot loader working, is it still worthwhile replacing it with your amended grub.cfg version?
williwaw
Posts: 1629
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 147 times
Been thanked: 295 times

Re: EasyOS not detected by Grub

Post by williwaw »

Furthermore, with the USB I cannot boot into the disk where Endeavour is stored, can I?

not boot into the endevor on disk, but whenthe machine is booted from the USB, it can allow you to repair a misconfiguration on the endevor disk filesystem, if you should happen break something in /etc/default/grub,

As Caramel mentioned above, as long as you are maintaing endevor on the disk, endevor will run grub updates when you update endevor, so your best bet is to use 40_custom to do all your other grub configurations for you also.

if you choose to make manual edits of /boot/grub.cfg, you will most likely find your easyos edit gone after an endevor update., but having a /boot/grub.cfg-bak along side either grub.cfg in /boot or 40_custom makes the stanza cut and paste easy.

grub-mkconfig may find the easyos vimlinuz and initrd, but I have my doubts that it is smart enough about easyos to be able to write the wkg_uuid ot dir parameter on the linux line of the stanza

Since Caramel got the boot loader working, is it still worthwhile replacing it with your amended grub.cfg version?

No, the stanza are the same, I do not think the manual method will serve you best at this point. it was suggested as a way to trouble shoot your problems.

try putting the corrected stanza into 40_custom and running the mkconfig script if you wnat to get the automation working.

Ngungu
Posts: 13
Joined: Tue Feb 06, 2024 3:40 pm

Re: EasyOS not detected by Grub

Post by Ngungu »

@williwaw OK, that is clear. Many thanks for your help and advice.

Post Reply

Return to “EasyOS”