hi again,
Thanks for the tips. I am working on that recipe and plus reading and playing with buildroot. I think I am getting the main ideas. This is alot of fun.
On Wed, 6 Apr 2005 19:28:53 +0000, Bennett Todd <[EMAIL PROTECTED]> wrote:
2005-04-06T19:18:17 Bennett Todd:[...] build a standalone bootable initrd.
Super-simple recipe:
1) Create the directory heirarchy you want to have as your "root". Initially at least, keep its contents well under 4MB, the default initrd size. I like to start with uClibc+Busybox, there are other ways. This _doesn't_ need the vmlinuz on it, just sbin/init, bin/sh, and whatever else you feel like adding. Let's suppose you've got this in a subdir "root" of your current working directory:
root/sbin/init root/bin/sh ...
2) Prepare and mount the initrd:
dd if=/dev/zero of=filename bs=1024k count=4 mke2fs filename sudo mount -o loop filename /mnt
3) Load it up:
(cd root;find . -depth|sudo cpio -pdm /mnt)
4) Unmount the initrd and compress it:
umount /mnt gzip -9 <filename >initrd.img
Now set up lilo or grub or what have you with the vmlinuz you want to use (for simplicity, include all the modules you want to use in the vmlinuz so you don't have to set up /lib/modules on your initrd). Use the initrd option to describe the path to your initrd.img, and include "rw root=/dev/ram0" on the kernel commandline.
-Bennett
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
