Subject: MBR games
To: None <port-amd64@netbsd.org>
From: Christopher A. Kantarjiev <cak@dimebank.com>
List: port-amd64
Date: 10/18/2005 09:21:53
when I set up one of my netbsd x64 machines, I used some tool to partition the
disk via the MBR into two halves, thinking I'd also load openbsd.

Now I want to use that disk space for netbsd, but I can't figure out what tool
to use to get me the rest of the disk. mbrlabel seems willing to add a new 'i'
partition for the unused space - is that enough to do the trick? That would be
OK with me, though the 'right' thing would be to combine h and i. Not very
important, though.

I'm also concerned about the fact that mbrlabel won't increase the size of the c 
partition, which is almost certainly going to cause problems down the line. (It 
seems to have updated the d partition, though...) I'd really like to find a way 
to edit the MBR - I know I did this during install, but can't figure out what 
tool that was!

Thanks.

yertle: {2} mbrlabel -r wd0
Found 4.2BSD partition; size 163846872 (80003 MB), offset 63
   skipping existing unused partition at slot c.
Found unknown partition; size 157812106 (77056 MB), offset 163846935
   adding unknown partition to slot i.

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
  a:     65520        63     4.2BSD   1024  8192  8192  # (Cyl.      0*-     65*)
  b:   4195296     65583       swap                     # (Cyl.     65*-   4227*)
  c: 163846872        63     unused      0     0        # (Cyl.      0*- 162546*)
  d: 321672960         0     unused      0     0        # (Cyl.      0 - 319119)
  e:  16778160   4260879     4.2BSD   1024  8192 46608  # (Cyl.   4227*-  20872*)
  f:     66528  21039039     4.2BSD   1024  8192  8320  # (Cyl.  20872*-  20938*)
  g:   2097648  21105567     4.2BSD   1024  8192 45608  # (Cyl.  20938*-  23019*)
  h: 140643720  23203215     4.2BSD   1024  8192 46640  # (Cyl.  23019*- 162546*)
  i: 157812106 163846935    unknown                     # (Cyl. 162546*- 319106*)

Not updating disk label.