You are not logged in.
I am modifying Arch install cd's initrd.img for my Arch Linux Office Install CD, but not familiar with cpio archive. To create a new archive, I don't get it to work.
find | cpio -o > initrd.img
Or is there any easier way to modify the /arch/setup script in the initrd.img instead of re-archiving the whole image? I tried to edit with mc but the archive is too big.
Last edited by rasat (2007-09-20 15:00:19)
Markku
Offline
I think you need something like this:
cd basefolder
# basefolder is the directory containing your /etc, /var and so on
find . | cpio -o -H newc | gzip > ../test.cpio.gz
larch: http://larch.berlios.de
Offline
Have you read mkinitcpio?
It's a bash script... Has exactly the info you need
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Thanks gradgrind, it did the work. For any user who wants to edit the initrd.img, here is how I did.
1. Rename:
initrd.img to initrd.img.gz
2, Uncompress:
gzip -d initrd.img.gz
3. Extract: (WARNING!! without "--no-absolute-filenames" extracts in your root "/")
cpio -i --no-absolute-filenames < initrd.img
4. Do the editing
5. New archive:
find . | cpio -o -H newc > initrd.img
6. Compress:
gzip -c initrd.img > initrd.img.gz
7. Rename:
initrd.img.gz to initrd.img
More information
http://bbs.archlinux.org/viewtopic.php?id=34429
Markku
Offline