Upgrading from Official Media

After reading the Upgrade Guide, get your installation media for the new version of OpenBSD and boot from it. If you plan to upgrade over a network, you should need only the new installation kernel bsd.rd. You can just grab this via FTP (or you could grab the entire directory along with it and run the upgrade from your local disk). Here, I grab the newest snapshot kernel from my root directory:

# cd /
# ftp ftp://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/amd64/bsd.rd
Connected to plier.ucar.edu.
…

After you get the snapshot kernel, go to your console and boot into the new kernel.

>> OpenBSD/amd64 BOOT 3.18
boot>  boot bsd.rd
booting hd0a:bsd.rd: 2993636+916428+2864232+0+531344 [89+320016+207017]=0xb799f0
entry point at 0x1001e0 [7205c766, 34000004, 24448b12, a608a304]
…
root on rd0a swap on rd0b dump on rd0b
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
Welcome to the OpenBSD/amd64 5.3 installation program.
(I)nstall, (U)pgrade or (S)hell? U

Enter U to upgrade. The upgrade process looks much like the installation process covered in Chapter 3. Defaults appear inside square brackets. Accept the defaults by pressing ENTER.

Terminal type? [vt220] 1
Available disks are: sd0 sd1 sd2.
Which one is the root disk? (or 'done') [sd0] 2
Root filesystem? [sd0a] 3
Checking root filesystem (fsck -fp /dev/sd0a)…OK.
Mounting root filesystem (mount -o ro /dev/sd0a /mnt)…OK.
Do you want to do any manual network configuration? [no] 4
Force checking of clean non-root filesystems? [no] 5
fsck -p e4bf0318329fe596.a…OK.
…

Always use the default terminal, unless you know exactly when you shouldn’t. Commodity hardware usually uses vt220, as shown here at 1, but the default terminal is platform-specific.

The upgrade needs to read your root partition to learn where to install files. It can’t conclusively identify your actual root disk 2 and partition 3 unless you tell it to do that.

The upgrade script will configure your network according to the existing settings that you should hope are correct. If you need to adjust the network at every boot, the upgrade script gives you a chance to reconfigure the network at 4.

If you shut down the machine via reboot or shutdown, your filesystems should be clean. If you unceremoniously pulled the power plug because you were going to upgrade the machine and no longer cared about your filesystems, OpenBSD will notice and clean your filesystems. To deep-check clean filesystems, you can force running fsck(8) at 5. The upgrade script preens clean filesystems to check for obvious errors before proceeding.

Upgrading Over the Network

The default upgrade method is CD. I want to do this upgrade over the network, so here’s how I continue:

Location of sets? (cd disk ftp http or 'done') [cd] ftp 1
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] 2
Server? (hostname, list#, 'done' or '?') [ftp5.usa.openbsd.org] ftp3.usa.openbsd.org 3
Server directory? [pub/OpenBSD/snapshots/amd64] 4
Login? [anonymous] 5

I choose ftp as the location of the sets at 1. I don’t need to go through a proxy server to access the FTP server, so I leave that space blank at 2.

The default OpenBSD FTP server is perfectly fine, but if you’ve identified a really fast mirror, you might use that. I use my preferred mirror site at 3.

Every bsd.rd installer knows the server directory to install from at 4. I change the server directory only if I have set up a local mirror. Similarly, every OpenBSD mirror permits anonymous FTP. I change the username and enter a password only if I’m using a local mirror at 5.

Choosing File Sets

Next comes a chance to choose which sets to upgrade.

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] base51.tgz    [X] game51.tgz    [X] xfont51.tgz
    [X] bsd.rd        [X] comp51.tgz    [X] xbase51.tgz   [X] xserv51.tgz
    [X] bsd.mp        [X] man51.tgz     [X] xshare51.tgz
Set name(s)? (or 'abort' or 'done') [done]

You must upgrade every file set installed on your machine, or the machine will behave unpredictably. If you didn’t install some sets during your original installation, you don’t need to install them now. For most machines, I recommend installing all sets.

Note

Notice that two sets are missing: etcXX.tgz and xetcXX.tgz. These files belong in /etc and are legitimately edited by system administrators. The upgrade script cannot know if a file should be replaced, edited, or ignored. You must update /etc yourself.

The upgrade script downloads and extracts the selected file sets, and then asks you to verify that you’re finished selecting file sets. If so, it remakes all your device nodes to fit with the new kernel.

At this point, you can reboot into your new OpenBSD userland except that userland might not work quite right because you haven’t updated /etc yet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.93.141