Linux PXE使用我的kickstart文件的一部分

Linux PXE使用我的kickstart文件的一部分,linux,ubuntu,Linux,Ubuntu,我正在尝试部署一种更简单的方式来配置我的计算机 我使用Ubuntu服务器作为DHCP和tftp服务器来管理PXE安装 我找到了很多帮助 一切都很好,直到我的菜单在我的未来安装良好的电脑 它试图连接到ubuntu镜像。。这是一个巨大的问题,因为它没有互联网连接 我已经在我的Ubuntu服务器上安装了一个Ubuntu Trusty的映像(感谢Apache),我的链接可用 这是我的密码 DEFAULT vesamenu.c32 timeout 100 display boot.msg menu bac

我正在尝试部署一种更简单的方式来配置我的计算机

我使用Ubuntu服务器作为DHCP和tftp服务器来管理PXE安装

我找到了很多帮助

一切都很好,直到我的菜单在我的未来安装良好的电脑

它试图连接到ubuntu镜像。。这是一个巨大的问题,因为它没有互联网连接

我已经在我的Ubuntu服务器上安装了一个Ubuntu Trusty的映像(感谢Apache),我的链接可用

这是我的密码

DEFAULT vesamenu.c32
timeout 100
display boot.msg
menu background splash.png
menu title Welcome to my awesome installer

label Install new computer
  kernel ubuntu-installer/amd64/linux
  append ks=http://ip.local.server/ks.cfg vga=normal initird=ubuntu-installer/amd64/initrd.gz
当我决定选择“安装新计算机”时,它似乎起作用了,但最终安装程序安装了网络工具(配置ip v4、搜索dhcp、配置ip v6),并在尝试连接到Ubuntu镜像时失败。但我不想让它连接到镜像,因为文件已经在我的Ubuntu服务器上下载了()

它似乎不明白我的
ks.cfg
在这里(
http://ip.local.server/ks.cfg

ks.cfg

#Generated by Kickstart Configurator
#platform=x86

#Install OS instead of upgrade
install
#Use Web installation
url --url http://192.168.3.1/ubuntu-trusty


#### Mirror settings ###

d-i mirror/country          string fr
d-i mirror/http/hostname    string http://192.168.3.1
d-i mirror/http/directory   string /ubuntu-trusty
d-i mirror/suite            string trusty
#d-i mirror/country          string fr

#System language
lang fr_FR
#Language modules to install
langsupport fr_FR
#System keyboard
keyboard fr
#System mouse
mouse
#System timezone
timezone Europe/Paris
#Root password
rootpw --disabled
#Initial user
user myuser --fullname "MyUser" --iscrypted --password $1$tDwZTgoh$a25ayXUItWDWxdQlUg0Tk1
#Reboot after installation
reboot
#Use text mode install
text
#Use interactive kickstart installation method
interactive

#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 4000 
part / --fstype ext4 --size 1 --grow 
#System authorization infomation
auth  --useshadow  --enablemd5 
#Network information
network --bootproto=static --ip=192.168.3.222 --netmask=255.255.255.0 --nameserver=192.168.3.1 --gateway=192.168.3.1
#Firewall configuration
firewall --disabled
#X Window System configuration information
#xconfig --depth=32 --resolution=2048x1536 --defaultdesktop=GNOME --startxonboot
ks.cfg
文件直接从
系统配置kickstart
生成

编辑:

我已经在我的
ks.cfg
上设置了一个静态ip,在我的服务器上使用
tcpdump
我可以看到使用此ip的请求。这意味着我的
ks.cfg
文件已被读取,但我仍然不知道它为什么要在web上搜索以访问镜像,而不是在我的服务器上搜索

有人知道我的PXE安装失败的镜像吗


先谢谢你

首先让我问一下,您是否已打开HTTP服务器?在您的例子中,ks.cfg文件将通过http传输从

http://ip.local.server/ks.cfg
接下来,对于ks文件中的镜像参数,您必须添加如下内容

(Ubuntu)
#### Mirror settings.
preseed         mirror/country string manual
preseed         mirror/http/hostname string thinkmate5.ma.utexas.edu
preseed         mirror/http/directory string /mirror/precise/ubuntu
preseed         apt-setup/security_host string thinkmate5.ma.utexas.edu
preseed         apt-setup/security_path string /mirror/precise/ubuntu

(Debian)
#### Mirror settings.

d-i mirror/country          string fr
d-i mirror/http/hostname    string http://ip.local.server
d-i mirror/http/directory   string /ubuntu
d-i mirror/suite            string trusty
#d-i    mirror/http/proxy   string 
您还可以在“附加”行添加镜像设置,如

mirror/country=manual mirror/http/hostname=aaa.bbb.ccc.ddd mirror/http/directory=/directoryXX mirror/http/proxy=""

使用kickstart启动具有多个层,并且并非所有信息都从一个层发送到下一层

即使DHCP服务器已将ip和有关引导文件的信息发送到加载程序(通常是syslinux或pxelinux),但在引导时,此信息不会发送到操作系统。kickstart文件仅在系统引导和安装程序启动后读取(通常是anaconda)


我认为您需要在append行的某个地方传递ip=dhcp。在我的设置中,我在这一行还有keymap=dk lang=en_US来设置语言和键盘设置

我的HTTP服务器已打开。我可以通过浏览器访问我的
ks.cfg
文件。我在我的
ks.cfg
文件中添加了您的行,这与检查镜像的问题相同。我添加了一个关于静态ip的部分。我的
ks.cfg
文件已被读取,但仍在网络上搜索镜像。请在问题中添加ks中处理存储库参数的确切文本。我已添加ks文件。请使用正确格式查看我的答案