Ubuntu服务器14.04安装的PXE设置会导致问题

时间:2015-04-24 12:29:37

标签: linux ubuntu ubuntu-14.04 ubuntu-server ipxe

我知道StackOverflow上已经提出了这个问题,但我对提供的答案不满意。

PXE use part of my kickstart file

我的设置:

  • 设置了PXE(TFTP + Apache)的Ubuntu Desktop 14.04 LTS(x86)。

  • 已安装的Ubuntu服务器映像14.04.2并使用ks.cfgpreseed.cfg

  • 创建了完全无人参与的安装

配置ks.cfg:

#Generated by Kickstart Configurator
preseed/url=http://10.10.2.199/ubuntu/preseed.cfg
#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/Kolkata
#Root password
rootpw --disabled
#Initial user
user uadmin --fullname "uadmin" --iscrypted --password $1$SoMF.HMn$AIG0ecMNwJ4SU2D1/CRg6/
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://10.10.2.199/ubuntu
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
clearpart --all

#part swap --size 4098
#ignoredisk --only-use=sda
#clearpart --all --linux --drives=sda

#part / --fstype ext4 --size 1 --grow
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx

%packages
# Since I don't install recommended it leaves out some things that should
# probably be installed like openssl and python 2.7
ca-certificates
openssl
python
wget
tcpd
# End all the recommended packages that are still useful
openssh-server
#open-vm-tools --no-install-recommends
curl
screen
vim
#copy contents to /etc/apt/sources.list
echo " #


# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ precise main restricted

# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.4 LTS _Precise Pangolin_ - Release amd64 (20140204)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty universe
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main "
> /etc/apt/sources.list

preseed.cfg配置:

Options to set on the command line
#preseed/url=http://10.10.2.199/ubuntu/preseed.cfg
#onsole-setup/ask_detect=false
#console-setup/layoutcode=us
#netcfg/get_hostname=dh5
#netcfg/get_domain=wb.com
#initrd=/install/initrd.gz quiet --

#d-i ubuntu-installer/locale string en_US
#d-i console-setup/ask_detect boolean false
#d-i console-setup/layoutcode string us
#d-i netcfg/get_hostname string dh5
#d-i netcfg/get_domain string wb.com

#d-i netcfg/choose_interface select auto
#d-i netcfg/wireless_wep string

#d-i base-installer/kernel/override-image string linux-server
#d-i clock-setup/utc-auto boolean true
#d-i clock-setup/utc boolean true
#d-i time/zone string US/Pacific
#d-i clock-setup/ntp boolean true

#d-i mirror/country string US
#d-i mirror/http/proxy string
#d-i pkgsel/install-language-support boolean false
#tasksel tasksel/first multiselect standard, ubuntu-server

#d-i partman-auto/method string regular
#d-i partman-auto/purge_lvm_from_device boolean true
#d-i partman-lvm/confirm boolean true
#d-i partman-auto/choose_recipe select atomic
#d-i partman/confirm_write_new_label boolean true
#d-i partman/choose_partition select finish
#d-i partman/confirm boolean true


#d-i partman/confirm_write_new_label boolean true
#d-i partman/choose_partition select \
#    Finish partitioning and write changes to disk
#d-i partman/confirm boolean true
#d-i passwd/user-fullname string uadmin User
#d-i passwd/username string uadmin
#d-i passwd/user-password password password
#d-i passwd/user-password-again password password
#d-i partman/unmount_active boolean true
#d-i preseed/early_command string umount /media

#d-i grub-installer/only_debian boolean true
#d-i grub-installer/with_other_os boolean true
#d-i finish-install/reboot_in_progress note

# No pop-up for partitioning confirmation
#d-i partman/confirm_write_new_label boolean true
#d-i partman/choose_partition select finish
#d-i partman/confirm boolean true
#d-i partman/confirm_nooverwrite boolean true

#d-i apt-setup/security_host string 10.10.2.199
#d-i apt-setup/security_path string /ubuntu
d-i pkgsel/update-policy select none
#d-i apt-setup/use_mirror boolean false
#
#d-i     apt-setup/security    boolean false
#d-i     apt-setup/security-updates      boolean false
#d-i     apt-setup/use_mirror boolean false
#d-i apt-setup/services-select multiselect

#base-config apt-setup/security-updates boolean false
#d-i    apt-setup/security-updates boolean false
#d-i base-installer/kernel/image string linux-image-3.16.0-30-generic
#d-i    pkgsel/upgrade  select node
#d-i     pkgsel/update-policy    select none
#d-i     pkgsel/updatedb boolean false
#d-i apt-setup/security-updates boolean false
#d-i apt-setup/services-select multiselect none

d-i pkgsel/update-policy        select none

d-i preseed/early_command string umount /media

d-i partman/unmount_active boolean true

d-i partman-auto/expert_recipe string boot-root :: \
    20 50 100 ext4 $primary{ } $bootable{ } method{ format } format{ } \
    use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . \
    500 10000 1000000000 ext4 method{ format } format{ } \
    use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . \
    64 512 300% linux-swap method{ swap } format{ } .

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

# Resolves installation error
d-i live-installer/net-image string http://10.10.2.199/ubuntu/install/filesystem.squashfs

一切正常,没有任何问题完全无人值守安装。

但是在安装系统步骤中,它开始从Internet进行安全更新,即使我在preseed.cfg文件中提到没有自动更新d-i pkgsel/update-policy select none

并且在linux-image-3.14.0.34通用步骤失败了,因为我的设置中由于缺少Internet而没有从http://security.ubuntu.com获取该包。

如何解决该错误并继续操作而不会使此错误完全无人参与安装。

注意:我已尝试过的preseed.cfgks.cfg文件中注释的选项,但没有任何效果。

提前非常感谢你。

1 个答案:

答案 0 :(得分:1)

d-i pkgsel/update-policy select none

在安装的pkgsel阶段工作,现在尝试取消注释

d-i  apt-setup/security-updates      boolean false

另请注意您的preseed.cfg包含

d-i pkgsel/update-policy select none

不止一次

相关问题