EndeavourOS/ArcoLinux Dual boot issue

To find out if grub is the problem, could you run the following command:

  cat /boot/grub/grub.cfg | curl -F 'f:1=<-' ix.io

and show the returrned URL here?

You may try a custom grub entry for ArcoLinux like that:

menuentry "ArcoLinux" --class arch {
        insmod part_gpt
        insmod chain
        set root='(hd0,gpt2)'
        chainloader /EFI/ArcLinux/grubx64.efi
}

Main advantage: this is update proof. Disadvantage: you have to go through a second grub.

@csteinforth
That’s a great idea. And that should be written into file /boot/grub/custom.cfg, then it will automatically be included.

isn’t this an very old issue with archbased systems and grub?

i do have this till ever… i can boot only the last installed archbased install all other entries will be regenerated but not working…

Yes, the real reason is two packages: grub and os-prober. Their co-operation is erroneous with the ‘initrd’ line generated into grub.cfg. As the packages are separately developed, they do not fix this problem together like they should.

The issue is with all distros that use those packages, but it affects (AFAIK) only Arch based distros, as the microcode is added in a different way to other distros.

The fix has been presented years ago several times publicly, but nothing has happened to it. :frowning:

2 Likes

Actually, that package includes a real fix for grub and os-prober.

I wonder how many more years it takes for those devs to see the problem and the fix.

But you have the super powers to fix it… not pushing you or something… :upside_down_face: :smiling_imp:

1 Like

As soon as you put this into, say, /etc/grub.d/40_custom, and do a sudo grub-mkconfig -o /boot/grub/grub.cfg you are safe.

There are two issues with that approach:

  • if grub (or os-prober) package is updated, file 40_custom may be overwritten
  • you have to re-generate grub.cfg

Putting your menu entry into /boot/grub/custom.cfg will solve both issues.

But we might have even a better solution under consideration. Let’s see if we can create that solution, we’ll keep you all updated! :smile:

1 Like

I hope there can be a solution because i had this back when i was using Antergos and the only way i could get it to work was either not install grub on one distro and let the other handle it. With manjaro it seemed to work if i installed it last.

Out of curiosity, does that happens with Legacy BIOS too or is EFI related?

IIRC correctly arch linux related the menu entries are missing the
/boot/initramfs-linux.img
So will happen on EFI or Legacy

1 Like

@Christopher67
Is it possible you could give the output of the link for the command that @manuel has asked for so we can try to resolve you black screen issue?

cat /boot/grub/grub.cfg | curl -F ‘f:1=<-’ ix.io

I get this when running that command.

cat: /boot/grub/grub.cfg: Permission denied

Sorry everyone, forum rules made me wait 16hours before i could post again.

2 Likes
sudo cat /boot/grub/grub.cfg
2 Likes

Should i post the output here?

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
set root=‘hd0,gpt2’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-ieee1275=‘ieee1275//disk@0,gpt2’ --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0ae0df73-41df-4a79-8819-0f40ce615432
else
search --no-floppy --fs-uuid --set=root 0ae0df73-41df-4a79-8819-0f40ce615432
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_US
insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root=‘hd0,gpt2’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-ieee1275=‘ieee1275//disk@0,gpt2’ --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0ae0df73-41df-4a79-8819-0f40ce615432
else
search --no-floppy --fs-uuid --set=root 0ae0df73-41df-4a79-8819-0f40ce615432
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/EndeavourOS/unifont-regular-16.pf2
insmod png
set theme=($root)/boot/grub/themes/EndeavourOS/theme.txt
export theme
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-0ae0df73-41df-4a79-8819-0f40ce615432’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root=‘hd0,gpt2’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-ieee1275=‘ieee1275//disk@0,gpt2’ --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0ae0df73-41df-4a79-8819-0f40ce615432
else
search --no-floppy --fs-uuid --set=root 0ae0df73-41df-4a79-8819-0f40ce615432
fi
echo ‘Loading Linux linux …’
linux /boot/vmlinuz-linux root=UUID=0ae0df73-41df-4a79-8819-0f40ce615432 rw quiet resume=UUID=c8f17948-b6ef-40a4-a150-7b50b051197f loglevel=3
echo ‘Loading initial ramdisk …’
initrd /boot/amd-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-0ae0df73-41df-4a79-8819-0f40ce615432’ {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root=‘hd0,gpt2’
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-ieee1275=‘ieee1275//disk@0,gpt2’ --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 0ae0df73-41df-4a79-8819-0f40ce615432
else
search --no-floppy --fs-uuid --set=root 0ae0df73-41df-4a79-8819-0f40ce615432
fi
echo ‘Loading Linux linux …’
linux /boot/vmlinuz-linux root=UUID=0ae0df73-41df-4a79-8819-0f40ce615432 rw quiet resume=UUID=c8f17948-b6ef-40a4-a150-7b50b051197f loglevel=3
echo ‘Loading initial ramdisk …’
initrd /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

menuentry 'ArcoLinux Linux (on /dev/nvme0n1p1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--18d84e9a-9534-4318-8adc-e35d2c1cb786' {
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  18d84e9a-9534-4318-8adc-e35d2c1cb786
	else
	  search --no-floppy --fs-uuid --set=root 18d84e9a-9534-4318-8adc-e35d2c1cb786
	fi
	linux /boot/vmlinuz-linux root=UUID=18d84e9a-9534-4318-8adc-e35d2c1cb786 rw quiet resume=UUID=ebe974e1-8b4f-41af-9402-09d6a5dda2c0 loglevel=3
	initrd /boot/amd-ucode.img
}
menuentry 'ArcoLinux Linux, with Linux linux (on /dev/nvme0n1p1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--18d84e9a-9534-4318-8adc-e35d2c1cb786' {
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  18d84e9a-9534-4318-8adc-e35d2c1cb786
	else
	  search --no-floppy --fs-uuid --set=root 18d84e9a-9534-4318-8adc-e35d2c1cb786
	fi
	linux /boot/vmlinuz-linux root=UUID=18d84e9a-9534-4318-8adc-e35d2c1cb786 rw quiet resume=UUID=ebe974e1-8b4f-41af-9402-09d6a5dda2c0 loglevel=3
	initrd /boot/amd-ucode.img
}
menuentry 'ArcoLinux Linux, with Linux linux (fallback initramfs) (on /dev/nvme0n1p1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--18d84e9a-9534-4318-8adc-e35d2c1cb786' {
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  18d84e9a-9534-4318-8adc-e35d2c1cb786
	else
	  search --no-floppy --fs-uuid --set=root 18d84e9a-9534-4318-8adc-e35d2c1cb786
	fi
	linux /boot/vmlinuz-linux root=UUID=18d84e9a-9534-4318-8adc-e35d2c1cb786 rw quiet resume=UUID=ebe974e1-8b4f-41af-9402-09d6a5dda2c0 loglevel=3
	initrd /boot/initramfs-linux-fallback.img
}

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

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

1 Like

@Christopher67
Right, the problem seems to be in the initrd lines.

To fix it, run the following commands (as-is) on EndeavourOS:

sudo pacman -Syu
sudo pacman -S grub-tools
sudo pacman -S grub os-prober
sudo grub-mkconfig -o /boot/grub/grub.cfg
reboot

and now you should be able to boot to either one of the distros.

5 Likes

@manuel

Where is the error exactly? I’m trying to decipher it looking at it. Because i see it loads the amd ucode? Which line is the culprit do you believe?