首页 | 博客群 | 公社 | 专栏 | 论坛 | 图片 | 资讯 | 注册 | 帮助 | 博客联播 | 随机访问
亲爱的,整整四年了……- -| 回首页 | 2006年索引 | - -把握机会

OpenBSD 4.0 安装过程(CD-ROM+FTP)

关键词OpenBSD    Unix    BSD                                          

作者:辛亚平
日期:2006年12月3日
出处:Xinsoft.org 技术论坛
网址:http://xinsoft.org/modules/newbb/viewtopic.php?post_id=109

上个月,OpenBSD正式发布4.0版。号称是这个星球上最安全的操作系统的OpenBSD,怎能不吸引 BSD FANS 们的注意呢?所以,我把安装 OpenBSD 4.0 的过程记录下来,希望能对 BSD 系统的入门者起到一点点帮助的作用。

erase ^?, weras ^W, Kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? I

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.

Terminal type? [vt220]
kbd(8) mapping? ('L' for list) [none]

IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this program can cause SIGNIFICATION data lose.

It is often helpful to have the installation notes handy. For complex disk configurations, releavant disk hardware manuals and a calculator are useful.

Proceed with install? [no] 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 filesystem for /, /tmp, /var, /usr, and /home.

Available disks are: wd0.
Which one is the boot disk? (or 'done') [wd0]
Do you want to use *all* of wd0 for OpenBSD? [no] y
Putting all of wd0 into an active OpenBSD MBR partition (type 'A6')...wd0: no disk label
done.

You will now create an OpenBSD disklabel inside the OpenBSD MBR partition. The disklabel defines how OpenBSD splits up the MBR partition into OpenBSD partitions in which filesystems and swap space are created.

The offsets used in the disklabel are ABSOLUTE, i.e. relative to the start of the disk, NOT the start of the OpenBSD MBR partition.

# inside MBR partition 3: type A6 start 63 size 41929857

Treating setors 63-41929650 as the OpenBSD MBR partition of the disk.
You can use the 'b' command to change this.

Initial label editor (enter '?' for help at any prompt)

> p

device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: VMWare Virtual I
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 15
sectors/cylinder: 945
cylindersL 16383
total sectors: 41943040
free sectors: 41929587
rpm: 3600

16 partitions:

#         size  offset  fstype [fsize bsize  cpg]
  a:  41929587      63  unused      0     0
  c:  41943040       0  unused      0     0

> d a
> a a
offset: [63]
size: [41929587] 1024M
Rounding to nearest cylinder: 2096892
FS type: [4.2BSD]
mount point: [none] /
> a b
offset: [2096955]
size: [39832695] 512M
Rounding to nearest cylinder: 1048950
FS type: [swap]
> a d
offset: [3145905]
size: [38783745] 1024M
Rounding to nearest cylinder: 2096955
FS type: [4.2BSD]
mount point: [none] /tmp
> a e
offset: [5242860]
size: [36686790] 3096M
Rounding to nearest cylinder: 8388765
FS type: [4.2BSD]
mount point: [none] /var
> a f
offset: [13631625]
size: [28298025] 6144M
Rounding to nearest cylinder: 12582675
FS type: [4.2BSD]
mount point: [none] /home
> a g
offset: [26214300]
size: [15715350]
FS type: [4.2BSD]
mount point: [none] /usr
> w
> p
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: VMWare Virtual I
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 15
sectors/cylinder: 945
cylindersL 16383
total sectors: 41943040
free sectors: 0
rpm: 3600

16 partitions:

#         size   offset  fstype [fsize bsize  cpg]
  a:   2096892       63  4.2BSD   2048 16384   16 # /
  b:   1048950  2096955    swap
  c:  41943040        0  unused      0     0
  d:   2096955  3145905  4.2BSD   2048 16384   16 # /tmp
  e:   8388765  5242860  4.2BSD   2048 16384   16 # /var
  f:  12582675 13631625  4.2BSD   2048 16384   16 # /home
  g:  15715350 26214300  4.2BSD   2048 16384   16 # /usr
> q
No label changes.
Mount point for wd0d (size=1048477k)? (or 'none' or 'done') [/tmp] /tmp
Mount point for wd0e (size=4194382k)? (or 'none' or 'done') [/var] /var
Mount point for wd0f (size=6291337k)? (or 'none' or 'done') [/home] /home
Mount point for wd0g (size=7857675k)? (or 'none' or 'done') [/usr] /usr
Mount point for wd0d (size=1048477k)? (or 'none' or 'done') [/tmp] done
No more disks to initialize.

OpeBSD filesystems:
wd0a /
wd0d /tmp
wd0e /var
wd0f /home
wd0g /usr

The next step *DESTORYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
/dev/rwd0a:     2096892 sectors in 2219 cylinders of 15 tracks, 63 sectors
        1023.9MB in 7 cyl groups (320 c/g, 147.66MB/g, 18944 i/g)
/dev/rwd0d:     2096952 sectors in 2219 cylinders of 15 tracks, 63 sectors
        1023.9MB in 7 cyl groups (320 c/g, 147.66MB/g, 18944 i/g)
/dev/rwd0e:     8388764 sectors in 8877 cylinders of 15 tracks, 63 sectors
        4096.1MB in 28 cyl groups (320 c/g, 147.66MB/g, 18944 i/g)
/dev/rwd0f:     12582672 sectors in 13315 cylinders of 15 tracks, 63 sectors
        6143.9MB in 42 cyl groups (320 c/g, 147.66MB/g, 18944 i/g)
/dev/rwd0g:     15715348 sectors in 16630 cylinders of 15 tracks, 63 sectors
        7673.5MB in 52 cyl groups (320 c/g, 147.66MB/g, 18944 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Sat Dev  2 10:36:42 2
006)
/dev/wd0f on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=S
at Dev  2 10:36:42 2006)
/dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Sa
t Dev  2 10:36:42 2006)
/dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Sat Dev  2
 10:36:42 2006)
/dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Sa
t Dev  2 10:36:42 2006)

System hostname? (short from, e.g. 'foo') Jessie
Configure the network? [yes]
Available interfaces are: pcn0.
Which one do you wish to initialize? (or 'done') [pcn0]
Symbolic (host) name for pcn0? [Jessie]
The media options for pcn0 are currently
        media: Ethernet autoselect (autoselect)
Do you want to change the media options? [no]
IPv4 address for pcn0? (or 'none' or 'dhcp') 192.168.2.10
Nemask? [255.255.255.0]
IPv6 address for pcn0? (for 'rtsol' or 'none') [none]
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [my.domain] localdomain
DNS nameserver? (IP address or 'none') [none] 202.106.0.20
Use the nameserver now? [now]
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') 192.168.2.1
add new default: gateway 192.168.2.1
Edit hosts with ed? [no]
Do you want to do any manual network configuration? [no]
Password for root account? (will not echo)
Password for root account? (again)

Let's install the sets!
Location of sets? (cd disk ftp http or 'done') [cd] ftp
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
Display the list of known ftp servers? [no]
Server? (IP address, hostname or 'done') 192.168.2.2
Does the server support passive mode ftp? [yes]
Server directory? [pub/OpenBSD/4.0/i386] openbsd/4.0/i386
Login? [anonymous]

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] bsd.rd
     [ ] bsd.mp
     [X] base40.tgz
     [X] etc40.tgz
     [X] misc40.tgz
     [X] comp40.tgz
     [X] man40.tgz
     [X] game40.tgz
     [ ] xbase40.tgz
     [ ] xetc40.tgz
     [ ] xshare40.tgz
     [ ] xfont40.tgz
     [ ] xserver40.tgz
Set name? (or 'done') [bsd.mp]
     [X] bsd
     [X] bsd.rd
     [X] bsd.mp
     [X] base40.tgz
     [X] etc40.tgz
     [X] misc40.tgz
     [X] comp40.tgz
     [X] man40.tgz
     [X] game40.tgz
     [X] xbase40.tgz
     [X] xetc40.tgz
     [v] xshare40.tgz
     [X] xfont40.tgz
     [X] xserver40.tgz
Ready to install sets? [yes]
Getting bsd ...
100% |********************************|  5904 KB 00:01
Getting bsd.rd ...
100% |********************************|  5904 KB 00:01
Getting bsd.mp ...
100% |********************************|  5952 KB 00:01
Getting base40.tgz ...
100% |********************************| 40675 KB 00:29
Getting etc40.tgz ...
100% |********************************|  1133 KB 00:01
Getting misc40.tgz ...
100% |********************************|  2233 KB 00:01
Getting comp40.tgz ...
100% |********************************| 77933 KB 00:49
Getting man40.tgz ...
100% |********************************|  7427 KB 00:06
Getting game40.tgz ...
100% |********************************|  2548 KB 00:01
Getting xbase40.tgz ...
100% |********************************| 10341 KB 00:06
Getting xetc40.tgz ...
100% |********************************| 90762    00:00
Getting xshare40.tgz ...
100% |********************************|  2027 KB 00:02
Getting xfont40.tgz ...
100% |********************************| 32455 KB 00:13
Getting xserver40.tgz ...
100% |********************************| 19418 KB 00:11
Location of sets? (cd disk ftp http or 'done') [done]
Start sshd(8) by default? [yes]
Start ntpd(8) by default? [no]
Do you expert to run the X window System? [no]
Change the default console to com0? [no]
Saving configuration files...done.
Generating initial host.random file...done.
What timezone are you in? ('?' for list) [Canada/Mountain] Asia/Chongqing
Setting local timezone to 'Asia/Chongqing'...done.
Making all device nodes...done.
Installing boot block...
boot: /mnt/boot
proto: /usr/mdec/biosboot
device: /dev/rwd0c
/usr/mdec/biosboot: entry point 0
proto bootblock size 512
/mnt/boot is 3 blocks x 16384 bytes
fs block shift 2; part offset 63; inode block 24, offset 1704
using MBR partition 3: type 166 (0xa6) offset 63 (0x3f)
done.

CONGRATULATIONS! Your OpenBSD install has been successfully completed!
To boot the new system, enter halt at the command prompt. Once the
system has halted, reset the machine and boot from the disk.
# halt
syncing disks...done

The operation system has halted.
Please press any key to reboot.

经过这样一番折腾,OpenBSD 4.0 就装好了。如果实现把相应的软件包放在局域网的 FTP 上的话,大约 10 分钟左右就能装好一个 OpenBSD 4.0 系统。
下面我们的 OpenBSD 就能投入使用了:
OpenBSD 4.0 使用截屏
SSH 服务已经装好了,可以直接用 PuTTY 访问了:

【作者: 辛亚平】【访问统计:】【2006年12月4日 星期一 11:00】【注册】【打印

搜索

Google

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=5924047

回复

验证码:   
评论内容: