光盘安装OpenBSD3.6的方法
1.1.系统从光盘启动,自检过程 - 略...
1.2.选择安装类型
|erase ^?, werase ^w, kill ^u, intr ^c, status ^t
|(i)nstall, (u)pgrade or (s)hell? i <then return>;
#####################################################
其中(i)代表安装一个全新的系统,(u)代表升级原有的openbsd旧版本的系统,(s)代表退出并进入命令行状态。
我们要安装一个全新的openbsd系统,所以我们在这里输入i,并回车。(当然你也可以按下ctrl+c退回到命令行状态,再次输入install回到安装程序,如果在安装程序时误操作,可以使用这种方法进入命令行状态然后再重新回到安装程序开始安装。)
#####################################################
1.3.选择终端类型
|welcome to the openbsd/i386 3.6 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] <return>;
1.4.选择键盘类型
|do you wish to select a keyboard encoding table? [no] yes <then return>;
|select your keyboard type: (p)c-at/xt, (u)sb, or 'done' [p] <return>;
|the available keyboard encoding tables are:
|
| be br de dk es fr it jp lt no pt ru sf sg sv ua uk us
|
|table name? (or 'done') [us] <return>;
|keyboard mapping set to us
##########################################
对于我们大部分的中国用户而言,我们使用的都是标准的美式键盘,这也是openbsd默认的键盘布局,所以我们直接按回车继续。
###############################################
1.5.磁盘划分
|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? [no] yes <then return>;
###########################
安装程序提示是否开始安装,我们直接输入y,并回车
#######################################
|cool! let's get to it...
|
|you will now initialize the disk(s) that openbsd will use. to enable all
|available securty 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] <return>;
################################
在openbsd系统中对于ide接口的硬盘的命名方式是wd0,wd1,wd2……依次类推,而scsi接口的硬盘则是sd0,sd1,sd2……依次类推。
#############################################
|do you want to use *all* of wd0 for openbsd? [no] yes <then return>;
#####################################
系统询问是否将检测到的整个硬盘都给openbsd使用,默认是no,但是我们在这里是要将openbsd作为服务器来用,所以我们在这里输入yes,并回车。
########################################
|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.
|
|# using mbr partition 3: type a6 off 63 (0x3f) size 8385687 (0x7ff54b)
|
|treating sectors 63-8385930 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)
###################################
在>;提示符下输入?将显示帮助,命令p用来显示显示当前硬盘分区的划分情况,命令d用来删除现有的分区(注意:c分区被openbsd系统保留使用,不能被删除或者被变更),命令z用来清空openbsd的分区表,命令a用来创建新的openbsd分区。
在openbsd系统中,xx0a一定是"/"文件系统,xx0b一定是swap文件系统,xx0c一定表示整个硬盘,在这三个文件系统的基础上,你可以进行xx0d、xx0e...等文件系统的划分。
命令“d x”表示删除文件系统,其中,xx0c一定不可以被删除,即便你执行“d c”,也不会成功;
命令“a x”表示增加文件系统,其中,xx0c一定不可以被覆盖,即便你执行“a c”,也不会成功;
partition是分区编号,从a分区开始,c分区跳过。
offset是指每一个分区的偏移地址。
size是分区大小。可以直接输入分区的偏移地址也可以直接输入m为单位的数值,比如我们在size项输入200m,系统回应说这个值近似于的偏移地址为409185。
fs type是文件系统类型。
mount point是挂载点。
注意:b分区默认是留给swap分区的,并且swap分区无需mount point。
##################################
|>; p <then return>;
|device: /dev/rwd0c
|type: esdi
|disk: esdi/ide disk
|label: vmware virtual i
|bytes/sector: 512
|sectors/track: 63
|tracks/cylinder: 16
|sectors/cylinder: 1008
|cylinders: 8332
|total sectors: 8388608
|free sectors: 8385867
|rpm: 3600
|
|16 partitions:
|# size offset fstype [fsize bsize cpg]
| a: 8385867 63 unused 0 0
| c: 8388608 0 unused 0 0
|>; d a <then return>;
|>; a a <then return>;
|offset: [63] <return>;
|size: [8385867] 128m <then return>;
|rounding to nearest cylinder: 262017
|fs type: [4.2bsd] <return>;
|mount point: [none] / <then return>;
|>; a b <then return>;
|offset: [262080] <return>;
|size: [8123850] 256m <then return>;
|rounding to nearest cylinder: 524160
|fs type: [swap] <return>;
|>; a d <then return>;
|offset: [786240] <return>;
|size: [7599690] 128m <then return>;
|rounding to nearest cylinder: 262080
|fs type: [4.2bsd] <return>;
|mount point: [none] /tmp <then return>;
|>; a e <then return>;
|offset: [1048320] <return>;
|size: [7337610] 512m <then return>;
|rounding to nearest cylinder: 1048320
|fs type: [4.2bsd] <return>;
|mount point: [none] /var <then return>;
|>; a f <then return>;
|offset: [2096640] <return>;
|size: [6289290] 2048m <then return>;
|rounding to nearest cylinder: 4194288
|fs type: [4.2bsd] <return>;
|mount point: [none] /usr <then return>;
|>; a g <then return>;
|offset: [6290928] <return>;
|size: [2095002] <return>;
|fs type: [4.2bsd] <return>;
|mount point: [none] /home <then return>;
|>; p <then return>;
|device: /dev/rwd0c
|type: esdi
|disk: esdi/ide disk
|label: vmware virtual i
|bytes/sector: 512
|sectors/track: 63
|tracks/cylinder: 16
|sectors/cylinder: 1008
|cylinders: 8332
|total sectors: 8388608
|free sectors: 8385867
|rpm: 3600
|
|16 partitions:
|# size offset fstype [fsize bsize cpg]
| a: 262017 63 4.2bsd 2048 16384 16 # /
| b: 524160 262080 swap
| c: 8388608 0 4.2bsd 0 0
| d: 262080 786240 4.2bsd 2048 16384 16 # /tmp
| e: 1048320 1048320 4.2bsd 2048 16384 16 # /var
| f: 4194288 2096640 unused 2048 16384 16 # /usr
| g: 2095002 6290928 4.2bsd 2048 16384 16 # /home
|>; w <then return>;
|>; q <then return>;
|no label changes.
|mount point for wd0d (size=131040k)>; (or 'none' or 'done')[/tmp] <return>;
|mount point for wd0e (size=524160k)>; (or 'none' or 'done') [/var] <return>;
|mount point for wd0f (size=2097144k)>; (or 'none' or 'done') [/usr] <return>;
|mount point for wd0g (size=1047501k)>; (or 'none' or 'done') [/home] <return>;
|mount point for wd0d (size=131040k)>; (or 'none' or 'done') [/tmp] done <then return>;
|no more disks to initialize.
|
|openbsd filesystems:
|wd0a /
|wd0d /tmp
|wd0e /var
|wd0f /usr
|wd0g /home
|
|the next step *destorys* all existing data on these partitions!
|are you reallysure that you're ready to proceed? [no] yes <then return>;
| ...... 创建磁盘过程省略 ......
1.6.网络配置
|system hostname? (short form, e.g. 'foo') bsd010ids <then return>;
#######################
配置主机名
#######################
|configure the network? [yes] <return>;
|available interfaces are: le1 le2
|which on do you wish to initialize? (or 'done') [le1] <return>;
|symbolic (host) name for le1? [bsd010ids] <return>;
|ipv4 address for le1? (or 'none' or 'dhcp') 10.x.x.x <then return>;
|netmask? [255.255.255.0] <return>;
|available interfaces are: le2
|which on do you wish to initialize? (or 'done') [le2] <return>;
|symbolic (host) name for le1? [bsd010ids] <return>;
|ipv4 address for le2? (or 'none' or 'dhcp') 192.168.1.1 <then return>;
|netmask? [255.255.255.0] <return>;
|no more interfaces to initialize.
|dns domain name? (e.g. 'bar.com') [my.domain] mycom.com <then return>;
|dns nameserver? (ip address or 'none') [none] 202.97.224.68 <then return>;
|use the nameserver now? [yes] <return>;
|default ipv4 route? (ipv4 address, 'dhcp' or 'none') 10.x.x.x <then return>;
|add net default: gateway 10.x.x.x
|edit hostswith ed? [no] <return>;
|do you want to do any manual network configuration? [no] <return>;
1.7.设置root口令
|password for root account? (will not echo) <enter your password then return>;
|password for root account? (again) <enter your password again then return>;
1.8.选择需要安装的系统文件
|you will now specify the locatiob and names of the install sets you wangt 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
|installatio 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? (or 'done') c <then return>;
|available cd-roms are cd0.
|which one contains the install media? (or 'done') [cd0] <return>;
#####################################
安装程序询问用哪种方式安装,我们输入c,从cdrom上安装,然后选择第一个cdrom设备cd0,回车继续。
#######################################
|
|pathname to the sets? (or 'done') [3.6/i386] <return>;
|
|the following sets are available. enter a filename, 'all' to select
|all the sets, or 'done'. you may de-select a set by prepending a '-'
|to its name.
|
| [x]bsd
| [x]bsd.rd
| [ ]bsd.mp
| [x]base36.tgz
| [x]etc36.tgz
| [x]misc36.tgz
| [x]comp36.tgz
| [x]man36.tgz
| [x]game36.tgz
| [ ]xbase36.tgz
| [ ]xetc36.tgz
| [ ]xshare36.tgz
| [ ]xfont36.tgz
| [ ]xserv36.tgz
|
|file name? (or 'done') [bsd.mp] -game36.tgz <then return>;
|
|the following sets are available. enter a filename, 'all' to select
|all the sets, or 'done'. you may de-select a set by prepending a '-'
|to its name.
|
| [x]bsd
| [x]bsd.rd
| [ ]bsd.mp
| [x]base36.tgz
| [x]etc36.tgz
| [x]misc36.tgz
| [x]comp36.tgz
| [x]man36.tgz
| [ ]game36.tgz
| [ ]xbase36.tgz
| [ ]xetc36.tgz
| [ ]xshare36.tgz
| [ ]xfont36.tgz
| [ ]xserv36.tgz
|
|file name? (or 'done') [bsd.mp] done <then return>;
|ready to install sets? [yes] <return>;
| ...... 安装过程省略 ......
|
|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? (or 'done') done <then return>;
这里解释一下openbsd的系统包的安装情况:
“x”开动的系统包,是x window使用的基本包(我不用这东西,没装);
其余的包,除“bsd.mp”、“game36.tgz”外,都是系统必须的包,要装;
“bsd.mp”我不知道是什么,也没查,我感觉应该是smp用的,缺省就没选,我也没装;
“game36.tgz”,这个我肯定是不装。
1.9.系统服务配置
|start sshd(8 ) by default? [yes] <return>;
|do you expect to run the x window system? [yes] no <then return>;
|change the default console to com0? [no] <return>;
|saving configuration files...done.
|generating initial host.random file...done.
|what timezone are you in? ('?' for list) [canada/mountain] ? <then return>;
|africa/ chile/ gb-eire israel nz-chat turkey
|america/ cuba gmt jamaica navajo uct
|antarctica/ eet gmt+0 japan prc us/
|arctic/ est gmt-0 kwajalein pst8pdt utc
|asia/ est5edt gmt0 libya pacific/ universal
|atlantic/ egypt greenwich met poland w-su
|australia/ eire hst mst portugal wet
|brazil/ etc/ hongkong mst7mdt roc zulu
|cet europe/ iceland mexico/ rok posix/
|cst6cdt factory indian/ mideast/ singapore posixrules
|canada/ gb iran nz systemv/ right/
|what timezone are you in? ('?' for list) [canada/mountain] prc <then return>;
##################
此处用utc则和你的手表时间一致,因此建议使用utc
##多谢bluebell指出错误,输入的时候没有注意,呵呵
#########################
|setting local timezone to 'prc'...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 120, offset 8488
|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 <then return>;
|syncing disks... done
|
|the operating system has halted.
|please press any key to reboot. <return>;
|
|rebooting...
至此,系统安装部分完毕。
上一篇: Linux中的终端特殊设备文件详解
推荐阅读
-
Oracle删除后不能重新安装的解决方法
-
用于deeplink的js方法(判断手机是否安装app)_javascript技巧
-
Ubuntu 16.04 LTS中源码安装Python 3.6.0的方法教程
-
Oracle RAC之--安装过程中碰到的问题及解决方法
-
windows下安装、卸载mysql服务的方法(mysql 5.6 zip解压版安装教程)
-
PHP5.3连接Oracle客户端及PDO_OCI模块的安装方法
-
ubuntu php curl安装的步骤方法
-
nodejs安装和配置环境的方法介绍
-
用yum安装MySQLdb模块的步骤方法
-
Python首次安装后运行报错(0xc000007b)的解决方法