Disk Images as first class citizen

Please implement disk images into the OS. Much like MacOS X. I know there already exists add ons and what not, but more features would be very nice, such as disk image encryption

This would be nice, and it is possible to add support via a stand alone application, which is the best way to do it, IMO. Disk Image(?) in MacOS and BeOS’s CreateDeviceImage can be looked at for inspiration, but the actual mounting should appear seamless like in MacOS, even when it is mediated by a stand-alone application. This application has to be part of the Haiku standard distro, or it won’t enable the praxis of shipping disk images.

You can of course question whether or not disk images offer benefits over zip archives. A small one is the use of BFS indexes. A BFS image can come with a set of indexes. On-image queries will just work, no extra steps necessary. You’d lose the indexing if you move the contents of the image to another volume without indexing, but a zip file doesn’t offer this at all. The image has to be in its uncompressed state, however, for beos to be able to mount it, so both have to be uncompressed to get to the data.

So, what’s needed is an application that can create disk images, from scratch or from an existing volume, and wrap these in compression if desired. It should also handle the mounting of disk images, when these are opened in Tracker. I suppose the easiest way is to create a mimetype for BFS images, a sniffing rule to recognize them and perhaps a filename extension*, just in case. For disk image checksum verification, you’d want the checksum stored somehow, but the BFS image might not work with other data appended to the end, let alone prepended up front, so it has to be stored as an attribute. If zip is used as a compression container, the checksum attribute is preserved, if bzip2 or gzip is used, it’s not, and you won’t get the option of verifying the image, pre-mount. Probably no biggie.

  • “.bfs” maybe. I wish we didn’t have to expose people to extension gibberish. MacOS X has a “burn folder” feature which adds a tempfile on the desktop with a hideous-looking filename extension. Unpretty. In any case I think the BFS image mimetype should register .bfs, as a hint, whether or not a future Haiku Disk Image tool will use it.

Basic password protection can be added, with some more changes to the format and the app, but doing proper encryption in a secure way that doesn’t leak data onto your physical volumes will probably take a crypto fs module for the kernel.