This all started when I screwed-up shrinking sda, where EndeavourOS is installed. I did not wait long enough and Gparted didn’t complete it’s incantations to shrink sda1. I then could not boot EndeavourOS. This was several days ago. After messing things up beyond repair I decided to reinstall EndeavourOS. It runs great, always did. Arch on sdb booted fine before reinstall.
Now Arch won’t boot on sdb6:
This is a bios boot system, old hardware.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 195.6G 0 part /
└─sda2 8:2 0 8.8G 0 part
sdb 8:16 0 931.5G 0 disk
├─sdb2 8:18 0 1K 0 part
├─sdb5 8:21 0 7.7G 0 part
└─sdb6 8:22 0 199.6G 0 part /run/media/martin/Arch_root
sdc 8:32 1 0B 0 disk
sr0 11:0 1 1024M 0 rom
$ sudo fdisk -l
[sudo] password for martin:
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-75Z
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0584c098
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 410234879 410232832 195.6G 83 Linux
/dev/sda2 1935065126 1953520064 18454939 8.8G 82 Linux swap / Solaris
Partition 2 does not start on physical sector boundary.
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-00B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000c6971
Device Boot Start End Sectors Size Id Type
/dev/sdb2 499710 1953523711 1953024002 931.3G 5 Extended
/dev/sdb5 1937301504 1953523711 16222208 7.7G 82 Linux swap / Solaris
/dev/sdb6 163192832 581883903 418691072 199.6G 83 Linux
Partition 2 does not start on physical sector boundary.
Partition table entries are not in disk order.
$ sudo sudo grub-mkconfig -o /boot/grub/grub.cfg
[sudo] password for martin:
Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
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.
Found Arch Linux (rolling) on /dev/sdb6
done
Is this what you want? The Arch grub.cfg is locked/I haven’t figured out how to view it.
}
menuentry 'Arch Linux, with Linux linux (on /dev/sdb6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--c6a6300e-f0cc-410c-99fb-861a4d014a82' {
savedefault
insmod part_msdos
insmod ext2
set root='hd1,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 c6a6300e-f0cc-410c-99fb-861a4d014a82
else
search --no-floppy --fs-uuid --set=root c6a6300e-f0cc-410c-99fb-861a4d014a82
fi
linux /boot/vmlinuz-linux root=UUID=c6a6300e-f0cc-410c-99fb-861a4d014a82 rw loglevel=3
initrd /boot/intel-ucode.img
}
Since every version of linux does things slightly differently, this is no mean feat, techniques used include parsing /etc/fstab, rummaging around in /boot, parsing grub menu.lst files, etc.
So I checked my Arch fstab and it’s bogus! I accumulated comments that just cause potential errors with parsing.
# /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).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=d65191dc-5320-4ec4-9e3b-9f8455fc4f11 / ext4 defaults,noatime 0 1
Thanks Rick that section of the Eos /boot/grub/grub,cfg is referenced in post #5.
Here is a link to the whole Eos grub.cfg
and the Arch grub.cfg. as well.
Thanks for your interest and all help is welcome.
menuentry 'EndeavourOS Linux (rolling) (on /dev/sda1)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-d65191dc-5320-4ec4-9e3b-9f8455fc4f11' {
savedefault
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 d65191dc-5320-4ec4-9e3b-9f8455fc4f11
else
search --no-floppy --fs-uuid --set=root d65191dc-5320-4ec4-9e3b-9f8455fc4f11
fi
linux /boot/vmlinuz-linux root=UUID=d65191dc-5320-4ec4-9e3b-9f8455fc4f11 rw loglevel=3 nowatchdog
initrd /boot/intel-ucode.img
}
nor EnOS
menuentry 'Arch Linux, with Linux linux (on /dev/sdb6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--c6a6300e-f0cc-410c-99fb-861a4d014a82' {
savedefault
insmod part_msdos
insmod ext2
set root='hd1,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos6 --hint-efi=hd1,msdos6 --hint-baremetal=ahci1,msdos6 c6a6300e-f0cc-410c-99fb-861a4d014a82
else
search --no-floppy --fs-uuid --set=root c6a6300e-f0cc-410c-99fb-861a4d014a82
fi
linux /boot/vmlinuz-linux root=UUID=c6a6300e-f0cc-410c-99fb-861a4d014a82 rw loglevel=3
initrd /boot/intel-ucode.img
}
seems to have produced the correct initrd line for the other OS.
Has there been any changes/updates to the package grub lately?
Ditch os-prober @kmartin. Avoid strange issues like this one.
I always recommend a primary Linux system (ie first in efi boot order), and grub chainload all others.
In your case EndOS is primary and Arch would be secondary, but you could also chainload EndOS just as easily within Arch system.
This is much easier to manage, much less prone to stupid os-prober / grub issues & regressions, and is the same simple syntax for encrypted or non encrypted systems.
/etc/grub.d/40_custom :
#!/bin/sh
exec tail -n +3 $0
# 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 "[Distro Name]" {
set root="hdX,gptY"
chainloader /EFI/[OS]/grubx64.efi
}
root is the efi partition of the distro you wish to chainload, which is basically a passthrough the that systems grub prompt. hdX is zero based, gptY is 1 based.
chainloader is the path to the grub efi stub within the efi boot partition.
Add one entry for each distro system, you can group them by submenus, or not, organize it however you wish.
You can even add your Windoze grub entry manually, just copy it from an existing grub.cfg.
Not me either! But I like your solution. I’ll make a note of it if I’ll build systems using Grub. I have switched to systemd-boot recently. No Grub issues ever again here
Chainloading another bootloader to GRUB2 is fairly easy.
Something as simple as the following example is enough to boot another disk that uses a “Custom Super Bootloader” FILE /etc/grub.d/40_custom Chainloading another bootloader