Change file mounted via loop device

From: Anthony Starovoytov (starovojtov_at_yahoo.com)
Date: 05/25/04


Date: 25 May 2004 13:36:41 -0700

I have the following problem: due to the security reasons I'd like to
make a partition unreadable for other persons even if they will switch
off the power, take my hard disk and install on their workplace. I did
not want to use crypto apis cause they could be slow. My idea was to
create a file, bind it to the loop device, mount and then change first
X bytes with the random data. And replace them with the correct ones
before mounting and umounting and then change back to random.

I got the stange (but probably correct) behaviour: if I change the
file after mounting, all the changes could be discarded under unknown
rules - they could be new random now and when I view the file in 1
second, it contains the old correct data.

So it stores somewhere the correct beginning?
My question is: how I can reach my goal, probably using other ways.
But it would be also very interesting why it behaves so and where I
can read what actually is done when mounting files using loop devices
and why it restores them.

Thanks
A.



Relevant Pages

  • Changing file mounted as loop device
    ... make a partition unreadable for other persons even if they will switch ... create a file, bind it to the loop device, mount and then change first ... X bytes with the random data. ... before mounting and umounting and then change back to random. ...
    (comp.os.linux.misc)
  • Changing file mounted as loop device
    ... make a partition unreadable for other persons even if they will switch ... create a file, bind it to the loop device, mount and then change first ... X bytes with the random data. ... before mounting and umounting and then change back to random. ...
    (comp.os.linux.questions)
  • Change file mounted via loop device
    ... make a partition unreadable for other persons even if they will switch ... create a file, bind it to the loop device, mount and then change first ... X bytes with the random data. ... before mounting and umounting and then change back to random. ...
    (comp.os.linux.security)
  • Change file mounted via loop device
    ... make a partition unreadable for other persons even if they will switch ... create a file, bind it to the loop device, mount and then change first ... X bytes with the random data. ... before mounting and umounting and then change back to random. ...
    (comp.os.linux.misc)

Quantcast