Installing CD-ROM, probably boots off

If you’re installing from CD-ROM, you probably booted off of it. If you had to boot off a floppy disk, be certain that your CD-ROM is in the computer before proceeding! If you enter “c” to choose CD-ROM media, you’ll see the following message:

The following CD-ROM devices are installed on your system.
Please make sure the CD is in the CD-ROM drive and select
the device containing the CD with the installation sets:

cd01

Which CD-ROM contains the installation media? [cd0] 2

Enter the directory relative to the mount point that contains
the file: [3.2/i386] 3

You almost certainly have only  one CD-ROM drive installed. If you have multiple CD-ROM drives, they will be named cd0, cd1, cd2, and so on. You may have to look at the system’s boot-time messages to determine which drive is which. Enter the name of your CD-ROM drive in the  appropriate space. The installer knows which on the CD-ROM the architecture’s distribution directory can be found, but if this is a custom CD-ROM not created by the OpenBSD team you may need to enter a custom path.

That’s it! You’re now ready to go.

You can tell the system where to install from

Now that you have a network connection and a disk to put files on, you can tell the system where to install from.

You will now specify the location and names of the install sets you want to
load. You will be able to repeat this step until all of your sets have been
successfully loaded. If you are not sure what sets to install, refer to the
installation notes for details on the contents of each.

Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
device; or a (f)tp, (n)fs or (h)ttp server.
Where are the install sets you want to use? (m, c, f, etc.) f

In this chapter, we will discuss installations over the network (FTP and HTTP), and installations from CD-ROM. The “mounted filesystem” and “disk” installs are more commonly used in a multiple-boot installation, so we’ll cover them in the next chapter. (And if you know how to prepare an OpenBSD installation tape, you probably don’t need this tutorial!)

Root password should be several characters long

The installer will now ask you for your root password. Your root password should be several characters long and include a mix of upper and lower case alphanumeric characters and symbols.

Password for root account (will not echo):
Password (again):

Be sure you remember the root password! While it can be recovered by booting into single-user mode, you don’t really want to go through that hassle to cover your own mistakes.

Take option: Do additional network configuration

If you take the option to do additional network configuration, you’ll be dropped at a command prompt with a small selection of UNIX tools to work with. Even a simple test, such as “ping,” will confirm your system is talking to the network. Try to ping the host you plan to install OpenBSD from or your default gateway. While not all the standard UNIX commands are available on the install disk, quite a few basic tools are.

Type 'exit' to return to install.
# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.366 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.171 ms
^C--- 192.168.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/std-dev = 0.171/0.268/0.366/0.098 ms

This indicates that the system can ping the default gateway, 192.168.1.1. Hit CONTROL-C to interrupt the ping. If, on the other hand, you issue the command and see nothing for several seconds, you have a connectivity problem.

# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
#

Again, hit CONTROL-C to interrupt the test.

In this case, confirm your IP address and default gateway are correct. Do you have a link light? Do basic network troubleshooting to identify the problem, and perhaps carefully inspect the output of the ifconfig command to try to identify any problems.

Once you know you’re on the network, return to the installer by typing “exit”.

# exit

Two identical network cards have difficulty determining which physical card has interface name

While your driver names and device numbers will vary, if you have two identical network cards you may have difficulty determining which physical card has which interface name. My test computer has two identical network cards. These particular cards use the “fxp” driver and are numbered 0 and 1. There is no way to look at the hardware and identify which is which. If you are installing over the network, you must configure the card that is attached into the network! Trying to install any software over the network is extraordinarily frustrating when you aren’t plugged in. It is very difficult to tell which card it is from the information presented within the installer or even on the command line.

