mounting partimage image-files

If you want to contribute to Partimage, please post there

Moderator: feffer

Post Reply
darken
Posts: 3
Joined: Wed Apr 06, 2005 8:09 am
Location: Prague

mounting partimage image-files

Post by darken » Wed Apr 06, 2005 8:19 am

Hi,
me and my colleagues are thinking about writing a block device
driver to support mounting of partimage images. However we
have quite limited resources (esp. don't have too much time to
invest in this).

We were not investigating deeply enough yet to get the whole idea
of what would have to be done. So we asking for ANY suggestions
about possible PROBLEMs this idea might include.

Finaly we welcome ANY suggestions!
Thanks!
PJ

fdupoux
Site Admin
Posts: 26
Joined: Sat Feb 21, 2004 12:12 pm

Post by fdupoux » Sun Apr 10, 2005 1:27 pm

Making a driver that allows to mount image files is a good idea. I had already this project in mind, but we have big problems to write this driver for partimage-0.6.x.

The main problem is that image files are compressed as a stream. If you want to read a block that is in the middle of the file, you will have to uncompress the compressed image file from the beginning. Then, it would be possible to read just this block, but it would be a lot longer... It would be possible to write such a driver for uncompressed image files only. IMHO, it would not be hard to write, since the driver would work like the loop device driver, except the file has holes.

vir2al
Posts: 13
Joined: Wed Mar 30, 2005 2:15 am

Post by vir2al » Fri Apr 15, 2005 11:27 am

fdupoux wrote:Making a driver that allows to mount image files is a good idea. I had already this project in mind, but we have big problems to write this driver for partimage-0.6.x.

The main problem is that image files are compressed as a stream. If you want to read a block that is in the middle of the file, you will have to uncompress the compressed image file from the beginning. Then, it would be possible to read just this block, but it would be a lot longer... It would be possible to write such a driver for uncompressed image files only. IMHO, it would not be hard to write, since the driver would work like the loop device driver, except the file has holes.
Would the cloop driver help in accessing the compressed image file? This is the driver that authour of knoppix created to be able to install Linux to a CD (I think the System Rescue CD uses it too?).

I don't know too much about the details of driver but it sounds like it could help (or a place to start)?

fdupoux
Site Admin
Posts: 26
Joined: Sat Feb 21, 2004 12:12 pm

Post by fdupoux » Sun Apr 17, 2005 1:06 pm

Anyway, it's not possible to write a driver that is able to mount compressed image of partimage-0.6. In deed, image are compressed with gzip/bzip2 streams. When reading a compressed byte in the image, we have to uncompress all the previous data of the image file !

It will only be possible to write a driver that mount uncompressed partimage-0.6 files. The driver is very near from loop.c in the linux kernel. It's a block device driver that mounts a file, and makes a block device available to the system.

There is just a little more work to do in the driver, but it's not very difficult for kernel programmers.

Game_Ender

Post by Game_Ender » Thu Dec 22, 2005 2:07 am

Is it possible to look at the contents of an NTFS image file? I one image split into 10 2GB part and I need to get a file out them and I can't restore the complete image. Would it be possible to uncompress one image and look at it somehow, or mount it?

Post Reply