View Single Post
  #1   (View Single Post)  
Old 17th February 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default Preserving existing OpenBSD partition layout during a re-install

1. Preserving an existing OpenBSD partition layout during a re-install
  • 1.1 Description of the problem
  • 1.2 Partitioning at MBR level with 'fdisk' step
  • 1.3 Overriding the suggested partition lay-out
  • 1.4 Summary


1.1 Description of the problem

The OpenBSD 4.6 installation program introduced some nice features, like suggesting a disklabel partition lay-out. But if you have quite some experience in installing previous OpenBSD releases, and intend to keep your own custom lay-out, you may be in for a surprise.

Such an experience has been posted in July 2009 in a message to the OpenBSD mailing list, with the subject New disklable doesn"t keep old partitions if requested. A quote from the initial post

Code:
I try to keep the actual partition of the disk as it was before and do a fresh
install, but the snapshots looks like simply do not allow this now.

You can select Custom label and it will show the previous label, but then when
you write it, obviously no changes are present, but when you Quit it, it comes
back to the same question and looks like you can't move on from there.

Good if you want to use the auto label, but if you want to keep the old one,
then what really should be the step then?
The correct steps to be taken will be illustrated in the following capture of an OpenBSD install. We skip the preliminary install steps and join the fun at the 'fdisk' part.


1.2 Partitioning at MBR level with 'fdisk' step

Code:
Available disks are: wd0.
Which one is the root disk? (or 'done') [wd0] Enter
Disk: wd0       geometry: 19457/255/63 [312581808 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: A6      0   1   1 -   4864 254  63 [          63:    78156162 ] OpenBSD
 1: A5   4865   0   1 -   9728 254  63 [    78156225:    78140160 ] FreeBSD
 2: A5   9729   0   1 -  12161 254  63 [   156296385:    39086145 ] FreeBSD
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

Use (W)hole disk, use the (O)penBSD area, or (E)dit the MBR? [OpenBSD] Enter
Because we want the preserve the current MBR layout we just press Enter.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote