views:

81

answers:

1

Hello,

We develop for a specific embedded device at our company, and part of that is making initial root disks that get loaded onto the devices over ethernet via netboot. We've experienced some problems, and as a result, the original folder with the contents of the initial root disks was lost along with its backups, but we do still have the initrd images, that have been created by gzipping the contents of a ramdisk that's been mounted as a local loop device, and then running mkimage on the gzipped file. Is there any way to undo the effects of mkimage and obtain the original gzipped content so that we can recover the original images ?

+1  A: 

Are you talking about u-boot's mkimage? If so, you can recover the original by removing the first 64 bytes.

dd if=<image> of=<recovered file> bs=64 skip=1
JayM
Holy crap, that did the trick ! And yes, we are using U-boot for our embedded devices. Thank you so much ! You've just saved me a ton of time.
Alex Marshall