Subject: Re: Disklabel & mount NTFS [1.6.2]
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 05/27/2004 00:19:01
On Wed, 26 May 2004, mark@theswamp.org wrote:
> 
> I'm trying to figure out the correct way to use disklabel, and mount an
> ntfs drive. What I'm trying to do is mount the ntfs drive on occasion,
> so I'm not worried about adding it to the fstab file (if that matters).
> I've read through the howto's and man pages, but don't understand the
> whole concept i guess. 

The whole concept isn't too tough; like a lot of things, it's easy if you
know how.  

You have to wrap your head around this: there are partitions, and there
are partitions.  That is, there is NetBSD's way of describing the disk
(which you're about to update with disklabel), and there is the "standard"
way you're familiar with, the MBR partition table.  

NetBSD's ancestors were using spinning bits on magnetic media long before
Microsoft put the "MS" in MS-DOS.  It describes the whole disk exclusively
with its disklabel.  The only reason to honor the MBR table is to
cooperate with other OSes that similarly honor it.  NetBSD doesn't use the
MBR other than to find its own chunk of the disk (and, as you probably
know, it doesn't even require it for that purpose).  

Other operating systems don't care at all about the chunk of the disk set
aside for NetBSD, and make no attempt to interpret its disklabel to know
how it carved up its space.  NetBSD, OTOH, can read other filesystems, but
to do so, the filesystem's location, i.e. its partition, has to made known
to NetBSD via the disklabel.  

All you're going to do, then, is nominate a partition letter in the
disklabel to describe your NTFS partition.  Like any partition, it starts
on one cylinder and ends on another.  Those start-and-stop points are
already in the MBR table.  As long as the disklabel information for it
matches what's in the MBR table, NetBSD will see the partition the same
way NT does, and you're golden.  

As long as you're only reading from the NTFS partition, I don't see how
you can harm anything by editing the disklabel.  

Hope that at least answers your conceptual questions.  ;-)

--jkl