Re: Mount bzip2 disk image
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Sep 2023 16:25:29 UTC
It appears that Andrea Venturoli <ml@netfence.it> said: >Hello. > >I've got a bzip2-compressed quite big HD image. Is there a way to mount >it (read-only) without uncompressing it first? I don't care about >performance as I only need to recover a single file. >Uncompressing it would probably take days, provided enough space is >available (which I'm not sure is the case). > >The idea would be: >_ mdconfig -a -f xxx.img.bz2 >_ .... use something over /dev/md0 to get /dev/xxx >_ mount /dev/xxxp4 /mnt/tmp. > >Does such a thing exist? bzip2 is a block compressor so in principle you can recover a block at a time, but the blocks are variable size on bit boundaries so you have to scan through it to find where the blocks are. My advice would be to spin up a FreeBSD machine at AWS, attach a big disk in their cheapest slowest disk type, then upload, decompress, mount, and then delete the AWS stuff. It might take a week but would likely only cost 10 euros.