啟動 Ubuntu Server 10.04 安裝(DHCP 失敗)

啟動 Ubuntu Server 10.04 安裝(DHCP 失敗)

我正在嘗試使用 anaconda kickstart 自動執行 Ubuntu 10.04 LTS 的網路安裝,除了初始 DHCP 自動配置之外,一切似乎都在運行。安裝程式嘗試透過 DHCP 設定安裝,但第一次嘗試失敗。這讓我看到一個提示,我可以在其中重試 DHCP,而且它似乎總是在第二次嘗試時起作用。我的問題是,如果我必須重試 DHCP,這並不是真正自動化的。我可以在 kickstart 檔案中添加一些內容,以便它會自動重試或更好,但不會在第一次失敗嗎?謝謝。

啟動:

# System language
lang en_US
# Language modules to install
langsupport en_US
# System keyboard
keyboard us
# System mouse
mouse
# System timezone
timezone America/New_York
# Root password
rootpw --iscrypted $1$unrsWyF2$B0W.k2h1roBSSFmUDsW0r/
# Initial user
user --disabled
# Reboot after installation
reboot
# Use text mode install
text
# Install OS instead of upgrade
install
# Use Web installation
url --url=http://10.16.0.1/cobbler/ks_mirror/ubuntu-10.04-x86_64/
# System bootloader configuration
bootloader --location=mbr 
# Clear the Master Boot Record
zerombr yes
# Partition clearing information
clearpart --all --initlabel 
# Disk partitioning information
part swap --size 512 
part / --fstype ext3 --size 1 --grow 
# System authorization infomation
auth  --useshadow  --enablemd5 
%include /tmp/pre_install_ubuntu_network_config

# Always install the server kernel.
preseed --owner d-i     base-installer/kernel/override-image    string linux-server
# Install the Ubuntu Server seed.
preseed --owner tasksel tasksel/force-tasks     string server

# Firewall configuration
firewall --disabled 
# Do not configure the X Window System
skipx

%pre

wget "http://10.16.0.1/cblr/svc/op/trig/mode/pre/system/Test-D" -O /dev/null
# Network information
# Start pre_install_network_config generated code

# Start of code to match cobbler system interfaces to physical interfaces by their mac addresses
#  Start eth0
# Configuring eth0 (00:1A:64:36:B1:C8)
if ip -o link show | grep -i 00:1A:64:36:B1:C8
then
  IFNAME=$(ip -o link show | grep -i 00:1A:64:36:B1:C8 | cut -d" " -f2 | tr -d :)
  echo "network --device=$IFNAME --bootproto=dhcp" >> /tmp/pre_install_ubuntu_network_config
fi
# End pre_install_network_config generated code


%packages
openssh-server

答案1

包括這樣一行:

network --bootproto=dhcp --device=eth0

在 %pre 部分之前。

相關內容