Re: Making USB partition true read-only.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 29 Nov 2009, Subodh Nijsure wrote:

> I am experimenting with making USB parition true read-only partition.
> I am mounting the device, with ext2 filesystem, as read-only.
> 
> I am also marking the block device as read-only using the blockdev
> utility from util-linux-ng, by using command blockdev --setro
> path-to-block-device

That should work.  But it won't help if the writes already took place.

> What I am finding is, if I use block device as raw input device, and
> compute md5 checksum on the data read. The checksum's don't match from
> mount to mount.
> 
> I see that block #2, corresponding to super-block is getting updated,
> but there is also one block on the device that gets updated within the
> device.
> 
> Is there a way to mark USB partition as true read-only partition?

Only the ways you have already tried.  Some USB devices have a switch 
you can use to make them read-only, but most do not.

If you collect a usbmon trace, you'll be able to see when the writes
occurred.  That might help you to figure out what caused them.  See
Documentation/usb/usbmon.txt for instructions.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux