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
mounting partimage image-files
Moderator: feffer
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.
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.
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)?
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.
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
Who is online
Users browsing this forum: No registered users and 0 guests