DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Question Clean install of OpenBSD but keeping existing partition table

Hi, borked an install and want to do a clean install of the whole #! and start with a virgin system. However, I would like to keep my partition table set as is. Of course just the partitions themselves, no actual data should remain

What would be the best way to do this? rm -rf /* and pxeboot to install?

Seems a little barbaric way to do it. Is there a way to wipe all the data, install via pxe and have it use the partitions that are already in place, just adding mount points to their entries?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 27th May 2015
bsd-keith bsd-keith is offline
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 138
Default

If you do an update I think it will just overwrite the / partition files.

(I had 5.6 installed & updated it to 5.7 & that seems to have been what happened.)

However, I have found that it is easy to just do a fresh installation after having tried a couple of different ways of installing when I started using it a couple of months ago.
__________________
Linux since 1999, & now an OpenBSD user.
Reply With Quote
  #3   (View Single Post)  
Old 27th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,944
Default

You can do a clean install, leaving the disklabel and (for MBR architectures) any MBR partition tables intact. 1) Don't write a new MBR. 2) When prompted for disklabel partitioning, choose custom, rather than automatic. You will be sent to the disklabel(8) editor. Don't delete or add any partitions, use the "n" name command to assign partitions to mount points. The partitions will be formatted, but will not be moved.
Reply With Quote
  #4   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

Quote:
Originally Posted by jggimi View Post
You can do a clean install, leaving the disklabel and (for MBR architectures) any MBR partition tables intact. 1) Don't write a new MBR. 2) When prompted for disklabel partitioning, choose custom, rather than automatic. You will be sent to the disklabel(8) editor. Don't delete or add any partitions, use the "n" name command to assign partitions to mount points. The partitions will be formatted, but will not be moved.
so just do a normal pxeboot install and just select custom on the partition manager and add the mountpoints via n flag. then it will wipe all data in all partitions and get me a shiny brand new not borked install?
Reply With Quote
  #5   (View Single Post)  
Old 27th May 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,276
Default

Quote:
Originally Posted by daemonbak View Post
so just do a normal pxeboot install and just select custom on the partition manager and add the mountpoints via n flag.
Correct, for the most part. The install script will maintain the old partitions, but the mount points will be lost. Using disklabel(8)'s n command allows you to (re)name these partitions.
Quote:
...then it will wipe all data in all partitions and get me a shiny brand new not borked install?
Correct. As soon as the disklabel(8) editor is exited, the install script will (re)initialize all partitions using newfs(8).

Last edited by ocicat; 27th May 2015 at 09:58 PM. Reason: correct verb tense...
Reply With Quote
  #6   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

Quote:
Originally Posted by ocicat View Post
Correct, for the most part. The install script will maintain the old partitions, but the mount points will be lost. Using disklabel(8)'s n command allows you to (re)name these partitions.

Correct. As soon as the disklabel(8) editor is exited, the install script will (re)initialized all partitions using newfs(8).
Thank you!
Reply With Quote
  #7   (View Single Post)  
Old 27th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,944
Default

You don't even need to do a PXE boot, or use any installation media, if there is a working ramdisk kernel available (/bsd.rd). If it exists, you can boot it and run the install script.
Reply With Quote
  #8   (View Single Post)  
Old 27th May 2015
daemonbak daemonbak is offline
Fdisk Soldier
 
Join Date: Feb 2015
Posts: 51
Default

just type /bsd.rd when i get the boot> menu?
Reply With Quote
  #9   (View Single Post)  
Old 27th May 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,944
Default

Yep. You don't even need the "/", so you can use "bsd.rd" instead. The default location for kernel hunting is the root directory of the "a" partition of the boot drive.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping your /var/log/pflog file clean and managable J65nko Guides 3 8th February 2014 11:07 PM
Keeping /var/log/pflog clean from NetBIOS and SSID junk J65nko General software and network 1 26th April 2010 02:12 PM
Preserving existing OpenBSD partition layout during a re-install J65nko Guides 3 17th February 2010 03:55 AM
I think I just mangled my partition table Mantazz FreeBSD Installation and Upgrading 2 2nd July 2009 09:55 PM
FBSD 7.2 installation not seeing partition table correctly Mantazz FreeBSD Installation and Upgrading 0 2nd July 2009 11:36 AM


All times are GMT. The time now is 02:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick