If you were totally confused by partitions earlier and figured you'd just wing it, make the root partition the entire size of the disk minus 2 GB, and then press Enter.. Next you'll be a
Trang 1If you get lost in the partition command line, type ? and press Enter to see a list of commands Unfortunately the list is a little too long for most PC screens, and you miss the commands at the top The full list of commands is:
a creates a partition
b sets OpenBSD disk boundaries
? prints the list of commands
c changes a partition size
D sets the disk label to the default
d deletes a partition
e edits the drive parameters
g sets the method of determining disk geometry
M shows the entire OpenBSD manpage for disklabel
m modifies an existing partition
n sets the mount point for a partition
p prints the disk label
q saves changes and quits the partition editor
r recalculates the amount of free space
s saves the disk label to a file
u undoes the most recent change
w writes the label to the disk
X toggles expert mode
x exits without saving changes
z zeroes out the partition table
So let's get on with partition creation by pressing a The first question you'll be asked is which partition you're creating Start with partition A by typing a and pressing Enter When asked for an offset, press Enter to accept the default The next variable is size; this will be your root partition, so give it the space you've decided it needs (use G as an abbreviation for gigabytes)
If you were totally confused by partitions earlier and figured you'd just wing it, make the root partition the entire size of the disk minus 2 GB, and then press Enter
If you do this, you won't be bothering with other partitions such as /var and /home (they will all live in the root)
The next question is filesystem type You can accept the default (4.2BSD) Next you'll be asked for the mount point; that will be / so type a slash and press Enter to create the partition
Trang 2Press a again to create a swap partition Partition B is reserved for swapspace, so choose that Size it accordingly (or if you're winging it, give over your remaining 2
GB to this partition)
If you were winging it, you've just used up all your disk space, which is fine But if not, repeat this process with further partitions, starting with the letter d (c is
reserved), sizing them according to your plan and giving them the proper mount points When you're done, press w to write the label to the disk, and then press q and then Enter to save and quit the partition utility
After the partition table's been written, if you chose to use several partitions, you'll
be asked to verify each partition's mount point If you decided to use one big
partition, the installation utility will likely move on to network configuration For the mount points, just press Enter for each one When you find that you are starting over at the beginning again, type done and press Enter
Next you'll be asked if you're sure you want to proceed Type y and press Enter
3.3.3 Network configuration
Once the disk has been sliced, partitioned, and formatted, you'll be asked to set the hostname This is the machine's namename it whatever you wish
Next you'll be asked if you'd like to configure the network Type y and press Enter
If OpenBSD recognizes your network devices, it'll list them by module name (Note that Intel Centrino (IPW) wireless chips in laptop computers may be
recognized, but will not work until a binary firmware blob is manually loaded from the command line after installation is complete.) Most people will probably have only one network device here, but if you have several, choose the one that will be your primary Internet connection and press Enter
After that, you'll be given the chance to change the media options for your network device Most people will not have to change anything here, so press Enter
If this network device has a static IPv4 address, type it in now and press Enter If it
is assigned an IP address from a DHCP server (if it's connecting to a router or directly to a broadband Internet connection like a cable or DSL modem, then it's likely those devices will assign you a dynamic IP address through DHCP as well), type in dhcp and press Enter
Trang 3If you put in a static IP address, you'll be asked for a netmask (subnet mask) at this point Type it in and press Enter
Next, you'll be asked for your IPv6 address If you are on an IPv6 network instead
of IPv4, enter your static IP address here Most people will just press Enter for the none default If this machine will function as an IPv6 router, choose rtsol here
If you have another network interface to initialize, this process will repeat for that device Note that the installer will crash if you try to use DHCP with more than one network interface; you can change this manually later (by editing the /etc/hostname file for each network interface) if necessary
If you have a domain name and DNS server for this machine, now's the time to put them in If you chose DHCP earlier, then just leave the default entries as they are and press Enter The nameservers are written to the /etc/resolv.conf file, and are overwritten every time a new host is dynamically configured Next you'll be asked
if you'd like to use the nameserver right now Press Enter to accept the default yes
The default route setting is next If you are setting up OpenBSD as a network
router and want to set the default route now (presumably you've already set up your interfaces accordingly), you certainly may Most people will want to leave this as is and press Enter
Next you'll be asked if you'd like to configure the hosts file with the ed editor Unless you already know how to use ed, say no here and remember to do it later if necessary When asked if you'd like to do any manual network configuration, your answer should probably be no unless you are using this machine as a network appliance of some kind and require unusual settings All of these things can be changed later through the various network config files in the /etc directory if
necessary
When prompted, type in your root password and press Enter, and then do it once more to ensure that you typed it properly
3.3.4 Package sets
Now it's time to install package sets Skip down to the section below that applies to your situation
Trang 43.3.4.1 From the official CD
If you are installing from the official OpenBSD CD set, the package installation will be a breeze: just type cd here and press Enter Assuming you only have one optical drive in your computer, press Enter again to accept the default, or type the device node of the particular CD drive that you're using for the installation and press Enter Press Enter a third time to accept the default package set location Now skip down to the subsection on choosing package sets
3.3.4.2 Over FTP/HTTP
If you're installing from a floppy or minimal install CD, type in ftp here (or http if that's the server type of the mirror you chose earlier) and press Enter You'll then
be asked for the FTP or HTTP proxy server (if you don't have one, use none) You'll then be asked for the mirror address and the directory on that mirror that the OpenBSD package sets are in Type in the mirror address that you wrote down earlier, and leave the directory at its default, which should be automatically
detected as pub/OpenBSD/4.0/i386 or pub/OpenBSD/4.0/amd64, depending on which architecture you're installing on
You may be asked if you'd like to view a list of known FTP mirrors You should already have one or two written down, so this procedure is not necessary If you forgot to write down an FTP mirror address, or if the one you wrote down doesn't work, here are some that should:
ftp://ftp5.usa.openbsd.org/
ftp://rt.fm/
ftp://ftp.kd85.com/
Now continue to the subsection on choosing package sets
3.3.4.3 Choosing package sets
The default package set list will be shown to you This includes more than the bare minimum installation, which would be the following:
bsd
bsd.rd
Trang 5 base40
etc40
These minimum package sets will get you a working, networked operating system and absolutely not one thing more, but unless this is what you want (perhaps if you're designing some types of network appliance, for instance), at very least you should leave the default package selections as they are but add what you need (You can probably do without the games if hard drive space is a concern, but they won't pose a security risk, so there's no harm in leaving them in.)
If you are on a multi-CPU, multi-core, or Hyper-Threaded machine, select the bsd.mp package for installation; that's the multiprocessor-aware kernel, and you'll need it to use both CPUs or cores
If you are using this as a desktop system, just type all and press Enter to select all packages, including the X server To select a package, type its name in and press Enter To deselect a package, do the same thing with a - in front of the package name (to "subtract" it from the list)
Type done and press Enter when you're done, and then press Enter to begin
copying the selected files to your machine This process will take anywhere from a few minutes to more than an hour, depending on how many package sets you selected and where they are coming from
Once all of the package sets you selected are installed, you'll be asked for the location of other package sets Type done here and press Enter
3.3.5 The final few steps
The next question asks if you'd like to start the OpenSSH daemon when the system boots If you don't need remote access and are planning to do all your work
through this machine itself (or a serial terminal connected to it), type no and press Enter Otherwise, if you need to be able to log into the machine over the network, press Enter to select the default yes
Now you'll be asked if you want to start the OpenNTPD network time protocol daemon at boot time The default is no, but it'll help keep accurate time on your machine if you choose yes here, so unless you have a good reason not to enable OpenNTPD, type yes and press Enter