[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: initrd/cramfs/etc (was Re: srm nightmare, milo & kernel future questions)



Hi there.

On Wed, Jun 18, 2003 at 06:00:08PM -0700, Chris Hecker wrote:
> Okay, so I downloaded the 2.4.21 kernel source from kernel.org.  I upgrade 
> gcc to build it.  I make the initrd image with mkinitrd.  The kernel won't 
> mount it and panics.  I read the net for a while, finding that mkinitrd 
> makes a cramfs image, but debian kernels are patched to allow initrd and 
> the generic kernel source is not.  Herbert is quoted as saying you can just 

That's not true. Any decent linux kernel can support an initrd. You need
options CONFIG_BLK_DEV_RAM and CONFIG_BLK_DEV_INITRD set to 'y' (yes)
and CONFIG_BLOCK_DEV_RAM_SIZE=4096. Note also that the root filesystem,
should that be cramfs, ext2, or any other fs type, _cannot_ be compiled
as a module. Another "gotcha" comes with devfs; if you have devfs coming
up automatically at boot-time, then the "device" corresponding to the
ramdisk, when it's loaded, is "/dev/rd/0" as opposed to "/dev/ram0" in
non-devfs kernels. This can be a real pain when having a ROOT=probe
directive in your mkinitrd.conf file and using kernels with and without
devfs support. For more info, have a look at Documentation/initrd.txt in
your kernel source tree.

> I can mount both the romfs and the cramfs initrd.imgs and look around them 
> when I'm booted with 2.4.18.  I saw some reference to some kernel versions 

It seems like you haven't compiled cramfs and romfs in your newly-built
kernel (the one for whom you're making your initrd). See above.

Bye,
Nick.

-- 
 Nick "Noth" Ntarmos     | <ntarmos at ceid dot upatras dot gr>
 NetCINS Lab. @ C.E.I.D. | [http://students.ceid.upatras.gr/~ntarmos/]
 U. of Patras - Greece   | ( 38.2594N, 21.7428E ) ( 1024D / CF95160A )



Reply to: