NetBSD-Users archive

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

Re: Keeping NetBSD disklabel up to date



beaker%sdf.org@localhost writes:

>So it sounds like mbrlabel by itself would not have been sufficient for
>avoiding this scenario; it's output still needs to be applied via the
>disklabel tool; is that correct?

Yes.


> I'm sort of surprised as the mbrlabel(8)
>manpage says

>  "mbrlabel is used to update a NetBSD disk label from the Master Boot
>   Record (MBR) label and Extended Boot Record (EBR) label(s) found on
>   disks that were previously used on DOS/Windows systems (or other MBR
>   using sys tems)."

>Perhaps it's grammatically correct but not literally correct -- it is
>used to update the disklabel but doesn't actually do it itself?

mbrlabel does the following:

- read the current disklabel from disk
- enumerate the MBR partitions, for each partition
  - ignore if a disklabel entry with the same offset and size exists.
  - ignore if a disklabel entry exists that overlaps
  - otherwise add a corresponding disklabel entry
- with -w option, write back the modified disklabel to disk

So the best thing that can happen is that the modified partitions
are appended. But usually it will just clash with with a previous
entry.

You can remove the previous disklabel entries for the non-NetBSD
partitions, and then run mbrlabel -w to append the new entries.

Or you can run mbrlabel (without -w) and replace the previous entries
accordingly.



>Regarding the GPT scheme as a possibility I'll have to get educated
>on that but perhaps it's the better way to go since I'm goning to
>have to start over with this disc anyway.  I had it in my head that
>GPT was a 64bit only option.

GPT is something that is understood by Linux and NetBSD, so there
cannot be any confusion, no need to synchronize the view between
both sides.

But it is also a change. You need a new bootloader that supports GPT
for both systems, GAG is too old for this. With NetBSD you also
get a new scheme to access the disk using "wedges".




Home | Main Index | Thread Index | Old Index