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 ?
Reversing the effects of mkimage to get an original gzipped file back
Asked Answered
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
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. –
Widner
What do if multiple file? –
Teamwork
© 2022 - 2024 — McMap. All rights reserved.