歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> PXE+KickStart 安裝Ubuntu 10.04

PXE+KickStart 安裝Ubuntu 10.04

日期:2017/2/28 16:34:33   编辑:Linux教程

名詞解釋
PXE
PXE(preboot execute environment)是由Intel公司開發的最新技術,工作於Client/Server的網絡模式,支持工作站通過網絡從遠端服務器下載映像,並由此支持來自網絡的操作系統的啟動過程,其啟動過程中,終端要求服務器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicast trivial file transfer protocol)協議下載一個啟動軟件包到本機內存中並執行,由這個啟動軟件包完成終端基本軟件設置,從而引導預先安裝在服務器中的終端操作系統。PXE可以引導多種操作系統,如:Windows 95/98/2000/xp/2003/vista/2008,linux等。
KickStart
KickStart是一種無人職守安裝方式。KickStart的工作原理是通過記錄典型的安裝過程中所需人工干預填寫的各種參數,並生成一個名為ks.cfg的文件;在其後的安裝過程中(不只局限於生成KickStart安裝文件的機器)當出現要求填寫參數的情況時,安裝程序會首先去查找KickStart生成的文件,當找到合適的參數時,就采用找到的參數,當沒有找到合適的參數時,才需要安裝者手工干預。

准備工作
1.安裝KICKSTART
star@Ubuntu:~$ sudo apt-get install system-config-kickstart
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
hwdata isoquery libxml++2.6-2 localechooser-data
The following NEW packages will be installed:
hwdata isoquery libxml++2.6-2 localechooser-data system-config-kickstart
0 upgraded, 5 newly installed, 0 to remove and 277 not upgraded.
Need to get 1,139kB of archives.
After this operation, 5,063kB of additional disk space will be used.
Do you want to continue [Y/n]?


1.1在 “應用程序\系統工具”中打開kickstart


設置好以後,保存配置文件為ks.cfg

注意: package selection 選項不能選擇,具體原因不詳(網上查詢有人說是BUG問題),這時可以直接修改ks.cfg文件添加要安裝的軟件包,在最後行添加%packages
如筆者的配置文件如下

Generated by Kickstart Configurator
#platform=x86

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone Asia/Chongqing
#Root password
rootpw --disabled
#Initial user
user star --fullname "star" --iscrypted --password $1$TELmpWrC$yPElivw5xnKjAGqxBi50T/
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://192.168.10.21/ubuntu
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part /boot --fstype ext4 --size 256
part swap --size 1024
part / --fstype ext4 --size 1 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled --ssh
#X Window System configuration information
xconfig --depth=24 --resolution=1024x768 --defaultdesktop=GNOME
%packages
@ubuntu-desktop

紅色字體部隊為手動添加的

Copyright © Linux教程網 All Rights Reserved