Subject: Re: HDD partition handling
To: None <port-sparc@netbsd.org>
From: Brett Lymn <blymn@baesystems.com.au>
List: port-sparc
Date: 07/31/2004 17:04:29
On Wed, Jul 28, 2004 at 07:21:30PM +0200, Chris Amthor wrote:
> 
> At the moment I managed to screw things up totally: By tampering
> around with disklabel (deleting and creating partitions) I seem to
> have invisible partitions.
> 

Normally, on the sparc architecture the c partition means the whole
disk, so it overlaps the a partition.  If you set up a to start at the
beginning of the disk I am inclined to speculate that what mount does
is look at the disk label for the offset to the start of the partition
but ignores the fstype in the disklabel and just probes the fs type
from the filesystem magic in the file system itself.  Since both a and
c both start at the same offset they look the same to mount, hence you
can mount sd1c even though you only created sd1a.  Where you would
come unstuck is (probably... I am not 100% certain) when you try to
exceed the capacity of the a partition-mounted-as-c, things would
probably run off into the weeds then.

> Someday I should investigate how to entirely remove a disklabel from a
> disk and start from scratch. "dd if=/dev/zero of=/dev/rsd1 ..."
> obviously did not do the trick.
> 

That would trash the on disk copy but not the "in core" copy of the
partition table, unless the partitions persist across a reboot I would
guess that's what is confusing you.

-- 
Brett Lymn