精華區beta FreeBSD 關於我們 聯絡資訊
如果各位使用OpenBSD的前輩或使用者 對這份文件有任何指正,除了在板上回應外 (不過暫時僅限於:光碟安裝的部份, 因為其它的安裝方式並不在這份文件中...) 也請用有效的電子郵件位址寄一份到我的信箱來, [email protected] 因為各位在bbs上的電子郵件欄許多是無效的 (還有些會spam m1.is.net.tw的電子郵件位址, 這讓我很困擾,因為我並不是用is.net.tw的線路發信, 雖然我用的是is.net.tw的電子郵件帳號...) 這份文件是一個計劃中的一個部份的開始, 很厚顏的請求更多OpenBSD的使用者參與協助, 如果您願意協助編寫或驗證這個計劃所參生的OpenBSD版文件, 請寫信告訴我 (記得要用有效的電子郵件位址) 以 上 謹謝                  ghost 02'11/20 以20GB硬碟為例: (一)硬碟分割 放入 OpenBSD 3.2 的可開機安裝的光碟後,會開始開機程序: rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i 選擇 i 進行第一次安裝 Welcome to the OpenBSD/i386 3.2 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] 使用一般鍵盤時直接按 [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 輸入 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. 系統建議你要將硬碟切出至少五個分割區,連 swap 一共六個 Available disks are: wd0. Which one is the root disk? (or done) [wd0] [Enter]  如果系統只偵測到一個硬碟,輸入 [Enter] 直接進入分割程序 Do you want to use *all* of wd0 for OpenBSD? [no] yes 輸入 yes 將整個硬碟都配給 OpenBSD 使用 Your 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. 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 63 (0x3f) size 40017852 (0x2629f6c) Treating sectors 63-40017915 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. > p 輸入 p 檢視所有在 OpenBSD 切割區裡的分割區資料 device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: ST320011A bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 40031712 free sectors: 40017852 rpm: 3600 * 轉速多少不用管,系統並不是以這個預設值在驅動硬碟的 16 partitions: # size offset fstype [fsize bsize cpg] a: 40017852  63 unused 0 0 c: 40031712 0 unused 0 0 * c: 是整個硬碟的代號,不能修改  將系統上所顯示的 size 數值除以二即是硬碟的 MB 數 > d a 刪除現有的 a 分割區 > a b 新增 b 分割區給 swap 用 offset: [63] [Enter] size: [40017852] 256M 這個數字一般都是輸入實體記憶體兩倍的值 Rounding to nearest cylinder: 524097 FS type: [4.2BSD] swap swap 一般都在 root(/) 分割區之後,為了提升效能, 可先切割 swap 分割區在最前端的地方 > a a 新增 a 分割區給 root (/) 用 offset: [524160] [Enter] 以下的分割區數字都是最適值 size: [39493755] 150M 一般 root (/) 分割區的最小與最適值為 40MB 與 150 MB Rounding to nearest cylinder: 307440 FS type: [4.2BSD] [Enter] mount point: [none] / root (/) 分割區裡有核心與 root 帳號的資料夾 * 在486電腦上,這個分割區的結束磁區,  不能超過硬碟實體磁區504MB的地方;  在586電腦上,這個分割區的結束磁區,  不能超過硬碟實體磁區8GB的地方,切記! http://www.tw.openbsd.org/faq/faq14.html#LargeDrive > a d 新增 d 分割區給 /var 用 offset: [831600] [Enter] size: [39186315] 80M 一般 /var 分割區的最小與最適值為 25MB 與 80 MB 不過如果這台機器上有 Web Server, Mail Server, Proxy Server, 那這個分割區就要視實際的需要再增加其大小! Rounding to nearest cylinder: 164304 FS type: [4.2BSD] [Enter] mount point: [none] /var Mail Server 裡的帳號所尚未讀取的信件, 與 Proxy Server 的快取,各種軟體的記錄檔,都設在 /var 裡 > a e 新增 e 分割區給 /tmp 用 offset: [995904] [Enter] size: [39022011] 120M 一般 /tmp 分割區的最小與最適值為 50MB 與 120 MB Rounding to nearest cylinder: 245952 FS type: [4.2BSD] [Enter] mount point: [none] /tmp /tmp 是程式編譯時的工作區,極少程式在編譯時會用超過 120MB 的空間 (當然你可能會遇到) > a f 新增 f 分割區給 /usr 用 offset: [1241856] [Enter] size: [38776059] 2G 通常 /usr 分割區的最小與最適值為 200MB 與 2GB Rounding to nearest cylinder: 4194288 FS type: [4.2BSD] [Enter] mount point: [none] /usr 所有的程式(包括X11R6),Ports Tree 與 CVS Tree, 都在這個資料夾裡,如果只跑伺服相關的軟體,2GB 是很足夠的數量, 在最小值200MB 的情況下,就無法安裝 Ports Tree 與 CVS Tree > a g 新增 g 分割區給 /home 用 offset: [5436144] [Enter] size: [34581771] [Enter] 剩下的可以都切給 /home ,所以直接按 [Enter] FS type: [4.2BSD] [Enter] mount point: [none] /home 一般而言,所有使用者(root 除外)存放資料(包含郵件)的資料夾, 與 Ftp Server 的資料夾,都在 /home 裡 > p 檢視分割完的分割區資訊 16 partitions: # size offset fstype [fsize bsize cpg] a: 307440 524160 4.2BSD 1024 8192 16 # / b: 524097 63 swap c: 40031712 0 unused 0 0 d: 164304 831600 4.2BSD 1024 8192 16 # /var e: 245952 995904 4.2BSD 1024 8192 16 # /tmp f: 4194288 1241856 4.2BSD 1024 8192 16 # /usr g: 34581771 5436144 4.2BSD 1024 8192 16 # /home > q 儲存並離開 Write new label?: [y] [Enter] The root filesystem will be mounted on wd0a. wd0b will be used for swap space. Mount point for wd0d (size=25600k), none or done? [/var] [Enter] Mount point for wd0e (size=51200k), none or done? [/tmp] [Enter] Mount point for wd0f (size=2097144k), none or done? [/usr] [Enter] Mount point for wd0g (size=18966528k), none or done? [/home] [Enter] Mount point for wd0d (size=25600k), none or done? [/var] done 輸入 done 確定 Done - no available disks found. You have configured the following partitions and mount points: wd0a / wd0d /var wd0e /tmp wd0f /usr wd0g /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 輸入 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: 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/rwd0e: 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/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: 34581770 sectors in 34388 cylinders of 16 tracks, 63 sectors 16885.6MB in 2145 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/wd0d on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Th u Oct 10 21:50:36 2002) /dev/wd0e on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Thu Oct 10 21:50:36 2002) /dev/wd0f on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Th u Oct 10 21:50:36 2002) /dev/wd0g on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Thu Oct 10 21:50:36 2002) (二)主機名稱與網路設定 Enter system hostname (short form, e.g. 'foo'): openbsd 輸入自訂的主機名稱,它會與你稍後輸入的 Domain Name 成為完整的位址, 被儲存在 /etc/myname 的檔案裡,如果你沒有輸入 Domain Name, 系統預設值是'my.domain',就會成為'hostname.my.domain' 修改主機名稱時, /etc/hosts 裡的Domain Name也要改, 否則會出現 sendmail 的 MTA 錯誤訊息 Configure the network? [y] [Enter] If any interface will be configured by DHCP, you should not enter information that will be supplied via DHCP, e.g. the DNS domain name. Enter DNS domain name (e.g. 'bar.com'): [my.domain] mirage.idv.tw Available interfaces are: fxp0. Which one do you wish to initialize? (or done) [fxp0] [Enter] 如果你只有一張網卡,按 [Enter] 繼續,如果你有兩張網卡, 就選擇你要先設定的那張,不過建議安裝過程中只需設定主要 的網卡,待安裝完成之後再設定其它的網卡 IP address for fxp0 (or 'dhcp')? 211.23.42.102 輸入你所配給該網卡的 ip Symbolic (host) name? [openbsd] [Enter] Netmask? [255.255.255.0] 255.255.255.248 輸入你的網路遮罩值 第一張網卡的 ip 與 遮罩設定值存於 hostname.*0 修改網卡 ip 時, /etc/hosts 裡的ip也要改, 否則會出現 sendmail 的 MTA 錯誤訊息  The default media for fxp0 is media: Ethernet autoselect (100baseTX full-duplex) Do you want to change the default media? [n] [Enter] OpenBSD 3.2會自行偵測最適合網卡的組態, 因此一般只需直接鍵入 [Enter] 繼續即可 Done - no available interfaces found. Enter IP address of default route: [none] 211.23.42.97 輸入該網段的閘道 ip Enter IP address of primary nameserver: [none] 168.95.1.1 輸入服務該網域的 DNS Server ip 儲存這個設定的檔案是 /etc/mygate Would you like to use the nameserver now? [y] [Enter] 使用該 DNS Server 的解析服務 Do you want to do more, manual, network configuration? [n] [Enter] Password for root account (will not echo): 設定密碼 Password (again): 再次輸入密碼 結束設定,進入下一個安裝程序 (三)選擇安裝媒體 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 you want to use? (m, c, f, etc.) c 輸入 c 選擇使用 CDROM 安裝 Available CD-ROMs are: cd0. Which one contains the install media? (or done) [cd0] [Enter] CD-ROM partition to mount? (normally 'c') [c] [Enter] Two CDE-ROM filesystem types are currently supported bu this progam: cd9660 ISO-9660 ffs Berkeley Fast Filesystem Which filesystem typre? [cd9660] [Enter] Enter the pathname where the sets are stored (or '?') [3.2/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] base32.tgz [X] etc32.tgz [X] misc32.tgz [X] comp32.tgz [X] man32.tgz [X] game32.tgz [ ] xbase32.tgz [ ] xshare32.tgz [ ] xfont32.tgz [ ] xserv32.tgz [X] bsd File Name? (or 'done') [xbase32.tgz] all 輸入 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] base32.tgz [X] etc32.tgz [X] misc32.tgz [X] comp32.tgz [X] man32.tgz [X] game32.tgz [X] xbase32.tgz [X] xshare32.tgz [X] xfont32.tgz [X] xserv32.tgz [X] bsd File Name? (or 'done') [done] [Enter] Ready to install sets? [y] [Enter] 鍵 [Enter] 開始下載 OpenBSD 3.2 檔案 Getting base32.tgz ... 100% |**************************************************| 23869 KB 00:15 Getting etc32.tgz ... 100% |**************************************************| 1447 KB 00:01 Getting misc32.tgz ... 100% |**************************************************| 1666 KB 00:01 Getting comp32.tgz ... 100% |**************************************************| 16798 KB 00:12 Getting man32.tgz ... 100% |**************************************************| 5428 KB 00:04 Getting game32.tgz ... 100% |**************************************************| 2702 KB 00:01 Getting bsd ... 100% |**************************************************| 4409 KB 00:01 Getting xbase32.tgz ... 100% |**************************************************| 8831 KB 00:04 Getting xshare32.tgz ... 100% |**************************************************| 1531 KB 00:02 Getting xfont32.tgz ... 100% |**************************************************| 30656 KB 00:14 Getting xserv32.tgz ... 100% |**************************************************| 14797 KB 00:05 Extract more sets? [n] * 如果你的電腦之記憶體少於20MB,要先啟用 swap 分割區: ************************************ Extract more sets? [n] ! 輸入 [!] 暫停,進入文字介面模式 Type 'exit' to return to install. # /mnt/sbin/swapon /dev/wd0b 先掛載 swap 分割區 total: 262144k bytes allocated = 0k used, 262144k available # exit 回到安裝程式 ************************************ Extract more sets? [n] Enter 鍵 [Entet] 結束下載並開始安裝 Do you expect to run the X Window System? [y] [Enter] 如果你選擇 y,你系統裡的 /etc/sysctl.conf 將會出現一行 machdep.allowaperture=1或 machdep.allowaperture=2 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] Asia/Taipei 輸入 Asia/Taipei ,不過顯示的時間好像不是正確的 You have selected timezone 'Asia/Taipei'. 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 255 heads. 0: 9 @(33 55 55) (533664-533672) 1: 63 @(33 56 1) (533673-533735) 2: 24 @(33 57 1) (533736-533759) 3: 16 @(32 168 47) (524710-524725) /mnt/boot: 4 entries total using MBR partition 1: 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. # reboot 輸入 reboot 重新開機,完成安裝程序! syncing disks... done ps:姑且暫時到此當做安裝完成... -- *請加入抵制使用RedHat Linux 8.0的行動 http://www.slat.org/event/redhat-flag --- 得 即 高 歌 失 即 休 任 多 悲 愁 也 悠 悠 青 松 影 裡 朦 朧 睡 燕 飛 無 樓 月 已 鉤       風起雲湧II-幽靈 > -------------------------------------------------------------------------- < 發信人: ghost <[email protected]>, 看板: FreeBSD 標 題: =?big5?B?pmI=?= OpenBSD =?big5?B?pFewtQ==?= OpenBSD 發信站: =?big5?B?9lqzo69Tp0+m5qxGsM8=?= (Wed Jun 5 13:02:38 2002) 轉信站: Ptt!news.ntu!freebsd.ntu!news.cis.nctu!netnews.csie.nctu!news.csie.ncu 1.純分享,非文件 2.跟GIGA的研發部工程師問來後,自己搞半天搞出來的 (不知道現在再做一次會不會成功) 3.mkisofs 是一個套件,到 man page 網頁上去查就可以知道在哪下載 4. ex: source directory=/home/openbsd/ directory=/home/openbsd/3.2/i386 # cd /home # mkdir -p OpenBSD/3.2 拷貝所有來源檔案到該去的目錄裡 然後 # mkisofs -r -l -L -b 3.2/i386/cdrom32.fs -c boot.catalog -o OpenBSD32-i386.iso OpenBSD/ ps:也可以加進其它的東西,像是   directory=/home/openbsd/3.2/tools   directory=/home/openbsd/patchs/common   directory=/home/openbsd/patchs/i386