-----Original Message----- From: Dag Nummedal
$ file initrd initrd: ASCII cpio archive (SVR4 with no CRC)
As you see, the root filesystem is a simple cpio file. Simply unpack the initrd file (with all permissions and special files), modify etc/master and make a new initrd file.
Thanks, thats a much neater way of doing what I'm after.
I've done [cpio -i -I initrd] to unpack it, modified /etc/master and then done [find . -depth -print | cpio -c -o -O initrd] which re-created initrd, but I get
RAMDISK: Couldn't find initial RAM disk image starting at 0. Kernel panic - not synching: VFS: Unable to mount root fs on unknown-block
I presume I need a different incantation of cpio to put it back together again
I decided to do my own updates to etc/master. Here's what I did:
Unpack archive in empty dir:
cpio -i -d -m -I /tftpboot/pxe/initrd.una
This directory is missing it's dev directory. It turns out that the initrd file isn't a single cpio archive, it's 2 concatenated together. The file misc/devices.txt lists the devices you need. I found that making a single cpio archive with a dev directory worked fine.
mkdir dev
grep ^dev /raid/unattended-4.3/linuxboot/misc/devices.txt | xargs -n 4 mknod
The grep .. mknod is a single line. It must be run as root.
Edit and repackage:
find . | cpio -o -H newc -O /tftpboot/pxe/initrd.una
-- Dag Nummedal ([EMAIL PROTECTED])
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ unattended-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unattended-devel
