How to extract ramdisk.img

user1323681 picture user1323681 · Dec 5, 2012 · Viewed 19.8k times · Source

use ubuntu

I type file ramdisk.img and the Terminal display ramdisk.img: data, I use cpio and get nothing extracted! How can I extract such ramdisk.img?

Answer

kalin picture kalin · Aug 5, 2013

It's highly possible that ramdisk.img actually is a compressed file ramdisk.cpio.gz. To extract it use this commands:

cd /Path/To/Folder/With/ramdisk.cpio.gz/File
mkdir temp_directory && cd temp_directory
gunzip -c ../ramdisk.img | cpio -idm

Check this blog post for more info: http://blog.djodjo.org/?p=536