LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-25-2006, 12:05 AM   #1
Aenima427
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 16

Rep: Reputation: 0
[solved]How do I create initrd file in Gentoo?


Hi, I compiled a new kernel and I'm having some problems getting it to boot. My /boot/grub/menu.lst file looks like this:
Code:
GNU nano 1.3.9              File: menu.lst

default 0
timeout 30
splashimage=(hd0,2)/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,2)
kernel /kernel-genkernel-x86-2.6.15-gentoo-r5 root=/dev/ram0 init=/linuxrc ramd$
initrd /initramfs-genkernel-x86-2.6.15-gentoo-r5

title=Gentoo New Kernel
root (hd0,2)
kernel /vmlinuz-2.6.15-gentoo-r5 root=/dev/ram0 init=/linuxrc ramd$
initrd /initramfs-genkernel-x86-2.6.15-gentoo-r5

title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
I've tried running it like this, and without an initrd at all. Either way this error occurs during the boot process:

Code:
kernel panic - not syncing : VFS : Unable to 
   mountroot fs on unknown block(0,)
I've tried running mkinitrd, but that is apparantly not a command in Gentoo, or maybe I need to emerge some package first.

Does anyone know (or have any ideas) about what the problem could be? There is always the distinct probablility that I configured the kernel wrong, it was my first try.


EDIT: SOLVED : I guess you should never ignore the obvious... emerge mkinitrd

Last edited by Aenima427; 03-25-2006 at 04:36 AM. Reason: Solved
 
Old 03-25-2006, 06:32 PM   #2
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
I am happy for you .. just posting this to get it off the '0 replies list'

Cheers
 
Old 03-25-2006, 08:15 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,102

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Unless you have some really odd-ball requirements, I've never understood why a Gentoo user compiling their own kernel would use an initrd.
It's your box, compile in what you need, lose everything else.

My 2 cents.
 
Old 03-26-2006, 11:24 AM   #4
Aenima427
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 16

Original Poster
Rep: Reputation: 0
FYI, I am very new to this, so if you have an alternative solution I'm all ears
 
Old 03-26-2006, 03:22 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,102

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Like I said, just ensure everything you need to boot is compiled into the kernel, not modules. For most people this probably means ext2/3, maybe S-ATA support - a few other bits and pieces. You don't need to support everything on earth - just what you've got - and maybe what you plan on buying next.
Building kernels that break is all part of the deal when you do your own. So long as you keep (at least) the last known-working one so you have a fallback, it's just part of the learning process.

Once you get away from genkernel, there should generally be no need for an initrd. As always there will be exceptions.
 
Old 03-26-2006, 06:45 PM   #6
Aenima427
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 16

Original Poster
Rep: Reputation: 0
Well, I created a new kernel using gentoo-sources...and it WORKS! I compiled everything into the kernel so I don't have an initrd. Strange thing is that it mounts my NTFS partition, but not my FAT32. I could've sworn that I included vfat. Now to get ndiswrapper working...
 
Old 03-26-2006, 08:33 PM   #7
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I recommend do not use genkernel. It is buggy. I recommend compiling the kernel yourself. Some software can be set as modules and others can not. I suggest ext2/3 be compiled as built-in and other filesystems be compiled as modules. SATA controllers can be set as modules, but you have to note the name to include it in the initrd file.

Gentoo does have the utility mkinitrd. It have to be emerged first. In order to use initrd files. You need to make sure ramdisk and initrd is set as built-in or else Linux will never boot up. You will also need to make a directory called /initrd.

Compiling everything as built-in is stupid. You are going to have trouble configuring some devices in the future. Also the kernel will take more memory than it should. There are several drivers that break or they do not work at all when set as built-in.

Gentoo kernel hints:
1) Disable any OSS and ALSA modules, but leave sound core as a module
2) Set PS/2 mouse as a module
3) Set ramdisk and initrd as built-in
4) Set EXT2 and EXT3 as built-in
5) Disable low-performance USB storage
6) Set loop devices as a module
7) Set PIIX as built-in
8) Set your IDE chipset as built-in
9) Set additional controllers as modules
10) Set UDF and NTFS write support as disable
*) Set everything else as modules if you think that you are going to need it in the future

I use the hints above for vanialla kernels too.
 
Old 03-26-2006, 08:43 PM   #8
guile68
LQ Newbie
 
Registered: Nov 2004
Location: Texas
Distribution: Fedora Core 3
Posts: 1

Rep: Reputation: 0
I installed gentoo (did not use genkernel) in a VMWare image. I configured Grub and set the disk to Sda (sd1*, sd2 and sd3). When I rebooted I get the following error:
Boting Gentoo 2.6.15-gentoo-r1
root (sd0,0)
Error: Error while parsing number

I'm pretty sure if I can access my drive I can edit the grub.conf file but when I boot from a Cd I can't mount the partitions. I'm a noob so any help would be appreciated
 
Old 03-26-2006, 11:29 PM   #9
Aenima427
LQ Newbie
 
Registered: Mar 2006
Distribution: Gentoo
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the tips Electro. Right now I'm just happy to have a working kernel that I built myself, from gentoo-sources I will definately be making tweaks as I grow more comfortable with it. My main goal right now is getting my wireless adapter to work, which I think I am very close to doing. I had the light flashing and the interface wlan0 showing up with the correct essid, but then I must have done something to make ndiswrapper mad...
 
Old 05-11-2006, 06:08 AM   #10
slott_hansen
LQ Newbie
 
Registered: Jun 2004
Location: Denmark
Distribution: fedora core 2
Posts: 17

Rep: Reputation: 1
I am also trying to get initrd working on my gentoo 2006.0 - and I need it because I cannont compile the needed module as a kernel module.

I have tried almost every option from mkinitrd to doing it all by hand - and everytime I get the dreaded "error 28 - wont fit in memory".

I have 4 gigs of memory - so I know I must be doing something wrong :-)
 
Old 05-11-2006, 03:28 PM   #11
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by slott_hansen
I am also trying to get initrd working on my gentoo 2006.0 - and I need it because I cannont compile the needed module as a kernel module.

I have tried almost every option from mkinitrd to doing it all by hand - and everytime I get the dreaded "error 28 - wont fit in memory".

I have 4 gigs of memory - so I know I must be doing something wrong :-)
On the kernel line specify ramdisk=32000. This should work. I took this value from my old Mandrake 9.0 installation and set the ramdisk size of the kernel to 32000 for my Gentoo installation, so it always is set. Do not forget to make an /initrd directory or else ramdisk will never work.

I recommend only using 2 GB of memory because 896 MB is taken out form 4 GB of memory that gives you about 3.2 GB of RAM, so using 4 GB of RAM is a waste of money. It is not Linux fault. It is actually PAE fault. If you still want to do use 4 GB of RAM and Linux is still giving you problems even though you specify the ramdisk value, also specify ram=3.2GB.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[gentoo[not specific]] didn't manage using initrd MD3 Linux - Distributions 0 07-04-2005 11:04 AM
create initrd alaios Debian 5 01-19-2005 09:54 AM
How to fix broken (Gentoo) initrd from (Knoppix) boot disk Mitchua Linux - General 4 07-10-2004 02:16 PM
making an initrd file lyonsd Linux - General 4 03-14-2004 06:26 AM
How do I create icons if package doesn't (i.e. gentoo file manager? araczek Linux - Newbie 3 01-31-2004 08:48 PM


All times are GMT -5. The time now is 11:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration