| OpenBSD FAQ
第四章:OpenBSD3.5安装指南 |
| #fdformat /dev/rfd0c Format 1440K floppy `/dev/rfd0c'? (y/n): y Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done. |
| # dd if=floppy35.fs of=/dev/rfd0c bs=32k |
| #cmp /dev/rfd0c floppy35.fs |
| C:\> rawrite RaWrite 1.2 - Write disk file to raw floppy diskette Enter source file name: floppy35.fs Enter destination drive: a Please insert a formatted diskette into drive A: and press -ENTER- : |
| C:\> fdimage -q floppy35.fs a: |
| C:\> ntrw floppy35.fs a: 3.5", 1.44MB, 512 bytes/sector bufsize is 9216 1474560 bytes written |
4.4-启动 OpenBSD安装介质
启动i386
在i386平台上启动安装映像对很多人来说并非什么新鲜事。假如你使用的是一张软盘,只要将软盘插入软驱并且启动计算机即可。安装映像就会被载入,你需要在BIOS里面打开软盘启动支持。假如你想从光盘启动,你就需要进入系统BIOS设置从光盘启动。一些比较老的BIOS没有此选项,你就必须使用软盘来启动安装映像。不用担心,你从软盘启动后一样可以从光盘进行安装。
| ok boot floppy |
| ok boot cdrom |
| ok probe-scsi Target 0 Unit 0 Disk QUANTUM LIGHTNING 365S Target 1 Unit 0 Removable Disk QUANTUM EMPIRE_1080S Target 3 Unit 0 Removable Disk Joe's CD-ROM |
| ok boot /sbus/esp/sd@X,0 |
| rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i |
| Welcome to the OpenBSD/i386 3.5
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]ENTER Do you wish to select a keyboard encoding table? [n] ENTER |
| 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 |
| Do you want to use *all* of wd0 for OpenBSD? [no] Enter |
| You will now create a single MBR partition to contain
your OpenBSD data. This partition must have an id of 'A6'; must *NOT* overlap other partitions; and must be marked as the only active partition. The 'manual' command describes all the fdisk commands in detail. Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 06 0 1 1 - 202 239 63 [ 63: 3069297 ] DOS > 32MB 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Enter 'help' for information fdisk: 1> help help Command help list manual Show entire OpenBSD man page for fdisk reinit Re-initialize loaded MBR (to defaults) setpid Set the identifier of a given table entry disk Edit current drive stats edit Edit given table entry flag Flag given table entry as bootable update Update machine code in loaded MBR select Select extended partition table entry MBR print Print loaded MBR partition table write Write loaded MBR to disk exit Exit edit of current MBR, without saving changes quit Quit edit of current MBR, saving current changes abort Abort program without saving current changes fdisk: 1> |
| fdisk: 1> e 1 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Partition id ('0' to disable) [0 - FF]: [0] (? for help) a6 Do you wish to edit in CHS mode? [n] y BIOS Starting cylinder [0 - 2585]: [0] 203 BIOS Starting head [0 - 239]: [0] Enter BIOS Starting sector [1 - 63]: [0] 1 BIOS Ending cylinder [0 - 2585]: [0] 2585 BIOS Ending head [0 - 239]: [0] 239 BIOS Ending sector [1 - 63]: [0] 63 fdisk:*1> p Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 06 0 1 1 - 202 239 63 [ 63: 3069297 ] DOS > 32MB 1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> p m Disk: wd0 geometry: 2586/240/63 [19092 Megabytes] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 06 0 1 1 - 202 239 63 [ 63: 1499M] DOS > 32MB 1: A6 203 0 1 - 2585 239 63 [ 3069360: 17593M] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0M] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0M] unused fdisk:*1> |
| fdisk:*1> f 1 Partition 1 marked active. fdisk:*1> p Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 06 0 1 1 - 202 239 63 [ 63: 3069297 ] DOS > 32MB *1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> 至此,我们就可以保存我们的修改了。 fdisk:*1> w Writing MBR at offset 0. wd0: no disk label fdisk: 1> q |
| Here is the partition information you chose: Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 06 0 1 1 - 202 239 63 [ 63: 3069297 ] DOS > 32MB 1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 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. disklabel: no disk label WARNING: Disk wd0 has no label. You will be creating a new one. # using MBR partition 1: type A6 off 3069360 (0x2ed5b0) size 36030960 (0x225c9f0) Treating sectors 3069360-39100320 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. > |
| 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 150.1MB in 20 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) /dev/rwd0d: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors 120.1MB in 16 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) /dev/rwd0e: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors 80.2MB in 11 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) /dev/rwd0g: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors 2048.0MB in 261 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) /dev/rwd0h: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors 4096.0MB in 521 cyl groups (16 c/g, 7.88MB/g, 1920 i/g) /dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Thu Oct 10 21: 50:36 2 002) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Thu Oct 10 21:50:36 2002) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Thu Oct 10 21:50:36 2002) /dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Th u Oct 10 21:50:36 2002) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Th u Oct 10 21:50:36 2002) |
| Enter system hostname (short form, e.g. 'foo'): puffy |
| Configure the network? [yes]Enter Available interfaces are: fxp0. Which one do you wish to initialize? (or 'done') [fxp0] Enter Symbolic (host) name for fxp0? [puffy] Enter The default media for fxp0 is media: Ethernet autoselect (100baseTX full-duplex) Do you want to change the default media? [no] Enter IP address for fxp0? (or 'dhcp') 199.185.137.55 Netmask? [255.255.255.0] Enter Done - no available interfaces found. DNS domain name? (e.g. 'bar.com') [my.domain] example.com DNS nameserver? (IP address or 'none') [none] 199.185.137.1 Use the nameserver now? [yes]Enter Default route? (IP address, 'dhcp' or 'none') 199.185.137.128 add net default: gateway 199.185.137.128 Edit hosts with ed? [no] Enter Do you want to do any manual network configuration? [no] Enter |
| Configure the network? [yes]Enter Available interfaces are: fxp0. Which one do you wish to initialize? (or 'done') [fxp0]Enter Symbolic (host) name for fxp0? [puffy]Enter The default media for fxp0 is media: Ethernet autoselect (100baseTX full-duplex) Do you want to change the default media? [no]Enter IP address for fxp0? (or 'dhcp') dhcp Issuing hostname-associated DHCP request for fxp0. Internet Software Consortium DHCP Client 2.0pl5-OpenBSD Listening on BPF/fxp0/00:08:c7:77:b4:6b Sending on BPF/fxp0/00:08:c7:77:b4:6b Sending on Socket/fallback/fallback-net DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1 DHCPOFFER from 199.185.137.128 DHCPREQUEST on fxp0 to 255.255.255.255 port 67 DHCPACK from 199.185.137.128 New Network Number: 199.185.137.0 New Broadcast Address: 199.185.137.255 bound to 199.185.137.55 -- renewal in 43200 seconds. Done - no available interfaces found. DNS domain name? (e.g. 'bar.com') [example.org]Enter DNS nameserver? (IP address or 'none') [199.185.137.1]Enter Use the nameserver now? [yes]Enter Default route? (IP address, 'dhcp' or 'none') [199.185.137.128]Enter add net default: gateway 199.185.137.128 Edit hosts with ed? [no]Enter Do you want to do any manual network configuration? [no]Enter |
| Password for root account? (will not echo) pAssWOrd Password for root account? (again) pAssWOrd |
| You will now specify the location and names of the install sets you want
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 installation 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? c Available CD-ROMs are: cd0. |
| Available CD-ROMs are: cd0. Which one contains the install media? (or 'done') [cd0] Enter Pathname to the sets? (or 'done') [3.5/i386] Enter |
| 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 [ ] bsd.rd [X] base35.tgz [X] etc35.tgz [X] misc35.tgz [X] comp35.tgz [X] man35.tgz [X] game35.tgz [ ] xbase35.tgz [ ] xshare35.tgz [ ] xfont35.tgz [ ] xserv35.tgz File Name? (or 'done') [bsd.rd] all 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 [X] base35.tgz [X] etc35.tgz [X] misc35.tgz [X] comp35.tgz [X] man35.tgz [X] game35.tgz [X] xbase35.tgz [X] xshare35.tgz [X] xfont35.tgz [X] xserv35.tgz |
| File Name? (or 'done') [done] Enter Ready to install sets? [yes] Enter Getting bsd ... 100% |**************************************************| 4735 KB 00:03 Getting bsd.rd ... 100% |**************************************************| 4275 KB 00:02 Getting base35.tgz ... 100% |**************************************************| 30267 KB 00:21 Getting etc35.tgz ... 100% |**************************************************| 1545 KB 00:01 Getting misc35.tgz ... 100% |**************************************************| 1909 KB 00:01 Getting comp35.tgz ... 100% |**************************************************| 17074 KB 00:13 Getting man35.tgz ... 100% |**************************************************| 6139 KB 00:04 Getting game35.tgz ... 100% |**************************************************| 2534 KB 00:01 Getting xbase35.tgz ... 100% |**************************************************| 10940 KB 00:06 Getting xshare35.tgz ... 100% |**************************************************| 1656 KB 00:02 Getting xfont35.tgz ... 100% |**************************************************| 31160 KB 00:21 Getting xserv35.tgz ... 100% |**************************************************| 15228 KB 00:11 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') |
| Do you wish sshd(8) to be started by default? [yes] y |
| Do you expect to run the X Window System? [yes] y |
| Saving configuration files......done. Generating initial host.random file ......done. What timezone are you in? ('?' for list) [US/Pacific] ? 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) [US/Pacific] US What sub-timezone of 'US' are you in? ('?' for list) ? Alaska Central Hawaii Mountain Samoa Aleutian East-Indiana Indiana-Starke Pacific Arizona Eastern Michigan Pacific-New Select a sub-timezone of 'US' ('?' for list): Eastern Setting local timezone to 'US/Eastern'...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 room for 12 filesystem blocks at 0x16f Will load 7 blocks of size 8192 each. Using disk geometry of 63 sectors and 240 heads. 0: 9 @(203 150 55) (3078864-3078872) 1: 63 @(203 151 1) (3078873-3078935) 2: 24 @(203 152 1) (3078936-3078959) 3: 16 @(203 8 47) (3069910-3069925) /mnt/boot: 4 entries total using MBR partition 1: type 166 (0xa6) offset 3069360 (0x2ed5b0) ...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 operating system has halted. Please press any key to reboot. |
| # dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1 |
| c:\openbsd.pbr="OpenBSD" |
| If you wish to ensure that OpenBSD runs better on your machines, please
do us a favor (after you have your mail system configured!) and type something like: # dmesg | mail -s "Sony VAIO 505R laptop, apm works OK" dmesg@openbsd.org so that we can see what kinds of configurations people are running. As shown, including a bit of information about your machine in the subject or the body can help us even further. We will use this information to improve device driver support in future releases. (Please do this using the supplied GENERIC kernel, not for a custom compiled kernel, unless you're unable to boot the GENERIC kernel). The device driver information we get from this helps us fix existing drivers. Thank you! |
| $ dmesg | mail your-account@yourmail.dom |