Howto extract miniPM initrd

Discussions about anything.

Moderators: Patrick Verner, Icecube

Howto extract miniPM initrd

Postby verndog » Wed Jan 27, 2010 12:35 am



I have both bzImage and initrd in a folder. When trying to extract and recreate the filesystem, I get errors.
I'm using the standard format:

gunzip < /initrd | cpio -i --make-directories

I know initrd is a compress file:
$ gzip -l initrd
compressed uncompressed ratio uncompressed_name
18162953 58368000 68.9% initrd

And I can uncompress it, but errors on trying to recreate filesystem.

How can I do this? Thanks.


verndog
 
Posts: 88
Joined: Sun May 10, 2009 3:01 am

Re: Howto extract miniPM initrd

Postby Patrick Verner » Wed Jan 27, 2010 12:51 am

Mount it with a loop device. It's an old idea that really should be a initramfs and not an initrd.

mv initrd initrd.gz
gzip -d initrd.gz
mkdir x
mount -o loop initrd x

Maybe you could take over maintaining it? You'll get credit, of coarse. I'm too busy to mess with it these days.
Last test version of Parted Magic: http://beefdrapes.partedmagic.com
User avatar
Patrick Verner
Site Admin
 
Posts: 881
Joined: Wed Nov 19, 2008 2:27 am
Location: Kaukauna, Wisconsin

Re: Howto extract miniPM initrd

Postby verndog » Wed Jan 27, 2010 1:49 am

Thanks. That was simple enough. Great little mini linux..
verndog
 
Posts: 88
Joined: Sun May 10, 2009 3:01 am

Re: Howto extract miniPM initrd

Postby Icecube » Thu Jan 28, 2010 12:08 am

Parted Magic also has a script that let you extract to a directory and rebuild the initramfs.
Code: Select all
$ pmagic_initramfs
Last test version of Parted Magic: http://beefdrapes.partedmagic.com
User avatar
Icecube
Site Admin
 
Posts: 324
Joined: Wed Nov 19, 2008 2:43 am

Re: Howto extract miniPM initrd

Postby verndog » Thu Jan 28, 2010 10:38 pm

I don't think "pmagic_initramfs", would have fixed my errors, nor extract initrd.

I spend days trying to figure out why panics occured. I narrowed it down to the init file.
There's several howto on the internet, one dealt directly with converting from initrd to initramfs. For some reason though it failed. Eventually I just renamed the symlink initrc to init and it booted my initramfs without errors.

dmesg reported this on my new initramfs:
...
checking if image is initramfs...it is
Freeing initrd memory: 2287411 freed
...

All of the info I read states that you can't have a initrd with kernels later than 2.4, and yet miniPM has 2.6 kernel? WTF?

At any rate I was able to add all partclone files and FSArchiver file to my new initramfs file minirt,gz. It went from initrd=17.3mb, to minirt.gz=22.3mb.
verndog
 
Posts: 88
Joined: Sun May 10, 2009 3:01 am

Re: Howto extract miniPM initrd

Postby Icecube » Sun Feb 07, 2010 5:46 pm

I missed the fact that you used miniPM. It is relatively old (more than a year) and it uses still an initrd instead of an initramfs (like recent versions of Parted Magic do).

The pmagic_initramfs script only works for initramfs versions of Parted Magic. Sorry for the confusion.
Last test version of Parted Magic: http://beefdrapes.partedmagic.com
User avatar
Icecube
Site Admin
 
Posts: 324
Joined: Wed Nov 19, 2008 2:43 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest