Page 1 of 1

Making a new initrd for gentoo (not gentoox)

Posted: Sun Aug 21, 2005 3:23 pm
by bloodgod589
I have a server xbox with plain gentoo on it and its installed alright. I want to put a linuxroot 4 gig file system on my other xbox for music and torrents. I made the swap file and the linuxoot already. all i need to do is make a initrd to boot the linuxroot off of the fatx.

Shallax can you give me some help?? Or anyone else. I know how to use the mkinitrd file, but i dont know what modules i need, remastering it, etc.


Thanks

look inside initrd.gz

Posted: Wed Aug 24, 2005 8:10 am
by Krazy
Yes it would be nice to know exactly how to recreate initrd.gz etc Unfortunately I don't.

Of course you can take a peek inside, and that may help... its as far as I have got on the subject.

As root:

Code: Select all

cd
mkdir unpack
cd unpack
cp /mnt/fatx/e/initrd.gz .
gunzip initrd.gz
mkdir mnt_initrd
losetup /dev/loop/1 initrd
mount -t ext2 /dev/loop/1 ./mnt_initrd
cd mnt_initrd
ls
Look around to your hearts content... then later:

Code: Select all

umount ./mnt_initrd
losetup -d /dev/loop/1
The above was done on an gentooX home install that has a /dev/loop/0 used already for the rootfs. YMMV.

Posted: Thu Aug 25, 2005 6:22 pm
by ShALLaX
Or quicker still...

Code: Select all

mkdir /mnt/tmp
gunzip ./initrd.gz
mount -o loop initrd /mnt/tmp
look around

Code: Select all

umount /mnt/tmp
gzip ./initrd
rm -rf /mnt/tmp