# PXE Boot wirh custom initrd

## elomaniak

Hi Folks

for my research project i have to build a custom initrd without any tools from an existing file system (boss order)

so for now i stripped down gentoo to a minimum of 165MB

now i wanted to make an initrd out of it

found this tutorial

http://www.faqs.org/docs/evms/x3834.html

followed it, but without these EVMS tools

what i did whas the following

created initrd with dd, count 200

mounted directory into initrd

the directory has the usual structure 

/bin

/etc

and so on

then i have taken a linuxrc sample and also included it into the initrd

unmounted the directory, compressed initrd with gz, size 58MB and wanted to boot it

as for the boot i am using an ubuntu image mounted into the filesystem of the server machine

workd great with the iriginal files

but as soon as i replace the ubuntu inird.lz with my initrd.gz i get a kernel panic

that the roof filesystem cannot be mounted on unknown block (0,255)

As for the result I would like to have the initrd booted and be held in the Memory and thus work within it instead of booting something from the HDD.

I hope somebody can help me with my problem

Thank in advance

Elomanias

----------

## NeddySeagoon

elomaniak,

The Ubuntu kernel will be a fully modular 'one size fits all' kernel.

It will need its specific modules (for that exact kernel, made with that same gcc) in the initrd, so that they can be loaded into the kernel to drive the hardware and root filesystem to mount root.

It would be much easier for you if you used a Gentoo produced initrd (or initramfs) to start a Gentoo system.

You will need to use the Ubuntus /lib/modules/`uname -r`/ in your initrd and make your initrd init script load the modules that are required.

There is an option you can pass the kernel to leave the initrd in RAM and attached to a /dev node, if you want to look at it later.

----------

