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 2nd October 2015
spauldo spauldo is offline
Real Name: Jeff Spaulding
New User
 
Join Date: Oct 2015
Location: Oklahoma
Posts: 3
Default OpenBSD 5.7 Diskless Install Methods

(NOTE: I'm not talking about using network booting to install onto a disk here. I'm talking about installing OpenBSD to run on a diskless client.)

It seems that OpenBSD 5.7 has changed the layout of the install sets, merging etc.tgz into base.tgz and eliminating a lot of files from /etc.

This makes things a bit harder to set up diskless machines.

Now, I've got two OpenBSD 5.7 machines. One is pretty standard. The other, my firewall, has no disk at all and boots off the first.

In the past, this was pretty straightforward; set up the PXE boot, tftp, etc., untar the install sets you want into a directory exported by NFS, and then tweak some files in /etc. Instant server, please don't add water. Now, however, most of those files in /etc are missing (some are in /etc/examples) and are apparently set up with the install script, seeing as how I have a ton of files on the regular install that aren't in the install sets.

My solution: copy over missing files from the regular install, tweak accordingly, and boot. This works. However, it requires you to have a regular install around, and I'm not entirely sure I accomplished it with no errors that will come back to bite me later.

Since I'm going to have to do this all again someday, I'm interested in hearing proposals for a better way of accomplishing this. Ideally, there would be a bsd.rd that can do a network boot and install onto the NFS server; or, barring that, the install sets laid out in a fashion so that you can boot a system after untarring the sets and get into an install script that will complete the setup process. That's not the world we live in though.

Has anyone here tried this, and how did you accomplish it? Am I missing anything obvious? Any better ideas?
Reply With Quote
  #2   (View Single Post)  
Old 2nd October 2015
TronDD TronDD is offline
Package Pilot
 
Join Date: Sep 2014
Posts: 173
Default

The etc tarball still exists, it's part of baseXX.tgz Can you just extract it yourself as the installer would? That should get you back to the same starting place as before. Also something like a site tarball might help you manage configurations.

Tim.
Reply With Quote
  #3   (View Single Post)  
Old 3rd October 2015
spauldo spauldo is offline
Real Name: Jeff Spaulding
New User
 
Join Date: Oct 2015
Location: Oklahoma
Posts: 3
Default

Quote:
Originally Posted by TronDD View Post
The etc tarball still exists, it's part of baseXX.tgz Can you just extract it yourself as the installer would? That should get you back to the same starting place as before. Also something like a site tarball might help you manage configurations.

Tim.
With 5.6, when you untarred base and etc, you had a working system. It needed tweaking to boot (namely, a hostname.interface and the NFS server in the fstab), but that was it.

With 5.7 that's not the case. A lot of the files are missing. I haven't actually tried booting it, but a lot of the missing stuff was pretty important. The installer does a lot more than just untar an archive in 5.7.

Now, if I was better at shell scripting, I would just adapt the installer script to run on the server in the exported directory on the NFS server before first boot, That would work OK for me, but I'm not sure how portable that would be for people using other Unixes for their NFS servers (sh is sh, but other utilities are subtly different).

The site tarball idea works fine for mass deployments, but you still have to develop it in the first place. What I'm concerned with here is initial installs to a new version of OpenBSD, or people who don't have any regular OpenBSD installs to compare to.

Last edited by spauldo; 3rd October 2015 at 06:02 AM. Reason: Forgot to comment about the site tarball
Reply With Quote
  #4   (View Single Post)  
Old 3rd October 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,288
Default

You have several ways to obtain a "complete" system. Two that come to mind:
  • After untarring filesets as before, add two more steps: untar /var/sysmerge/etc.tgz and /var/sysmerge/xetc.tgz
  • Run the install script with a spare drive, then dump(8)/restore(8) the resulting filesystem(s) where you want them
Reply With Quote
  #5   (View Single Post)  
Old 3rd October 2015
spauldo spauldo is offline
Real Name: Jeff Spaulding
New User
 
Join Date: Oct 2015
Location: Oklahoma
Posts: 3
Default

Regarding dump: I've never used it (I came from Linux, and Linus depreciated dump support back in the 2.0.x era, IIRC) - how portable is that? Every try to restore an OpenBSD dump on say, FreeBSD? I might give that a try to see if it works.

Regarding the sysmerge tarballs:

FYI, it looks like those have been moved to /usr/share/sysmerge.

I wasn't aware of those. That's exactly what I'm looking for. And hey, there's a bunch of stuff that goes in /var I never noticed. I touched the log files and that was it.

Thanks, man - that will help a lot next time I have to do this. I'll see about writing up a page about this kind of install when 5.8 comes around.
Reply With Quote
  #6   (View Single Post)  
Old 3rd October 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,288
Default

Quote:
FYI, it looks like those have been moved to /usr/share/sysmerge.
They're in /var/sysmerge on -current, which is the flavor I was on when I went looking for them today.

The dump/restore programs are BSD-specific, and not designed for cross-OS file transfers. if your hosting system is a different OS I recommend using some other file archiver, such as tar or perhaps GNU tar.

I use dump/restore because my hosting systems are always OpenBSD, and dump/restore handle long file/path names, links and special files without problems. The only thing they won't transfer are socket files, which is not an issue.

Last edited by jggimi; 3rd October 2015 at 01:03 PM. Reason: clarity
Reply With Quote
  #7   (View Single Post)  
Old 6th October 2015
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,505
Default

4.14 - Customizing the install process of the OpenBSD FAQ explains how to add files and how to run a script to tailor the installed system to your personal requirements. Works very well
__________________
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
Reply

Tags
diskless, install

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
Ibus has no Chinese input methods. sacerdos_daemonis OpenBSD Packages and Ports 12 24th September 2014 12:36 PM
Diskless Gnome 3 - a short history jggimi OpenBSD Installation and Upgrading 5 2nd July 2014 05:00 PM
WEP and TKIP Wi-Fi encryption methods to be discontinued J65nko News 0 17th June 2010 11:02 PM
How - To install GNOME vile I install OpenBSD ? looop OpenBSD Installation and Upgrading 6 24th April 2010 08:58 PM
Diskless Cluster syrushcw FreeBSD General 1 6th July 2009 12:20 PM


All times are GMT. The time now is 12:34 PM.


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