Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Question about initramfs

19 views
Skip to first unread message

Jim Gifford

unread,
Mar 14, 2005, 12:00:25 PM3/14/05
to
Question: Initramfs is going to replace initrd, but I haven't seen
anyone explain how to copy modules that are built during the build
process moved into the initramfs archive. Has somebody done, this or is
this still a work in progress?

--
----
Jim Gifford
mail...@jg555.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Alexander E. Patrakov

unread,
Mar 14, 2005, 10:40:07 PM3/14/05
to
Jim Gifford wrote:

> Question: Initramfs is going to replace initrd, but I haven't seen
> anyone explain how to copy modules that are built during the build
> process moved into the initramfs archive. Has somebody done, this or is
> this still a work in progress?

Easy.

1) Unpack a vanilla kernel and build and install it as you usually do for a
system that doesn't need initramfs.

make menuconfig
make
make modules_install
cp arch/i386/boot/bzimage /boot/linux-2.6

2) Make a temporary directory (say, "initramfs") and put all files that you
want to go to your initramfs there. Don't forget the "/init" file, it is
used as a starting point for initramfs.

3) Make the initramfs image:

cd initramfs
find . | cpio -o -H newc | gzip -9 >/boot/initramfs-2.6.cpio.gz

4) Add /boot/linux-2.6 and /boot/initramfs-2.6.cpio.gz to your LILO or GRUB
as you would normally do with a kernel image and the initrd:

image=/boot/linux-2.6
label="Linux"
initrd=/boot/initramfs-2.6.cpio.gz
root=/dev/hda1 # if your initramfs "/init" script understands this
read-only # if your initramfs "/init" script understands this

5) Upon reboot, the kernel will automatically determine that the image is
really an initramfs, not an initrd.

--
Alexander E. Patrakov

0 new messages