Subject: Re: ridiculous uid
To: Christopher Schultz <chris@christopherschultz.net>
From: Martin Husemann <martin@duskware.de>
List: current-users
Date: 12/02/2005 15:41:08
On Fri, Dec 02, 2005 at 09:31:03AM -0500, Christopher Schultz wrote:
> It occurs to me that GNU/Linux's mount command has an option that allows
> you to byte-swap a volume...

You probably misunderstood both the mount option and the problem.

If you mount a local filesystem (say on a floppy) that has been created
on a machine with different endianess, you need something to take care
of the file system endianess (NetBSD does this automagically). This is
just the file system structure, not the contents of the files stored in
the filesystem.

Here the problem is that files stored inside the filesystem were changed,
and stored in a endian dependend format. NetBSD's bdb support can
cope and handles the db structure fine in different endianess, but the
binary content fields of course have been swapped too.

There is no magic solution to this. You can not blindly swap all bytes around
in files stored inside the filesystem unless you exactly do know the structure
of the binary data.

Martin