7

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?

Blachshma
  • 17,097
  • 4
  • 58
  • 72
user1323681
  • 231
  • 2
  • 3
  • 4

3 Answers3

13

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

iamantony
  • 1,345
  • 17
  • 32
kalin
  • 3,546
  • 2
  • 25
  • 31
1

you can mount images:

mkdir ~/img_mnt
mount -t udf filename.img ~/img_mnt -o loop
ligi
  • 39,001
  • 44
  • 144
  • 244
0

Just use p7-zip which is 7z just for POSIX.

7z e ramdisk.e RamdiskExtracted

I'm not sure about repacking and keeping metadata though.

I guess you could mount it as rw??