View previous topic :: View next topic |
Author |
Message |
praka123 Apprentice


Joined: 19 Jan 2006 Posts: 184 Location: Kerala,India
|
Posted: Thu Jan 19, 2006 6:47 am Post subject: Creating An initrd image |
|
|
Hello All,
This is my first Post.For some reasons i wants to know how to make an initrd image.please kindly explain how to make initrd image for a custom compiled kernel with gentoo.is that be done with 'mkinitrd'.Thank You All. |
|
Back to top |
|
 |
dracony Tux's lil' helper


Joined: 16 Nov 2005 Posts: 146
|
Posted: Thu Jan 19, 2006 8:02 am Post subject: |
|
|
there are two ways:
1)
create a file % dd if=/dev/zero of=/home/init count=100000
then attach it to loop
losetup /dev/loop0 /home/init
then foemat it
mkfs.ext2 /dev/loop0
mount it
mount /dev/loop0 /mnt/test
copy files, unmount, and gzip ithe file
gzip /home/init
and copy it to /boot
(THIS WAY SOMETIMES CRASHES)
The best way:
2)
make a folder, (let it be /home/test)
copy files there
run
cd /home/test ; find . | cpio --quiet --dereference -o -H newc | gzip -9 /img.cpio.gz
this will create your image in /img.cpio.gz
(this one works) _________________ gentoo never dies. If it doesnt work, do the most idiotic thing you can, and to prevent it from all unnessecary warnings use --force. This will break it, and while fixing, you will fix everything
(worked even when i deleted /sbin) |
|
Back to top |
|
 |
praka123 Apprentice


Joined: 19 Jan 2006 Posts: 184 Location: Kerala,India
|
Posted: Thu Jan 19, 2006 8:23 am Post subject: |
|
|
Thanks.can we have this be done by emerging mkinitrd.. |
|
Back to top |
|
 |
|