本文介绍了PXE 使用我的 kickstart 文件的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to deploy an easier way to configure my computers.

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

I'm using an Ubuntu Server as DHCP and tftp server to manage PXE installations.

我在 ubuntu netbootubuntu PXE 安装服务器

一切都很好,直到我未来安装良好的计算机上的菜单.

Everything is fine until my menu on my futur well installed computer.

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

It tries to connect to ubuntu mirrors.. It's a huge problem because it doesn't have internet connection !

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

I've mount an image of Ubuntu Trusty on my Ubuntu Server (thank to Apache) and my link is available.

这是我的代码

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 服务器上 (http://ip.local.server/ubuntu-trusty).

When I make my decision to select "Install new computer" it seems working but finally the installer installs network tools (configure ip v4, searched dhcp, configured ip v6) and fail when try to connect to Ubuntu mirror. But I don't want it to connect to mirrors because files are already downloaded on my Ubuntu Server (http://ip.local.server/ubuntu-trusty).

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

It didn't seems to understand that my ks.cfg is here (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 文件是直接从 system-config-kickstart 生成的.

This ks.cfg file was generated directly from system-config-kickstart.

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

I've set a static ip on my ks.cfg and with a tcpdump on my server I can see requests with this ip. This means my ks.cfg file is read but I still don't know why it's searching to access mirrors on the web instead of searching on my server.

有没有人知道这个镜像研究使我的 PXE 安装失败?

Does anyone have an idea of this mirror researches that fail my PXE installation?

先谢谢你.

推荐答案

首先我问你是否开启了你的 HTTP 服务器?在您的情况下,ks.cfg 文件将通过来自

First let me ask if you have turned your HTTP server on? in your case the ks.cfg file is going to be retrieved by an http transfer from

http://ip.local.server/ks.cfg

接下来对于 ks 文件中的镜像参数,您必须添加类似

Next for the mirror parameters in your ks file you have to add something like

(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

您还可以在追加"行添加镜像设置,如

you could also add mirror settings at the "append" line like

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

这篇关于PXE 使用我的 kickstart 文件的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 09:26