Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2: "error: no such disk" resp. "error: no loaded kernel"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Wed Jun 01, 2011 9:48 pm    Post subject: grub2: "error: no such disk" resp. "error: no Reply with quote

Hi,

I'm just installing hardened gentoo on an x86 machine and am stuck with the boot manager.

I used GPT for the partitioning of two IDE disks and mdadm for making some RAID1 (metadata v1.2), these are amongst others:
- /dev/sde1 and /dev/sdf1 are (each) 8MB big and have the bios_grub flag
- md19 as boot parition (mdadm & ext2 label "boot") made from /dev/sde9 and /dev/sdf9
- md16 as root partition (mdadm & ext4 label "FSroot") made from /dev/sde6 and /dev/sdf6

When creating the arrays I didn't know that grub-legacy only works with mdadm metadata version 0.9, so I need to use >=grub2_1.99_rc1. Unfortunately grub-1.99_rc1 fails compiling in the install-cd chroot, so I tried to use RIPlinux v12.7 The howtos I found use grub-mkconfig but that does not exist. There is a setup tool but that can not be used for RAID (it's help says so).

This is my grub.cfg
Code:
insmod part_gpt
insmod mdraid1x
insmod ext2
insmod vbe

menuentry "gentoo" {
    set gfxpayload=1280x1024x16
    set root=(md19)
    linux /kernel-2.6.37-hardened-r7 root=/dev/md16 ro
    initrd /initrd-genkernel-2.6.37-hardened-r7
}

The output of
Code:
grub-probe /mnt/boot
(-t fs) ext2
(-t fs_uuid) 0fb9...
(-t fs_label) boot
(-t drive) (mduuid/...)
(-t device) /dev/md19
(-t partmap)
gpt
gpt
(-t abstraction) raid mdraid1x

Code:
grub-install --modules="part_gpt mdraid1x ext2 vbe" --root-directory=/mnt/boot /dev/md19
complained that I want to install GRUB on a partitionless disk or to a partition ... ok, I guess I should use the block devices, so I tried
Code:
grub-install --modules="part_gpt mdraid1x ext2 vbe" --root-directory=/mnt/boot /dev/sde
grub-install --modules="part_gpt mdraid1x ext2 vbe" --root-directory=/mnt/boot /dev/sdf
which gave me "Installation finished. No error reported".
This just looked fine, but when I boot I get "error:no such disk" and am left to grub rescue mode. When execute the set command the same drive mmuid as stated by grub-probe is shown.
When I add "linux" to the modules switch I get a normal grub "shell" ... executing boot results in "error:no loaded kernel". I'm confused!

Which disk is grub refering to? Is the the RAID (partition) not found? What's wrong?
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 319

PostPosted: Thu Jun 09, 2011 8:28 pm    Post subject: Reply with quote

Ok, I've given up trying to make it work using RIPlinux, grub-1.98 or trying to make 1.99_rc1 compile.
I just emerged sys-boot/grub-9999. make-menuconfig is available and working as well as grub-install just did fine. :roll:

So grub does recognise the arrays, shows a menu, finds and loads the kernel.
As drawback a lot of stuff was emerged. Stuff that I don't need at the moment, like bazaar and the other dependencies of grub-9999. Anyways, it works. :D


Maybe using RIPlinux would have worked if I knew how to set up the grub.cfg properly ... I haven't found anything useful. IMHO the RAID topic is completely missing in the grub2 manual (http://www.gnu.org/software/grub/manual/).

1) From what I can see in the generated grub.cfg insmod commands belong into menuentry, so they are not global.
2) It should be set root='(md19)' ... so the single quotes was missing.
3) Setting root using a search command is probably needed. ATM it's search --no-floppy -fs-uuid --set=root <the uuid from /dev/disks/by-uuid/> but I'll try to replace --fs-uuid <fs-uuid> by --label boot.
4) I don't know why gzio.mod is put in there since I selected LZMA as kernel compression method.
5) There is no initrd entry. I guess I have to set that manually. The kernel panics since it can't find the mdadm arrays...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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