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.62) 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.gz4) 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 this5) Upon reboot, the kernel will automatically determine that the image is
really an initramfs, not an initrd.--
Alexander E. Patrakov
from: http://groups.google.com/group/linux.kernel/msg/f78cf557a5c0b602
5 reactions
1 From xilihuala - 22/11/2006, 13:53
in command line , it is not initrd=..., but should use rdinit=..., that is in 2.6.18.2
2 From druggo - 22/11/2006, 18:06
thank you, I will check it .
3 From druggo - 29/01/2007, 22:46
as you mentioned above, I found kernel-parameters.txt in Documents says :
rdinit= KNL
4 From jerwell - 22/06/2007, 19:01
except for /init,is there anything else to add?for example,/sys?
5 From druggo - 23/06/2007, 20:48
I'm not sure, sometimes /sys is just a empty folder that you can add it safely , I guess :P