求个tinypxe下ubuntu用kickstart的写法
本帖最后由 a22124497 于 2020-12-22 17:29 编辑水平在菜,用了论坛里一个兄弟的那个,
rhel的可以用
:rhel7
initrd http://${next-server}/rhel/7/images/pxeboot/initrd.img
chain http://${next-server}/rhel/7/images/pxeboot/vmlinuzinitrd=initrd.img ip=dhcp inst.repo=http://${next-server}/rhel/7 ksdevice=link inst.vnc inst.ks=http://${next-server}/rhel/ks7.cfg
boot
但是怎么弄,ubuntu的都不行,用nfs都不行,
###ubuntu-installer-nfs
set nfs_path /nfs/Ubuntu/casper
kernel nfs://${next-server}${nfs_path}/vmlinuz || read void
initrd nfs://${next-server}${nfs_path}/initrd || read void
root=/dev/nfs boot=casper netboot=nfs nfsroot=${next-server}:/nfs/ubuntu initrd=initrdquiet splash --
boot
各种err,ubuntu的ks文件,我是在乌邦图下完成的,也是各种问题,没有centos的顺,求大佬们支招一下
18还是20都行,现在只求能启了,哎
现在用的http,他直接报
unable to find a medium containing a live file system
###ubuntu-installer-http
set http_path /ubuntu/Ubuntu/casper
#set imgargs vmlinuz initrd=initrd boot=casper ip=dhcp auto=true url=http://${next-server}/ubuntu/ubuntu-20.04.1-desktop-amd64.iso
kernel http://${next-server}${http_path}/vmlinuz || read void
initrd http://${next-server}${http_path}/initrd || read void
imgargs vmlinuz initrd=initrd boot=casper ip=dhcp auto=true url=http://${next-server}/ubuntu/Ubuntu autoinstall ds=nocloud-net;ks=http://${next-server}/ubuntu/ks.cfg
boot
redhat系列才用kickstart
Debian系列是用preseed的,所以ubuntu要用preseed方式才可以 hkkitlee 发表于 2020-12-22 19:18
redhat系列才用kickstart
Debian系列是用preseed的,所以ubuntu要用preseed方式才可以
看教程也有折腾kickstart成功的,算了,我还是安心搞preseed吧
不过我pxe本地http启ubuntug还没启好呢,大佬可能指导一下 ubuntu各个版本不同,实现pxe的方法也不一样,不太好搞的18.04和以前的又不一样 mayi 发表于 2020-12-22 21:52
ubuntu各个版本不同,实现pxe的方法也不一样,不太好搞的18.04和以前的又不一样
求指导一下,18.4,20.4都行,主要是现在不得要领,烦 mayi 发表于 2020-12-22 21:52
ubuntu各个版本不同,实现pxe的方法也不一样,不太好搞的18.04和以前的又不一样
沒什麼各版本不同,都是一樣 a22124497 发表于 2020-12-22 22:03
求指导一下,18.4,20.4都行,主要是现在不得要领,烦
Ubuntu官網直接有pxe詳細教學,細節都寫得清清楚楚
你的ubuntu參數錯誤, 當成live啟動但核心又不支持網絡載入live影像 本帖最后由 a22124497 于 2020-12-23 10:39 编辑
hkkitlee 发表于 2020-12-22 23:21
Ubuntu官網直接有pxe詳細教學,細節都寫得清清楚楚
你的ubuntu參數錯誤, 當成live啟動但核心又不支持 ...
https://wiki.ubuntu.com/UEFI/PXE ... 83662672.1608616061
按这个说法,我是要用netboot的那个镜像里的那俩文件linux,initrd.gz来做启动核心
怎么弄,都没有从我想要指定的lan内的服务器来下文件,再试试吧
ubuntu-installer-http
kernel http://${next-server}/ubuntu/linux
initrd http://${next-server}/ubuntu/initrd.gz
imgargs linux initrd=initrd.gz ks=http://${next-server}/ubuntu/ks.cfg live-installer/net-image=http://${next-server}/ubuntu/Ubuntu/casper/filesystem.squashfs
现在ks.cfg,应该是生效了,不过好像网络有点问题,一直是ens33在查找网络
a22124497 发表于 2020-12-23 10:30
https://wiki.ubuntu.com/UEFI/PXE ... 83662672.1608616061
你到底是要網絡安裝ubuntu;還是網絡啟動個Live來用?
建議你從最基礎沒參數啟動;之後理解核心參數,再考慮需不需要加上去。
沒從你伺服下載就是你下達的命令核心不明白了 hkkitlee 发表于 2020-12-23 13:38
你到底是要網絡安裝ubuntu;還是網絡啟動個Live來用?
建議你從最基礎沒參數啟動;之後理解核心參數, ...
通过网络来安装,然后批量的布,所以才会要用ks之类的东西,
ks.cfg生效了,因为网络启动后,他没有要求我输什么机器名之类的, 现在是到了ens33那报错
我从主机上ping那个pxe的客户机,一会在,一会不在,切换了网络,他通了,也是在报错,不知道是不是要搞preseed那个文件再来指定个啥,有点乱 这个我弄成功过。
通过网络也安装成功过。 你得先找到tinypxe的官方帮助文档
本帖最后由 guyouhua 于 2021-1-12 14:15 编辑
先得添加变量:
set boot-url http://${next-server}
isset ${ip} || dhcp
本帖最后由 guyouhua 于 2021-1-12 14:16 编辑
添加相应的启动子菜单:
:start
item ubuntu Ubuntu 20.04 Lts desktop x64_Net! 本帖最后由 guyouhua 于 2021-1-12 14:17 编辑
添加相应的引导项:
:ubuntu
kernel ${boot-url}/casper/vmlinuz root=/dev/nfs boot=casper netboot=nfs nfsroot=${dhcp-server}:/ubuntu ip=dhcp ro
initrd ${boot-url}/casper/initrd
boot
本帖最后由 guyouhua 于 2021-1-12 14:24 编辑
在PxeServer所在的目录下netboot\casper的子目录中添加相应的调用文件! vmlinuz initrd光盘映像的casper目录里就有。 本帖最后由 guyouhua 于 2021-1-12 14:22 编辑
创建相应的NFS服务器,把它的光盘映射到NFS目录中取名字为ubuntu确保能被调用得到。也就是nfsroot=${dhcp-server}:/ubuntu有效! guyouhua 发表于 2021-1-12 14:21
创建相应的NFS服务器,把它的光盘映射到NFS目录中取名字为ubuntu确保能被调用得到。也就是nfsroot=${dhcp-s ...
自动安装 用preseed,可否给个例子呢 已搞定20.4.3 ipxe网络启动自动安装,使用的cloud-init做配置文件 2012=2012 发表于 2023-3-30 20:13
已搞定20.4.3 ipxe网络启动自动安装,使用的cloud-init做配置文件
能分享一下吗 2012=2012 发表于 2023-3-30 20:13
已搞定20.4.3 ipxe网络启动自动安装,使用的cloud-init做配置文件
额?你的20.04.3 是server版的吧 感谢大佬分享哈
页:
[1]