无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 6618|回复: 21
打印 上一主题 下一主题

[求助] 求个tinypxe下ubuntu用kickstart的写法

  [复制链接]
跳转到指定楼层
1#
发表于 2020-12-22 17:26:37 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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/vmlinuz  initrd=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=initrd  quiet 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

2#
 楼主| 发表于 2020-12-22 20:01:11 | 显示全部楼层
hkkitlee 发表于 2020-12-22 19:18
redhat系列才用kickstart
Debian系列是用preseed的,所以ubuntu要用preseed方式才可以

看教程也有折腾kickstart成功的,算了,我还是安心搞preseed吧

不过我pxe本地http启ubuntug还没启好呢,大佬可能指导一下
回复

使用道具 举报

3#
 楼主| 发表于 2020-12-22 22:03:26 | 显示全部楼层
mayi 发表于 2020-12-22 21:52
ubuntu各个版本不同,实现pxe的方法也不一样,不太好搞的18.04和以前的又不一样

求指导一下,18.4,20.4都行,主要是现在不得要领,烦

点评

Ubuntu官網直接有pxe詳細教學,細節都寫得清清楚楚 你的ubuntu參數錯誤, 當成live啟動但核心又不支持網絡載入live影像  详情 回复 发表于 2020-12-22 23:21
回复

使用道具 举报

4#
 楼主| 发表于 2020-12-23 10:30:36 | 显示全部楼层
本帖最后由 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在查找网络

点评

你到底是要網絡安裝ubuntu;還是網絡啟動個Live來用? 建議你從最基礎沒參數啟動;之後理解核心參數,再考慮需不需要加上去。 沒從你伺服下載就是你下達的命令核心不明白了  详情 回复 发表于 2020-12-23 13:38
回复

使用道具 举报

5#
 楼主| 发表于 2020-12-23 21:28:15 | 显示全部楼层
hkkitlee 发表于 2020-12-23 13:38
你到底是要網絡安裝ubuntu;還是網絡啟動個Live來用?

建議你從最基礎沒參數啟動;之後理解核心參數, ...

通过网络来安装,然后批量的布,所以才会要用ks之类的东西,
ks.cfg生效了,因为网络启动后,他没有要求我输什么机器名之类的, 现在是到了ens33那报错
我从主机上ping那个pxe的客户机,一会在,一会不在,切换了网络,他通了,也是在报错,不知道是不是要搞preseed那个文件再来指定个啥,有点乱
回复

使用道具 举报

6#
 楼主| 发表于 2021-1-21 22:22:56 | 显示全部楼层
guyouhua 发表于 2021-1-12 14:21
创建相应的NFS服务器,把它的光盘映射到NFS目录中取名字为ubuntu确保能被调用得到。也就是nfsroot=${dhcp-s ...

自动安装 用preseed,可否给个例子呢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-5-13 12:48

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表