Tuesday, November 24, 2009

Installing OpenBSD 5.1

Downloading OpenBSD Installation Packages


You can download installation files of OpenBSD 5.1 from ftp://ftp.openbsd.org/pub/OpenBSD/5.1/i386/ or an OpenBSD mirror
to install OpenBSD. The following files are recommended for download.



INSTALL.i386
INSTALL.linux
SHA256
base51.tgz
bsd
bsd.mp
bsd.rd
comp51.tgz
etc51.tgz
floppy51.fs
game51.tgz
man51.tgz
xbase51.tgz
xetc51.tgz
xfont51.tgz
xserv51.tgz
xshare51.tgz


Save these files on a FAT partition. Later, the OpenBSD installer will mount the FAT partition and extract the downloaded files.



Starting the OpenBSD Installer


At the SYSLINUX prompt, type the following command:


memdisk initrd=floppy51.fs

Alternatively, GRUB can be used to start the OpenBSD installer:


kernel (hd0,3)/syslinux/memdisk raw
initrd (hd0,3)/OpenBSD/5.1/i386/floppy51.fs
boot

The kernel and all the programs
OpenBSD uses to install itself will be loaded into memory.



Welcome to the OpenBSD/i386 5.1 installation program.
(I)nstall, (U)pgrade or (S)hell? I

Choose your keyboard layout ('?' or 'L' for list) [default] us


During installation, you can run a shell command at any prompt via '!foo'
or escape to a shell by simply typing '!'. In the shell, you can restart
the installation by typing install.



OpenBSD installer asks for some network settings.


System hostname? (short form, e.g. 'foo') lenovo-s12

DNS domain name? (e.g. 'bar.com') [my.domain] openbsd.org

DNS nameservers? (IP address list or 'none') [none] 72.235.80.12 72.235.80.4

Do you want to do any manual network configuration? [no]

Password for root account? (will not echo)

Start sshd(8) by default? [yes]


Answer No to the ntpd question if your computer is not always online or has Windows installed.


Start ntpd(8) by default? [no] Enter


It is recommended for desktop users to have xdm start X Windows at boot time.


Do you expect to run the X Window System? [yes] Enter
Do you want the X Window System to be started by xdm(1)? [no] yes


Create additional users other than root:


Setup a user? (enter a lower-case loginname, or 'no') [no] jocelyn


Partitioning for OpenBSD


In OpenBSD, we use fdisk(8) and disklabel(8) for partitioning hard drives and USB drives. When you are shown the partition table and given the following question, DON'T answer whole! Instead, type O or E to edit the partition table so you can keep any existing OS and data.



Available disks are: wd0.
Which one is the root disk? (or 'done') [wd0] Enter

Use (W)hole disk, use the (O)penBSD area, or (E)dit the MBR? [whole] E


wd0 points to an IDE disk. If your disks are SCSI, you will use sd0 instead.
If you choose not to use the whole disk for OpenBSD, you will need to use
fdisk(8) to create an OpenBSD entry (A6) in BIOS partition table.



Then, use disklabel to split the OpenBSD partition into several pieces.
If you are not sure how to split it, at least create / (at least 80MB or 5%)
and swap partition (256 to 512MB). Optionally, you may create /var (at least
240MB or 10%), /usr (at least 1600MB or 75%), /home (at least 250MB or 10%),
/tmp and /usr/local partitions.



You can type ? at the prompt to get help. Useful commands are:



p [unit]  - print label.
a [part] - add new partition.
d [part] - delete partition.
w - write label to disk.
q - quit and save changes.
x - exit without saving changes.


You can use the m suffix to denote megabytes and g for gigabytes.
Without suffix, the number will indicate sectors.



Choosing Installation Media


If you have saved installation packages to DOS, Linux or OpenBSD partitions
on local disk, answer d to the following question.



Location of sets? (cd disk ftp http or 'done') [ftp] disk


Choosing installation packages and finishing the install


You will be given a list of packages to install. You should at least install
base46, etc46, man46 and bsd to have a working system.



By this moment, installation is all done. Just type 'reboot' at the shell.



Booting OpenBSD for the first time


I installed OpenBSD on the first primary partition. Since I already had Windows installed on the hard drive, I had to run Acronis Disk Director to resize and move Windows partition to the right. After installing OpenBSD, I used the following GRUB commands to boot into OpenBSD.


root (hd0,0)
chainloader +1
boot

One of the first things to read after installing OpenBSD is afterboot(8).



Using Rescue Shell


If there's a problem with your OpenBSD system, you can boot the rescue kernel by typing bsd.rd at the OpenBSD boot prompt.


boot> bsd.rd

At the following prompt, type s to start the shell.



erase ^?, werase ^W, kill ^U, intr ^C
(I)nstall, (U)pgrade or (S)hell? s


Useful Links


No comments:

Post a Comment

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger