Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] gpt non-EFI (rootfs on raid) grub problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Fri Dec 29, 2023 3:20 pm    Post subject: [SOLVED] gpt non-EFI (rootfs on raid) grub problems Reply with quote

I'm trying to set up a lecacy system without EFI using gpt partition table and rootfs on raid1(mdadm)

This is the partition table:

Code:

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   2099199   2097152    1G BIOS boot
/dev/sda2    2099200 136316927 134217728   64G Linux swap
/dev/sda3  136316928 220203007  83886080   40G Linux RAID
/dev/sda4  220203008 234452991  14249984  6.8G Linux RAID


Installing grub appears to be ok:


Code:

(chroot) livecd / # grub-install --modules=part_gpt /dev/sda 
Installing for i386-pc platform.
Installation finished. No error reported.
(chroot) livecd / # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.1.67-gentoo
Found initrd image: /boot/initramfs-6.1.67-gentoo.img
done
(chroot) livecd / # tail -5 /etc/default/grub
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"
GRUB_CMDLINE_LINUX_DEFAULT="domdadm"
GRUB_DISABLE_OS_PROBER=false


Unfortunatly, when I boot I only get

Code:

Loading Operating System ...
GRUB


and then it hangs until I reset or power cycle the host. However, if I boot from the Gentoo install stick and enter the linux and initrd commands, but prefix the filename paths by (hd1,gp1) then it will start to boot.

This is when using ext2 for the boot partition. If I use xfs (like in the handbook) I always get:

Code:

(chroot) livecd /usr/src/linux # grep xfs /proc/filesystems
        xfs
(chroot) livecd /usr/src/linux # grub-install --modules=part_gpt /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
(chroot) livecd /usr/src/linux # tail -3 /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="domdadm"
GRUB_DISABLE_OS_PROBER=false

(chroot) livecd /usr/src/linux # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.1.67-gentoo
Found initrd image: /boot/initramfs-6.1.67-gentoo.img
/usr/sbin/grub-probe: error: unknown filesystem.
cat: /boot/grub/grub.cfg.new: Input/output error


Any ideas on how to resolve this?


Last edited by pgu on Sat Dec 30, 2023 4:21 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54450
Location: 56N 3W

PostPosted: Fri Dec 29, 2023 5:08 pm    Post subject: Reply with quote

pgu,

Where is your /boot?

Code:
Device         Start       End   Sectors  Size Type
/dev/sda1       2048   2099199   2097152    1G BIOS boot
should be 2MB for Grub to use raw, for itself. No filesystem.
Its not yours.

The GRUB prompt means that grub cannot find its grub.cfg

A read of The Olde Way may aid understanding.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Fri Dec 29, 2023 6:08 pm    Post subject: Reply with quote

Thanks. I though it was using space in the filesystem itself. I'll try to re-partition it if it has to be a dedicated partition.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Fri Dec 29, 2023 6:11 pm    Post subject: Reply with quote

BTW Does this "BIOS Boot" partition have to be at the beginning of the disk or could it be placed at the end of the drive, e.g. on a 2TB drive?
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1569
Location: South America

PostPosted: Fri Dec 29, 2023 6:19 pm    Post subject: Reply with quote

pgu wrote:
BTW Does this "BIOS Boot" partition have to be at the beginning of the disk or could it be placed at the end of the drive, e.g. on a 2TB drive?

I don't think that location on the disk matters. It is only used by GRUB (automatically) and likely recognized by its Partition Type GUID.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54450
Location: 56N 3W

PostPosted: Fri Dec 29, 2023 6:37 pm    Post subject: Reply with quote

pgu,

It has to be where the BIOS can read it.
As different BIOSes have different limitations, putting in the start of the drive is safe and has become a tradition, for the same reason that /boot is at the start of the drive.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Sat Dec 30, 2023 4:20 am    Post subject: Reply with quote

NeddySeagoon wrote:

As different BIOSes have different limitations, putting in the start of the drive is safe and has become a tradition, for the same reason that /boot is at the start of the drive.


Thanks again, after using this gpt partition scheme I was able to install and boot:
Code:

Disklabel type: gpt
Disk identifier: 65CEC858-95FA-C146-B83A-D1BE2C315B2D

Device         Start       End   Sectors  Size Type
/dev/sda1       2048    264191    262144  128M BIOS boot
/dev/sda2     264192   2099199   1835008  896M Linux filesystem
/dev/sda3    2099200 136316927 134217728   64G Linux swap
/dev/sda4  136316928 220203007  83886080   40G Linux RAID
/dev/sda5  220203008 234452991  14249984  6.8G Linux RAID


GPT Non-EFI partitions software raid bios boot Linux
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum