John Piasetzki's Blog

My Thoughts

Installing OpenBSD 4.6

A step-by-step guide to installing OpenBSD

I found that there was a lack of documentation on how to setup OpenBSD 4.6 with multiprocessor. After figuring it out on my own, I documented it as verbosely as possible.



First visit OpenBSD.org and download installation media from the closet mirror (alternatively OpenBSD can be installed by booting bsd.rd from an existing OpenBSD partition, or over the network using the PXE boot process). Select a mirror, navigate to 4.6 (or the most recent release), select your architecture, and download cd46.iso or floppy46.fs (the number 46 reflects the release version). The OpenBSD manual has a good faq on how to boot from the media on the 4.3 - Creating bootable OpenBSD install media page. Once you have the boot media done and have booted you’ll be presented with the following prompts.

Welcome to the OpenBSD/amd64 4.6 installation program.

(I)nstall, (U)pgrade or (S)hell? (return)**

**Cool! Let’s get to it.

At any prompt except password prompts you can escape to a shell by typing ‘!’. Default answers are shown in []’s and are sekected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state.

Choose your keyboard layout (‘?’ or ‘L’ for list) [default] (return)

System hostname? (short form e.g. ‘foo’) marisa(return)

I name my severs woman’s names like ships[1] for this one I picked the name Marisa.

Available network interfaces are: em0 vlan0.

Which one do you wish to configure? (or ‘done’) [em0] (return)

IPv4 address for em0? (or ‘dhcp’ or ‘none’) [dhcp] 192.168.1.29(return)

Netmask? [255.255.255.0] (return)

IPv6 address for em0? (or ‘rtsol’ or ‘none’) [none] (return)

Available network interfaces are: em0 vlan0.

Which one do you wish to configure? (or ‘done’) [done] **(return)

Default  IPv4 route? (IPv4 address, ‘dhcp’ or ‘none’) 192.168.1.1(return)
add net default: gateway 192.168.1.1
DNS domain name? (e.g. ‘bar.com’) [my.domain] 
123qc.no-ip.biz(return)

DNS nameservers? (IP address list or ‘none’) [none] 192.168.1.1(return)
Do you want to do any manual network configuration? [no] (return)**

This is all setup for my network. You should fill in info for your network.

In the next section I setup a user account. This isn’t required however is nice to have. I also set it up not to have X Window System.

Password for root account? (will not echo) ********(return)

Password for root account? (again) ********(return)

Start sshd(8) by default? [yes] (return)

Start ntpd(8) by default? [no] yes(return)

NTP server? (hostname or ‘default’) [default] (return)

Do you expect to run the X Window System? [yes] no(return)

Setup a user? (enter a lower-case loginname, or ‘no’) [no] jpiasetz(return)

Full user name for jpiasetz? [jpiasetz] John Piasetzki(return)

Password for jpiasetz account? (will not echo)  ********(return)

Password for jpiasetz account? (again)  ********(return)

Since you set up a user, disable sshd(8) logins to root? [yes] (return)

What timezone are you in? (‘?’ for list) [Canada/Eastern] (return)

Now it’s moving onto disk setup. I used the entire disk for OpenBSD.

Available disks are: wd0 wd1.

Which one is the root disk? (or ‘done’) [wd0] (return)

Disk: wd0       geometry: 121601/255/63 [1953525168 Sectors]

Offset: 0         Signature: 0xAA55

 Starting         Ending         LBA Info:

: id      C   H   S -      C   H   S [       start:        size ]


 0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused

*3: A6      0   1   1 - 121600 254  63 [          63: 1953520002 ] OpenBSD
Use (W)hole disk, use the (O)penBSD area, or (E)dit the MBR? [OpenBSD] **W(return)

**Setting OpenBSD MBR partition to whole wd0…done.
The auto-allocated layout for wd0 is:

OpenBSD area: 63-1953520065; size: 931.5G; free: 606.3G

  #                size           offset  fstype [fsize bsize  cpg]

  a:             1.0G               63  4.2BSD   2048 16384    1 # /

  b:             1.2G          2097215    swap

  c:           931.5G                0  unused

  d:             4.0G          4695231  4.2BSD   2048 16384    1 # /tmp

  e:             6.0G         13083839  4.2BSD   2048 16384    1 # /var

  f:             2.0G         25619903  4.2BSD   2048 16384    1 # /usr

  g:             1.0G         29814207  4.2BSD   2048 16384    1 # /usr/X11R6

  h:             6.0G         31911359  4.2BSD   2048 16384    1 # /usr/local

  i:             2.0G         44494271  4.2BSD   2048 16384    1 # /usr/src

  j:             2.0G         48688575  4.2BSD   2048 16384    1 # /usr/obj

  k:           300.0G         52882879  4.2BSD   2048 16384    1 # /home

Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] A(return)

/dev/rwd0a: 1024.0MB in 2097152 sectors of 512 bytes

6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each

Available disks are: wd1.

Which one do you wish to initialize? (or ‘done’) [done] (return)

I used the auto layout however you can customize it for your own needs at this point.

Lets install the sets!  
Location of sets? (disk ftp http or done) [ftp] (return)  
HTTP/FTP prox URL? (e.g. http://proxy:8080, or none) [none] **(return)**  
Server? (hostname, list#, done or ?) [ftp.OpenBSD.org] **(return)**  
Server directory? [pub/OpenBSD/4.6/amd64] **(return)**  
Login? [anonymous] **(return)**  

Select sets by entering a set name, a file name pattern or all. De-select sets by prepending a - to the set name, file name pattern or all. Selected sets are labelled [X].  
 [X] bsd  
 [X] bsd.rd  
 [X] bsd.mp  
 [X] base45.tgz  
 [X] etc45.tgz  
 [X] misc45.tgz  
 [X] comp45.tgz  
 [X] man45.tgz  
 [X] game45.tgz  
 [X] xbase45.tgz  
 [X] xetc45.tgz  
 [X] xshare45.tgz  
 [X] xfont45.tgz  
 [X] xserv45.tgz  
 Set name(s)? (or abort or done) [done] **-x*(return)**  
 [X] bsd  
 [X] bsd.rd  
 [X] bsd.mp  
 [X] base45.tgz  
 [X] etc45.tgz  
 [X] misc45.tgz  
 [X] comp45.tgz  
 [X] man45.tgz  
 [X] game45.tgz  
 [ ] xbase45.tgz  
 [ ] xetc45.tgz  
 [ ] xshare45.tgz  
 [ ] xfont45.tgz  
 Set name(s)? (or abort or done) [done] **-g*(return)**  
 [X] bsd  
 [X] bsd.rd  
 [X] bsd.mp  
 [X] base45.tgz  
 [X] etc45.tgz  
 [X] misc45.tgz  
 [X] comp45.tgz  
 [X] man45.tgz  
 [ ] game45.tgz  
 [ ] xbase45.tgz  
 [ ] xetc45.tgz  
 [ ] xshare45.tgz  
 [ ] xfont45.tgz  
 Set name(s)? (or abort or done) [done] **-bsd(return)**  
 [  ] bsd  
 [X] bsd.rd  
 [X] bsd.mp  
 [X] base45.tgz  
 [X] etc45.tgz  
 [X] misc45.tgz  
 [X] comp45.tgz  
 [X] man45.tgz  
 [  ] game45.tgz  
 [  ] xbase45.tgz  
 [  ] xetc45.tgz  
 [  ] xshare45.tgz  
 [  ] xfont45.tgz  
 Set name(s)? (or abort or done) [done] **(return)**  
Downloading sets  
Location of sets (disk ftp http or done) [ftp] **done(return)**  
Are you *SURE* your install is complete without bsd? [no] **yes(return)**  
Saving configuration files...done.  
Generating initial ost.random file...done.  
Making all device nodes...done.  
Multiprocessor machine; using bsd.mp instead of bsd.  

CONGRATULATIONS! Your OpenBSD install has been successfuly completed!  
To boot the new system, enter reboot at the command prompt.  
When you login to your new system the first time, please read your mail useing the "mail command.  

 # **reboot(return)**