KBNLresearch / ipmlab

Image Portable Media Like A Boss
Apache License 2.0
3 stars 1 forks source link

Add software-based write blocking #29

Closed bitsgalore closed 1 year ago

bitsgalore commented 2 years ago

Since the T8U write blocker doesn't work as expected with floppies (see https://github.com/KBNLresearch/ipmlab/issues/26), software-based write blocking on a Linux machine could be an alternative. This should be implemented at the level of the host machine, and the Ipmlab documentation should describe how to do this.

First I looked at the BitCurator Safe Mount procedure:

https://confluence.educopia.org/display/BC/Safely+Mount+Devices

But for imaging the device doesn't need to (and shouldn't be) mounted at all (hence the "umount" command in ipmlab). So it seems we just have to prevent auto-mounting. From the BitCurator QuickStart guide:

The BitCurator environment has been customized to prevent the device management service from automatically mounting any media.

The procedure for disabling the automount feature varies slightly depending on the distro used. For Linux Mint Mate, (which uses the Caja file manager) I found this:

https://forums.linuxmint.com/viewtopic.php?t=254941

Command:

gsettings set org.mate.media-handling automount false

For other Linux flavors the command slightly varies according to file manager, e.g.:

https://askubuntu.com/questions/89244/how-to-disable-automount-in-nautiluss-preferences

TODO: I'm assuming running the gsettings command as above only affects the current user. How to make this work for all users. Do we even need this?

Also, a user (operator of the workflow) will still be able to mount the floppy manually. But for preventing accidental write actions this is probably suffficient.

bitsgalore commented 1 year ago

Added to setup Guide.