[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Use of disklabel, MBR and GPT
bruce.lilly+nbsd%gmail.com@localhost (Bruce Lilly) writes:
Here is more information :)
>also appears to be
>a bug where NetBSD claims that it "dumps on" the FreeBSD swap
>partition, but there's no
>mention of dk3 in /etc/fstab (where dump is supposed to get its information).
The kernel choses a default for the dump partition. It might be
necessary before something could read fstab. That default can
be overriden by fstab, since there is only one dump partition
the last entry with type 'dp' is set.
>additional details. Note that the dk numbering starts at zero,
>whereas the gpt indices
The dk numbering has nothing to do with the GPT indexes. Would be
difficult with multiple disks anyway. It's just the next free
unit number when a dk instance is created.
>to be no facility for reporting or setting some GPT partition
>attributes (hidden, diag, etc.).
There are only 3 common attributes defined. The tool has some
additions where needed, but it should probably also allow to
manage all 64 bits.
>`gpt` is the most usable and stable part of the NetBSD installer;
The NetBSD installer is called 'sysinst'. You can use the gpt tool when
you exit the installer.
>saying so). NetBSD's disklabel command produces output which is
The disklabel command handles the disklabel.
The gpt commands handles GPT.
The fdisk command handles MBR.
The disk drivers maintain an in-core default disklabel which
is named 'fictitious' but which gets updated when a disklabel
can be read from disk. Most people don't change the name though,
so when they write a disklabel, the name persists.
That's one reason why the wedge autodiscover code for disklabel
(not enabled by default) treats the string 'fictitious' as an
>(for one thing, this particular disk spins at 5400 RPM, not 3600;
>also claims 3600 "rpm" for SSDs and flash drives).
Sure. It's a metric that might be used by a filesystem when allocating
blocks on spinning media. It had little to do with hardware for
quite some time and the filesystem isn't using it either. It's
also from a time where drivers wouldn't reveal such parameters,
instead you used the disklabel to inform the drivers (and filesystems).
>If a GPT label name (up to 36 UTF-16LE characters per Wikipedia)
>contains no whitespace
>characters, NetBSD's /etc/fstab can use the label, as in
>NAME=data /media/dk11 ntfs-3g rw,noatime 0 0
The fstab parser understands \ as an escape, so you can specify
white space too.
On the other hand, that's not the GPT label name, but the wedge
name, which is the GPT label name re-encoded as UTF-8 or the GPT
entry UUID if no label is set.
Mounting on /media/dk11 might be misleading, as it might not be
the dk11 device next time.
>0e60da33d75f54ca.b none swap sw
>0e60da33d75f54ca.a / ffs rw,wxallowed 1 1
>0e60da33d75f54ca.i /boot/EFI msdos rw,noatime 0 0
>and mounting an NTFS partition read/write on OpenBSD doesn't work using
>fstab (it winds up being read-only, and getting R/W NTFS mounts
>requires some trickery to handle automatically at boot time).
The NTFS code doesn't support writing.
>more than a very few OSes tends to be a problem, and BSD-specific
>disklabel is largely an anachronism (and is incompatible between BSD
The disklabel is surely an anachronism just like MBR is one, as it
cannot represent disks larger than 2TB with 512byte blocks. OpenBSD
has an updated version of the disklabel, but the world seems to
have largely agreed on using GPT.
Michael van Elst
"A potential Snark may lurk in every tree."
Main Index |
Thread Index |