[NBLUG/talk] hard gentoo problem

Mark Street mark at oswizards.com
Sat Aug 21 20:00:12 PDT 2004


Ha!!!  Gentoo is a very good learning experience.

On Saturday 21 August 2004 12:54, ShadowEyez wrote:
> Trying to install x86 Gentoo 2004.2 with stage3, and a custom manual 2.4.26
> kernel.  Used the command emerge vanilla-sources' to install the kernel
> source code through emerge, set up the .config file through make menuconfig
> finished setting up the install, and rebooted to get the message no kernel
> init=".  I know from past experience this means there is no initrd image,
> but gentoo did not create one, and there is no mkinitrd command in gentoo,
> like in other distros of linux.

Hehehe, are you sure?  My guess is the kernel chokes because it cannot access 
the root filesystem to start init.  I would like to know the entire message 
you get when you boot before I commit to any more advice.

Soooooo, what type of filesystem did you create for the root filesystem?  Is 
that functionality built into the kernel or is it a module?  (See 
your .config)  If it is a module then you need to create an initrd image in 
order for the kernel to access the root filesystem. (This is the reason why 
you had to have an initrd image in your past life, remember this from my 
Linux Sys Admin 1 class????)

Description :
Mkinitrd creates filesystem images for use as initial ramdisk (initrd)
images.  These ramdisk images are often used to preload the block
device modules (SCSI or RAID) needed to access the root filesystem.

In other words, generic kernels can be built without drivers for any
SCSI adapters which load the SCSI driver as a module.  Since the
kernel needs to read those modules, but in this case it isn't able to
address the SCSI adapter, an initial ramdisk is used.  The initial
ramdisk is loaded by the operating system loader (normally LILO) and
is available to the kernel as soon as the ramdisk is loaded.  The
ramdisk image loads the proper SCSI adapter and allows the kernel to
mount the root filesystem.  The mkinitrd program creates such a
ramdisk using information found in the /etc/modules.conf file.

> So i booted into a fedora install on the same box, mounted the gentoo
> partition, copied all the 2.4.26 files from the /lib/modules from the
> gentoo partition to a fedora /lib/modules/2.4.26 directory, and tried a
> mkinitrd command on fedora "mkinitrd initrd-2.4.26.img 2.4.26",
> copied the initrd image to the /boot on the gentoo, set the grub loader to
> initialize it, and upon booting into gentoo again I get the same no init
> error message I got before.

What changes did you make to the grub boot loader config to have it load the 
initrd image?

> The question is, how do I get the right initrd file for gentoo.  does
> gentoo have a tool like mkinitrd to generate this image, do I install the
> 2.4.26 package on fedora and have fedora make the image?  Gentoo is
> supposed to make the image when one does a auto-config kernel, but the
> online docs (which where pretty good overall) did not tell how to do this?

I would recommend you go back a step and build a vanilla kernel that is 
compiled with all the functionality you plan to use to get the system up and 
running ie. ability to access root filesystem type.  You can build a custom 
kernel later with modules and other goodies.

--- 
Mark Street, RHCE
http://www.oswizards.com
--
Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc




More information about the talk mailing list