bug-parted
[Top][All Lists]
Advanced

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

Re: amiga partitioning support for parted


From: Sven Luther
Subject: Re: amiga partitioning support for parted
Date: Tue, 12 Aug 2003 00:00:00 +0200
User-agent: Mutt/1.5.4i

On Wed, Jul 30, 2003 at 05:35:16PM +1000, Andrew Clausen wrote:
> > Also, what happens in the case a partition can be detected has having
> > more than one filesystem on it ?
> 
> Parted uses extra heuristics, such as what size the file system
> believes it is (compared to the partition size), and whether there
> are file system consistency errors.

Hello, 

I am working a bit more on this parted stuff, trying to add support for
the divers amiga filesystems probing. I wish to do only probing for now,
so the filesystems are recognized when you type print.

I don't think that the amiga filesystem knows its size. Apart from the
size which is found in the partition table, and thus given to the
filesystem probe geometry.

That said, in the partition table are also found two values of import to
the filesystem geometry, the number of reserved blocks at the start of
a partition, and a PreAlloc value, which enables to start the filesystem
before the start of the partition.

The start and end of the partition is calculated as :

  start = geom->start + reserved.
  end = geom->end.

There are two special blocks in the filesystem, the boot block, which
only contain the filesystem type identifier as first uint32 of the block
on harddisks (it contained a boot sector on amiga floppies, but we don't
really care about those anymore, and on harddisk the boot sector stuff
is in the partition table i think). and the root block, which is founf at :

  rootblock = (end - start) / 2

But the actual start can be a bit before the start, more exactly at
start - prealloc, but this is not the start which is taken in account to
find the root block, for compatibility reasons with the tools knowing
only about the older version of the amiga FFS (called OFS).

But, there seems to be no way to pass this additional information, as
well as the type of partition the partition table thinks the partition
is.

Also, there doesn't seem to be any way of identifying the root block,
apart from the checksum value and maybe the type value being 2. So
identification of the filesystem can mostly only be done by using
partition table and boot filesystem boot block identifier. Is this ok,
or should more heuristic be used, like traveling the file&directory
tree and try to detect the geometry that way.
Erm, i just saw that there is a bitmap entry, which gives a bitmap of
the free blocks, and could be used to detect the size the partition is,
altough it is not real precise it seems to me (in a bit less than 2 MB
chunks.

Do you have any wisdom you could impart to me on how to best solve this
kind of problem ?

Friendly,

Sven Luther




reply via email to

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