[Top][All Lists]

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

Re: filesystem detection (was: Re: mkntfs -Q and libparted)

From: Andrew Clausen
Subject: Re: filesystem detection (was: Re: mkntfs -Q and libparted)
Date: Sat, 27 Nov 2004 10:35:21 +1100
User-agent: Mutt/1.5.6+20040722i

On Thu, Nov 25, 2004 at 04:21:20PM +0100, Szakacsits Szabolcs wrote:
> > I _guess_ it's a parted bug.
> For parted it's impossible (or it would be quite difficult) to decide what
> the real filesystem is if there are several signatures detected. Probably
> this is the reason it reports "unknown" -- IMHO correctly. Andrew can
> confirm this (or the source).

The relevant code is in

        libparted/filesys.c in function ped_file_system_probe().

Parted uses rather complicated heuristics.  First, it just checks
signatures.  If that doesn't turn up a unique match, it then compares
the sizes indicated in the superblock with those in the partition table.
If it's still ambiguous, it tries to open the filesystems.  If it
can open it with one file system type, but not any other, it decides
in favour of that one.

> The solution is, _all_ mkfs.* utility must wipe _all_ other filesystem
> signatures on the partition. This is quite though and basically quite
> impossible to do efficiently _but_ even _trying_ could improve the
> situation a lot and it wouldn't be hard to do.

Wiping the first and last 128k would wipe every signature I'm familiar

That said, Parted wipes signatures one-by-one for each file system.
(I guess that's an advantage of knowing about many file system types...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]