您查看的文章来源于http://www.oklinux.cn
从ftp.freebsdchina.org/pub/OpenBSD/4.0/i386/下载cd40.iso,然后光盘启动我们会看到蓝色背景的字!这里是OpenBSD的开机信息!然后我们会看到下面的这个:
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? I
选择I, 安装新系统, 如果是从原来的系统上升级则选择U, 或者你可以选择S, 在SHELL下操作, 其实当你在安装过程序中自己有某些设置错误Ctrl + c中止后, 也是回到这个SHEEL下操作的!在SHEEL下执行install就是安装系统。
Welcome to the OpenBSD/i386 4.0 install program.
This program will help you install OpenBSD in a simple and rational way. At
any prompt except password prompts you can run a shell command by typing
'!foo', or escape to a shell by typing '!'. Default answers are shown in []'s
and are selected by pressing RETURN. At any time you can exit this program by
pressing Control-C and then RETURN, but quitting during an install can leave
your system in an inconsistent state.
Specify terminal type: [vt220]
Do you wish to select a keyboard encoding table? [n] y
选择键盘类型, 一些都是US。
IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this
program can cause SIGNIFICANT data loss.
It is often helpful to have the installation notes handy. For complex disk
configurations, relevant disk hardware manuals and a calculator are useful.
Proceed with install? [n] y
下面我们继续安装:
Cool! Let's get to it... You will now initialize the disk(s) that OpenBSD will use. To enable all
available security features you should configure the disk(s) to allow the
creation of separate filesystems for /, /tmp, /var, /usr, and /home.
选择从哪个硬盘上安装, 我的系统只挂了一个小硬盘, 所以只一个!
Available disks are: wd0.
Which one is the root disk? (or done) [wd0] Enter
是否整个硬盘都安装OpenBSD, 是.
Do you want to use *all* of wd0 for OpenBSD? [no] yes
Treating sectors 63-6303024 as the OpenBSD portion of the disk.
You can use the 'b' command to change this.
Initial label editor (enter '?' for help at any prompt)
> ? 现在我们来进行硬盘分区, 这里打入?寻求帮助!
Available commands:
p [unit] - print label.
M - show entire OpenBSD man page for disklabel.
e - edit drive parameters.
a [part] - add new partition.
b - set OpenBSD disk boundaries.
c [part] - change partition size.
d [part] - delete partition.
D - set label to default.
g [d|b] - Use [d]isk or [b]ios geometry.
m [part] - modify existing partition.
n [part] - set the mount point for a partition.
r - recalculate free space.
u - undo last change.
s [path] - save label to file.
w - write label to disk.
q - quit and save changes.
x - exit without saving changes.
X - toggle expert mode.
z - zero out partition table.
? [cmnd] - this message or command specific help.
Numeric parameters may use suffixes to indicate units:
'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes,
'g' for gigabytes or no suffix for sectors (usually 512 bytes).
Non-sector units will be rounded to the nearest cylinder.
Entering '?' at most prompts will give you (simple) context sensitive help.
>
我分了五个区, a 根分区 200M, b 交换分区 300M , d 100M /tmp, e 100M /var , f 最后的全给 /usr,
使用 d删除分区,a 创建分区,p 查看分区情况,q 退出!
d a 删除a分区
a a 创建a分区
p g 查看分区, 大小以G显示
p m 查看分区, 大小以M显示
下面我们挂载分区:
The root filesystem will be mounted on wd0a.
wd0b will be used for swap space.
Mount point for wd0d (size=122976k), none or done? [/tmp] Enter
Mount point for wd0e (size=82152k), none or done? [/var] Enter
Mount point for wd0g (size=2097144k), none or done? [/usr] Enter
Mount point for wd0h (size=4194288k), none or done? [/home] Enter
Mount point for wd0d (size=122976k), none or done? [/tmp] done
Done - no available disks found.
You have configured the following partitions and mount points:
wd0a /
wd0d /tmp
wd0e /var
wd0g /usr
wd0h /home
格式化分区:
The next step creates a filesystem on each partition, ERASING existing data.
Are you really sure that you're ready to proceed? [n] y
/dev/rwd0a: 307440 sectors in 305 cylinders of 16 tracks, 63 sectors
200MB in 20 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0b: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors
300MB in 16 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0d: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
100MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0e: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors
100MB in 261 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)
/dev/rwd0f: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors
2300MB in 521 cyl groups (16 c/g, 7.88MB/g, 1920 i/g)