You are not logged in.

#1 2020-02-15 09:44:21

NathanTinker
Member
Registered: 2020-02-15
Posts: 5

[SOLVED]GRUB error "no GPT partition map found" on BIOS/GPT/Btrfs-RAID

I successfully installed Arch on a single-device-Btrfs disk. My computer is BIOS legacy boot, and I use GPT on my disk. But when I try to install Arch on a Btrfs-RAID0 disk array, My computer can not load OS from GRUB. The error is: no GPT partition map found. And enter grub rescue mode after that.

I tried several command in grub rescue mode, and here are the outputs:

grub rescue> set
cmdpath=(hd0)
prefix=(hd0,gpt2)/root/boot/grub
root=hd0,gpt2

grub rescue> ls 
(hd0) (hd0,gpt2) (hd0,gpt1) (hd1)

grub rescue> ls (hd0,gpt2)/root/boot/grub
themes/ grubenv i386-pc/ grub.cfg fonts/

grub rescue> insmod normal
no GPT partition map found

hd0 and hd1 are the disks house RAID0, they have same layout. however only hd0 shows the two partitions, and hd1 not, which is suspicious I guess.

I think I followed this instruction for GRUB RAID configuration :
1. load GRUB modules mdraid09 or mdraid1x in /etc/default/grub;
2. install grub on both disks house RAID0.

Here are the shell commands I used to install Arch:

root> gdisk /dev/sda 
root> gdisk /dev/sdb
# partition 1 is ef02 BIOS boot partition
# partition 2 is 8300 Linux fs

root> mkfs.btrfs -fd raid0 /dev/sda2 /dev/sdb2
root> mount /dev/sda2 /mnt
root> btrfs subvolume create /mnt/root
root> umount /mnt
root> mount -o subvolid=256 /dev/sda2 /mnt

root> pacstrap /mnt base linux linux-firmware
root> genfstab -U /mnt >> /mnt/etc/fstab

root> arch-chroot /mnt
root on chroot> pacman -S grub
root on chroot> grub-install /dev/sda
root on chroot> grub-install /dev/sdb
root on chroot> vi /etc/default/grub 
# GRUB_PRELOAD_MODULES="... mdraid09 mdraid1x"
root on chroot> grub-mkconfig -o /boot/grub/grub.cfg
root on chroot> exit

root> reboot

Thank you!

Last edited by NathanTinker (2020-02-23 05:00:32)

Offline

#2 2020-02-15 10:31:39

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 9,713
Website

Re: [SOLVED]GRUB error "no GPT partition map found" on BIOS/GPT/Btrfs-RAID

Please edit your post to use code tags: https://wiki.archlinux.org/index.php/Co … s_and_code

You need to use bbcode, not markdown: https://bbs.archlinux.org/help.php#bbcode


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-02-18 21:25:06

NathanTinker
Member
Registered: 2020-02-15
Posts: 5

Re: [SOLVED]GRUB error "no GPT partition map found" on BIOS/GPT/Btrfs-RAID

I put /boot in BTRFS RAID 0 array, in the same subvolume of /. And I guess this problem is because that Grub can not access file system to load the /boot/grub/grub.cfg due to lack of drivers.

After several days study, I hardly find any post based on this kind file system layout, such as this discussion, but they didn't not specify if they put /boot in BTRFS RAID or not.
However, from Grub wiki page, Grub should support RAID as long as I provide some kind of modules, but I don't know how to do that so far.

Since I used Centos, Btrfs RAID1 for / and ext4 for /boot for many years on this machine. I will try that kind of file system layout. But I would also glad to know if /boot on Btrfs RAID0 can work.

Last edited by NathanTinker (2020-02-18 21:52:52)

Offline

Board footer

Powered by FluxBB