I have Gentoo Linux installed on /dev/sda2
, with /dev/sda1
being the boot partition (where GRUB files are installed). /dev/sda
has a MBR partition table. /dev/sdb1
is a data partition (where I store files that need to be backed up, sort of like a home partition) and /dev/sdb2
is where I installed Arch Linux. /dev/sdb
has a GPT partition table. Gentoo is booting fine from GRUB, which I installed from Gentoo. Arch is not. /boot/grub/grub.cfg
is https://paste.pound-python.org/show/2TXi8NeWbhoaWsifKeMM/. Here is Arch Linux's part of this file:
menuentry 'Arch Linux (on /dev/sdb2)' --class gnu-linux --class gnu --class os $menuentry_i
d_option 'osprober-gnulinux-/boot/vmlinuz-linux--1db96616-a88a-42a6-9283-a57016bba4c9' {
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 1db96616-a88a-42a6-9283-a57016bba4c9
else
search --no-floppy --fs-uuid --set=root 1db96616-a88a-42a6-9283-a57016bba4c9
fi
linux /boot/vmlinuz-linux root=UUID=1db96616-a88a-42a6-9283-a57016bba4c9 rw quiet
initrd /boot/initramfs-linux.img
}
but when I try to boot it I get an error that hd1,gpt2 doesn't exist. Just so you can see that the partitions I mentioned exist here is what ls /dev/sd*
returns:
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1 /dev/sdb2
If there is more information that you require to help fix this issue, please just tell me how to get it for you.
I have tried re-installing GRUB with grub-install --target=x86_64-efi --efi-directory=/boot /dev/sda
and then re-running grub-mkconfig -o /boot/grub/grub.cfg
. Still this issue persists.
EDIT: Now this is just perplexing... I just converted my MBR on /dev/sda to GPT using gdisk and now gdisk -l /dev/sda
returns:
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8AD72DC5-C104-4524-8C18-52759DC6C784
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2957 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 264191 128.0 MiB EF00 EFI System
2 264192 1953524191 931.4 GiB 8300 Linux filesystem
I re-installed GRUB (which was needed after the GPT change as otherwise I couldn't boot the hard disk) with grub-install --target=x86_64-efi --efi-directory=/boot /dev/sda
, then re-generated my GRUB config file and lastly rebooted and try to boot Arch Linux and yet again it failed with the same error. Googling suggested to me that the different partition tables was likely the problem but it seems as though changing partition tables does not work. My new GRUB cfg file is here.
EDIT2: I have now deleted /dev/sdb1 and replaced it with an ESP partition, then installed GRUB on my Arch Linux partition run grub-install --target=x86_64-efi --efi-directory=/boot /dev/sdb && grub-mkconfig -o /boot/grub/grub.cfg
. I still cannot boot Arch Linux. I have pressed Esc and checked the boot options and while a live USB of mine shows up the boot menu as does my Gentoo installation my Arch Linux installation does not show. I have also updated Gentoo's GRUB installation and its config and still I cannot boot Arch using Gentoo (with the exact same errors as before).
grub-install
does. Then, each OS needs to create it's own grub.cfg; which is whatgrub-mkconfig
does. Given that Gentoo was installed first, leavegrub-install
to it. So do that, then come back and I'll explain how to get Gentoo's grub.cfg to load Arch's grub.cfg; which is what will allow you to boot both nicely.