This is one place where a shell escape comes in very handy. You can escape to a command shell with CONTROL -C, or run a single shell command by putting an exclamation point in front of it. The “ifconfig -a” command will tell you which network card is hooked up to the network. (We discuss ifconfig at some length later but for right now just run the command as a single shell command. Network interfaces that are not plugged in or that have failed for some other reason will have a “media” line that says “no carrier,” while cards that have plugged in and are talking to the network will have a “media” line that says how they are connected.

!ifconfig -a
lo0: flags=8008<LOOPBACK,MULTICAST> mtu 33224
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:02:b3:63:e4:1d
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active 1
fxp1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        address: 00:02:b3:63:e3:ec
        media: Ethernet autoselect (none)
        status: no carrier 2

The  fxp0 card is connected to the network at 100 megabits full duplex and is active, while the  fxp1 card is not connected and hence has “no carrier.” You want to configure the fxp0 card, so enter “fxp0.”

IP address for fxp0 (or 'dhcp')? 192.168.1.250

We have an IP address for this system, but entering “dhcp” will make the system get IP address and domain information from the DHCP server.

Symbolic (host) name? [openbsdtest]

We want to use the same host name, so hit ENTER here.

Netmask? [255.255.255.0]

If you have a netmask other than 255.255.255.0, enter it here. Otherwise, hit ENTER.

The default media for fxp0 is
        media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [n]

Media options tell a network card how to connect to the network. In this case, the card seems to have picked up the network connection automatically. If you have an older network card, this may not work so seamlessly; you may need to tell your card to use the 10baseT connector instead of the BNC attachment, for example, or to use full-duplex instead of half-duplex. You’ll have to look at the OpenBSD manual page for your card. You might think this would be difficult to do before you have OpenBSD installed, but don’t forget that the manual pages are available on the OpenBSD website.

You can repeat the process for the other network card or just enter “done” to tell the installer you have finished configuring network cards. The installer will then ask you for the default route on your network and the IP address of your primary nameserver.

Enter IP address of default route: [none] 192.168.1.1
Enter IP address of primary nameserver: [none] 192.168.1.5
Would you like to use the nameserver now? [y]

The next question might seem curious — if you have your network configured, why would you need to do more configuration?

Do you want to do more, manual, network configuration? [n] y

If you’re an experienced network administrator, you’ve probably seen networks where your could only connect to the Internet if you had a particular secondary route set, or where multiple DNS servers were required. This also gives anyone who wants to install over a network an opportunity to test their network configuration. If you have a problem with network installs, this will make your life simpler.

Installer prompts for networking information

Now that you have disks to write information on, the installer will prompt you for networking information.

Enter system hostname (short form, e.g. 'foo'): openbsdtest

If you’ve been around networks for any length of time, you’ve probably seen host names that include a domain name, such as “laptop.BlackHelicopters.org.” This is not the style of host name the installer wants to see here! Just enter the machine’s name within the domain: For example, this system’s full name is “openbsdtest.BlackHelicopters.org” so I enter “openbsdtest.”

Even if your system is not on a network, it needs to have a local host name.

Configure the network? [y]

If you are installing from CD-ROM and don’t want to bother with the network right now, you can hit “n.” I recommend that you configure the network while you’re in the install program; however, it’s much simpler for a new user to do it here than to go back and configure it later.

If any interface will be configured by DHCP, you should not enter
information that will be supplied via DHCP, e.g. the DNS domain name.

Enter DNS domain name (e.g. 'bar.com'): [my.domain] BlackHelicopters.org

If your network has a DHCP server, just hit ENTER here.

Available interfaces are: fxp0 fxp1.
Which one do you wish to initialize? (or done) [fxp0]

If you only have one network card, just hit ENTER. Multiple network cards require a bit more thought.

Label all disks

Once you have labeled all of your disks, you’ll see the following message:

Done - no available disks found.

You have configured the following partitions and mount points:

wd0a /
wd0d /usr
wd0e /var
sd0a /database
sd1d /home

Take one last look at your disks, and confirm that this is where you want your partitions. While the partitioning process made recovery of data difficult, the next step will make recovery darn near impossible.

The next step creates a filesystem on each partition, ERASING existing data.
Are you really sure that you're ready to proceed? [n] y

The default is to not proceed. Hit “y” here to go on, and you’ll see messages much like this for each of your partitions.

/dev/rwd0a:     1024064 sectors in 1016 cylinders of 16 tracks, 63 sectors
        500.0MB in 64 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)

Once all of your partitions have been formatted, you’ll see the mount point and mount option information for each partition.

/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Sun Oct 13 12:59:20
2002)
/dev/sd0a on /mnt/database type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Sun Oct 13 12:59:20 2002)
...

Note that OpenBSD 3.2 and later mounts everything but / nodev and nosuid. Thanks to the systrace mechanism, setuid programs are not necessary on OpenBSD.

Online help

You can enter a single question mark (?) to get a brief listing of disklabel commands.

If you want more detailed help, the “M” command will display the man page for disklabel(8).

 

Want to erase it all and start over

You might screw up the disklabel badly enough that you just want to erase it all and start over. Or, you might be recycling disks from another operating system, and want to clear away any old disklabels or partitioning information. That’s very easy to do with the “z” command.

>z
>

Again, there is no chance to change your mind. Disklabel assumes that if you entered “z” you meant “z”, and that’s that. If you want an “Are You Sure?” prompt, get another operating system.

You can modify existing partition with the “m” command

You can modify an existing partition with the “m” command. Disklabel will walk you through each of the values you entered when creating the disk, offering your original values as defaults and giving you an opportunity to change them. As usual, just hit ENTER to take the defaults.

In most cases, it’s easier to just delete and recreate the partitions. In this example, though, we correct a very obvious mistake with the mount point of the partition.

> m
partition to modify: [] a
FS type: [4.2BSD]
offset: [63]
size: [1024065]
mount point: [/usr] /
>
Page 3 of 10«12345»...Last »