2012年6月12日 星期二

安裝 Debian 的特殊方法 - 網路開機(netboot)篇

一、首先要設定 BOOTP 與 TFTP 伺服器:(使用套件 - openbsd-inetd, bootp, tftpd)
  • /etc/inetd.conf (inetd相關設定檔) 
確認以下服務已被正確設定:

#:BOOT: TFTP service is provided primarily for booting.  Most sites
#       run this only on machines acting as "boot servers."
bootps          dgram   udp     wait    root    /usr/sbin/bootpd        bootpd -i -t 120
tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd          /usr/sbin/in.tftpd /srv/tftp

* 注意:本實作的 tftp 的根目錄設在 /srv/tftp

  • /etc/bootptab (bootpd相關設定檔)
ready4install:  hd=/srv/tftp:bf=pxelinux.0:ip=192.168.11.99:sm=255.255.255.0:sa=192.168.11.100:ha=0800274C6254

*注意1:黃色部份順依實際網*注意1:路配置而定,上為示例。
*注意2:hd 似不能省略,若省略 Client 端會試圖載入 /pxelinux.0,而不是在 /srv/tftp 底下的 pxelinux.0

伺服器設定完畢,需要重新啟始 openbsd-inetd。

/etc/init.d/openbsd-inetd restart


二、準備開機檔:
自 Official netinst images for the "stable" release 下載 netboot.tar.gz 然後解開到 /srv/tftp 底下。


實作20120613的特殊經驗:

1. 用 VirtualBox(v4.1.16) 來做實驗注意事項及問題:
  (1) 當使用內部網路機制時,在進階的設定中,介面卡類型要用 PCnet-FAST III (Am79C973)才能啟用 PXE (Preboot Execution Environment) Client 的功能。
  (2) 「僅限主機」介面卡操作始終有問題,未解。