Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
initrd help
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
fusama
n00b
n00b


Joined: 31 Aug 2005
Posts: 21
Location: USA

PostPosted: Fri Dec 05, 2008 6:39 pm    Post subject: initrd help Reply with quote

So I've been building a new gentoo system using software raid. Of course it doesn't work (or I wouldn't be adking questions). The problem appears to be that md is unable to auto-detect my raid devices. /boot is raid1 so grub can get to it and start the kernel just fine, / is raid10 which is where the failure is. Of course, not having a root filesystem causes the kernel to panic so all the info I have is what I can see on the last monitor-height of output.

From what I've found on the web at some point autodetect was intentionally broken by the devs due to Bad Things that could happen if you mixed and matched drives from different computers that happened to originally be parts of linux software raid arrays. And that the only way to boot is to use a initrd. Great, but I've never done that before. I've looked on the web but the info I've found on initrd's all has to do with writing C code. I should *not* have to write C code (or for that matter copy-paste someone elses from the net) to get a raid array working, and I'm fairly certain that's not necessary. However, I've not found anything more useful on using an initrd.

Could someone please either tell me or point me to directions that tell me step by step what is needed to create and boot using an initrd? What do I need to enable in the kernel? What files do I have to copy where? How do I need to configure Grub? What other steps are necessary to make this work?

Thanks.
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Fri Dec 05, 2008 6:42 pm    Post subject: Reply with quote

you could try

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7

7.d. Alternative: Using genkernel

should make everything you need to make a bootable kernel, unless you want to do it the manual way ;)
Back to top
View user's profile Send private message
fusama
n00b
n00b


Joined: 31 Aug 2005
Posts: 21
Location: USA

PostPosted: Fri Dec 05, 2008 6:50 pm    Post subject: Reply with quote

I'd rather not use genkernel considering I've already configured my kernel the way I want it (except for the initrd). Are those my only two choices: genkernel, and writing C code?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 05, 2008 7:03 pm    Post subject: Reply with quote

fusama,

The kernel still starts my raid, made with the now dead raidtools, so its probably not a kernel issue. Although, I do know that as you have discovered, its depreciated.

You can still go the initrd route and there is no C to write.

Maybe you can use some kernel parameters in grub.conf
See /usr/src/linux/Documentation/md.txt
_________________
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
fusama
n00b
n00b


Joined: 31 Aug 2005
Posts: 21
Location: USA

PostPosted: Fri Dec 05, 2008 7:21 pm    Post subject: Reply with quote

This problem is that my raid was not made with the now dead raidtools, it was made with the newest version of mdadm. I could re-make my array, but I'd really rather not because at this point that's a "wipe the drive and start over" solution. While its good to hear that writing C code isn't necessary to use an initrd, I still don't know how to do it.

How do I use a initrd?
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Fri Dec 05, 2008 7:24 pm    Post subject: Reply with quote

http://wiki.clug.org.za/wiki/RAID-1_in_a_hurry_with_grub_and_mdadm - near the bottom has a section about grub and what not
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Dec 05, 2008 11:02 pm    Post subject: Reply with quote

fusama,

Did you try what /usr/src/linux/Documentation/md.txt suggests ?
_________________
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
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sat Dec 06, 2008 1:19 am    Post subject: Re: initrd help Reply with quote

fusama wrote:
From what I've found on the web at some point autodetect was intentionally broken by the devs ...

It still seems to work for me on a new installation with the rootfs on software RAID0 and kernel 2.6.28-rc7

I do not use an initrd/initramfs but I do use version 0.9 superblocks, because version 1.0 , 1.1 , 1.2 superblocks are not supported by the kernel's autodetect code.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21709

PostPosted: Tue Dec 09, 2008 4:02 am    Post subject: Reply with quote

fusama wrote:
How do I use a initrd?


See /usr/src/linux/Documentation/initrd.txt. It gives fairly good instructions, though it is a bit light on specifics in some places. You will almost certainly want a busybox in your initrd. If you are still stuck after reading that document, post back with details of what you tried and we can try to help you further.
Back to top
View user's profile Send private message
tuber
Apprentice
Apprentice


Joined: 12 Nov 2004
Posts: 267

PostPosted: Tue Dec 09, 2008 6:30 am    Post subject: Reply with quote

Here's an article with some specifics on how to create an initrd: http://www.timesys.com/EmbeddedLinuxCoffeeHouse/Blogs/initial_ram_disks
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