# initramfs in new kernels (solved)

## capira

Hi all!

I just wondered if anybody know how to repack the initramfs once you have it unpacked. The initramfs file that genkernel create has the function that initrd one day had. I have found really complicate to handled this kind of file. I have found here a way of unpack the initramfs, but I need to repack it again. Does anybody know the way? Is the linuxrc (the file that I need to change in order to boot my gentoo system) AKA init store in other place before the genkernel made the initramfs file?

Thanks in advance,

RaulLast edited by capira on Sat Oct 08, 2005 8:45 am; edited 1 time in total

----------

## widan

You can try to go in the "root" directory of the initrd, and run:

```
find . -print | cpio -o -H newc > /tmp/initramfs
```

The result will not have the same structure as the original initramfs (it will be a single CPIO archive, instead of a concatenation), but it should work. You can also gzip the initramfs.

----------

## capira

Thanks a lot widan!

Although I had though to do something like I didn't try because I was scare of breaking something.

That works like a charm.

----------

