国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統(tǒng) > FreeBSD > 正文

FreeBSD如何跑diskless?

2024-07-26 00:29:23
字體:
供稿:網(wǎng)友
diskless 可以讓 FreeBSD client PC 不需要硬碟就可以透過網(wǎng)路跑 FreeBSD。 
以下是兩個(gè)成功的范例: 

======== 范例一 ========= 
From: client.bbs@csie.nctu.edu.tw (client) 
Newsgroups: tw.bbs.comp.386bsd 
Subject: Re: 如何使 diskless 的 pc 也能跑 freebsd 
Date: 27 May 1995 05:44:34 GMT 

(1) /etc/bootptab 建立diskless pc 的資料 
(2) /etc/servives 之bootpd 及 tftpd 是否打開 
(3) /etc/inetd.conf 之tftpd 是否打開 
(4) bootpd 放入 /etc/rc 差不多最后面 
    (若由inetd 來叫 ,時(shí)常搶不過 ka9q 的 bootpd) 
(5) 建立diskless pc 的 root file system. ex:/home/diskless1 
(6) 建立diskless pc 的swap file system. 
    建目錄: ex:/home/swapfs 
    建swap file: 若diskless pc 的 ip: 140.115.10.222 
    則 touch /home/swapfs/swap.140.115.10.222 
(7) 把 freebsd 整個(gè)系統(tǒng) 拷貝至 /home/diskless1 
(8) export /home/diskless1 及 home/swapfs 給 diskless pc 
(9) 建立 /tftpboot/cfg.140.115.10.222 file 
    rootfs server:/home/diskless1 
    swapfs server:/home/swapfs 
    swapsize 32000 
(10)至/usr/src/sys/i386/boot/netboot make *.com 或 *.rom 
    make install 
    至/usr/mdec 取你要的 檔案,開 diskless pc 

大致上,是如此! 自己再try ! 
======================== 

======== 范例二 ======== 
From: upleong@csie.nctu.edu.tw (Bills) 
Newsgroups: tw.bbs.comp.386bsd 
Subject: 設(shè)定diskless pc step by step 
Date: 16 Oct 1996 03:17:58 GMT 
  

給大家分享一下. 實(shí)在太好玩了。 

假設(shè)有兩臺(tái)機(jī)器, 
serverxy 是提供 diskless開機(jī)之server, ip: 140.113.141.191 
clientab 為 diskless之機(jī)器 ip: 140.113.141.204 
以下范例是在同一domain之下測試成功的(注: 好像是在不同domain也可以) 

所有要修改或增加的檔案: 
a. /etc/inetd.conf 
b. /etc/services 
c. /tftpboot/cfg.xxx.yyy.zzz.www 
d. /etc/bootptab 
e. /swapfs/swap.xxx.yyy.zzz.www 
f. /sys/i386/conf/boot/netboot/*.com 
g. /rootfs/clientab ;這里是整個(gè)系統(tǒng) 
h. /etc/exports 

Server端的設(shè)定: 
(一)修改 /etc/inetd.conf 加入tftpd, 修改/etc/services 增加tftpd, 
bootpd的功能, 其中diskless的機(jī)器之root file system在 /rootfs/clientab。 
/etc/inetd.conf: 
tftp dgram udp wait nobody /usr/libexec/tftpd / 
tftpd -l /tftpboot /rootfs/clientab 
/etc/services: 
tftp 69/tcp #Trivial File Transfer 
tftp 69/udp #Trivial File Transfer 
bootps 67/tcp dhcps #Bootstrap PRotocol Server 
bootps 67/udp dhcps #Bootstrap Protocol Server 
bootpc 68/tcp dhcpc #Bootstrap Protocol Client 
bootpc 68/udp dhcpc #Bootstrap Protocol Client 

(三)以后啟動(dòng) bootpd, 可以加入/etc/rc.local之中, 其設(shè)定檔為/etc/bootptab。 
/etc/rc.local: 
/usr/libexec/bootpd -s /etc/bootptab 

(二)修改 bootptab, 把該改的該一下就好了, 詳細(xì)之參數(shù)可參考handbook或man。 
/etc/bootptab: 
.default:/ 
:td=/tftpboot:hd=/clientab:bf=kernel:/ ;bf可設(shè)定boot file name 
:sm=255.255.255.0:/ 
:hn:/ 
:ds=140.113.1.1, 140.113.17.5:/ ;改為你的domain name server 
:ip=140.113.141.204:/ ;diskless client之 IP 
:gw=140.113.141.254:/ 
:dn=dorm10.nctu.edu.tw:/ ;改一下domain name 
:vm=rfc1048: 
clientab:ht=ether:ha=0000b46b0369:tc=.default: 
;ht為client的網(wǎng)路種類 
;ha為網(wǎng)路卡的hardware address 

(四)設(shè)定 tftpboot的 config file, 這是開機(jī)時(shí) client從 server得到資訊的地方。 
檔案名皆為 cfg.[client ip addr]。 eg. cfg.140.113.141.191 
/tftpboot/cfg.140.113.141.204: ;檔案名記得要改... 
rootfs 140.113.141.191:/rootfs/clientab ;rootfs放在server的 
; /rootfs/clientab目錄下 
swapfs 140.113.141.191:/swapfs ;swap file放在/swapfs下 
swapsize 20000 ;swap size in KB 
hostname clientab.dorm13.nctu.edu.tw ;client的host name 
ip 140.113.141.204 ;client的ip address 
kernel kernel ;kernel叫什么, 因?yàn)橐婚_機(jī)就 
; 是NFS mount rootfs, kernel 
;要有NFS support 才能動(dòng) 

(五)建一個(gè) swap file的檔案, 改名為 swap.[client IP address] 
> touch /swapfs/swap.140.113.141.204 

(六)把 client的file systems(/ /sbin /bin /root /etc ...)放在前面定義的地方 
(/rootfs/clientab)。Client可以和 server分享一部份的file systems, 如/usr, 
/usr/local等。但 rootfs等則不可以share。 
這里要怎樣拷過去比較好呢? 我只想到把一些最基本的程式拷到rootfs, 等開 
機(jī)后再 mount freebsd.csie:/some/where/SNAP; sh upgrade.sh。 

(七)修改/etc/exports, 把client的file system及swap都打開給client。 
root partition記得要maproot, 否則會(huì)沒效。 
/etc/exports: 
/rootfs/clientab /swapfs -maproot=root:wheel clientab.dorm13.nctu.edu.tw 

(八)啟動(dòng)tftp和bootpd。 
>kill -1 `cat /var/run/inetd.pid`; 
>/usr/libexec/bootpd -s /etc/bootptab; 

Client端的設(shè)定: 
因?yàn)槭莇iskless的關(guān)系, 設(shè)定都跑到 server去了, 所以只要準(zhǔn)備開機(jī)片就好了。剩下 
就是開機(jī)時(shí)打一下參數(shù)等。 
(一)建立網(wǎng)路開機(jī)所需的檔案。 
cd /usr/src/sys/i386/boot/netboot 
修改Makefile中網(wǎng)路卡的參數(shù), 如 NE_BASE=0x300等。 
make all install 
cd /usr/mdec; 把 *.com copy 至一DOS formatted的磁片上。 

(二)以DOS 開機(jī) 
看是那一張網(wǎng)路卡, 執(zhí)行其中一個(gè) .com的檔案后, 它會(huì)自動(dòng)去找bootpd的server. 
不過并不容易找到, 解決方法是手動(dòng)給它填些參數(shù)。 
按ESC后會(huì)進(jìn)到menu的command line, help 可以得到 help :P 
>server 140.113.141.191 
>ip 140.113.141.204 
>netmask 255.255.255.0 
>gateway 140.113.141.254 
>kernel kernel ;指定kernel name (eg. kernel.GENERIC) 
>flags c s ;等于boot: -c -s 
>autoboot 
順利的話會(huì)看到loading kernel...等訊息, 可以開機(jī)進(jìn)入single就成功了, 其他 
設(shè)定都是diskless PC的事情了。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 寿阳县| 芦溪县| 宕昌县| 遵义县| 睢宁县| 西青区| 桑植县| 集贤县| 家居| 江源县| 仁寿县| 阳原县| 蚌埠市| 宣恩县| 云林县| 新营市| 邛崃市| 新乡市| 观塘区| 土默特左旗| 兴业县| 叙永县| 疏勒县| 白山市| 安顺市| 浪卡子县| 宁都县| 永仁县| 黄石市| 湄潭县| 文昌市| 扶绥县| 绥阳县| 宁阳县| 新巴尔虎右旗| 平原县| 炎陵县| 海淀区| 化州市| 平定县| 凌源市|