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
                  search --no-floppy --fs-uuid --set=root 1db96616-a88a-42a6-9283-a57016bba4c9
                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).

  • Brenton, you're trying too many things at once; please slow down. When dual-booting with GRUB, one of your OS's needs to be the one in charge of the "MBR part"; that's what grub-install does. Then, each OS needs to create it's own grub.cfg; which is what grub-mkconfig does. Given that Gentoo was installed first, leave grub-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. – Emmanuel Rosa Jun 22 '17 at 20:20
  • I changed the partition table on the MBR partition to GPT (I did add it to the question). So you want both partitions to have a grub.cfg, well they already do. I did that a while ago so I could try adding the Arch entry in the grub.cfg to the Gentoo grub.cfg. That didn't work, Arch still failed to boot. Now what do I do? Please don't interpret this as antagonistic I am merely asking what to do now. – BH2017 Jun 23 '17 at 5:08

In your Gentoo system you should have the file /etc/grub.d/40_custom. You can add a menu entry to this file to reference Arch's grub.cfg. Something like this:

menuentry 'Arch Linux' {
   set root='hdX,msdosX' 
   configfile /boot/grub/grub.cfg

The root entry will need to point to the partition containing Arch's /boot. Then, run grub-mkconfig -o /boot/grub/grub.cfg to regenerate Gentoo's grub.cfg.

  • Please try re-reading my question. /dev/sda was where the MBR partition table was, where Gentoo was not Arch. Plus I've switched both disks over to GPT now (read the EDIT: and EDIT2: sections of my question specifically for this info). Guessing this will mean gptX will be needed instead of msdosX. – BH2017 Jun 23 '17 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.