23,121
社区成员
发帖
与我相关
我的任务
分享
使用tftpd-hpa、 apache2 、isc-dhcp-server搭建pxe安装环境,默认文件路径没有修改;/srv/tftp和/var/www/html
可以找到22.04系统并安装,但是找不到自动配置文件,在下图中等待后进入手动配置
以下是相关配置文件
grub.cfg
default=autoinstall
timeout=0
timeout_style=menu
menuentry "Focal Live Installer - automated" --id=autoinstall {
echo "Loading Kernel..."
linux /vmlinuz ip=dhcp url=http://192.168.10.10/ubuntu-22.04-live-server-amd64.iso autoinstall ds=nocloud-net\;s=http://192.168.10.10/ ---
echo "Loading Ram Disk..."
initrd /initrd
}
user-data
#cloud-config
autoinstall:
version: 1
apt:
primary:
- arches: [default]
uri: http://mirrors.aliyun.com/ubuntu
user-data:
timezone: Asia/Shanghai
disable_root: false
chpasswd:
list: |
root:
identity:
hostname: test
password:
username: test
keyboard: {layout: us, variant: ''}
locale: en_US.UTF-8
ssh:
install-server: true
storage:
grub:
reorder_uefi: False
config:
- {ptable: gpt, path: /dev/sda, wipe: superblock-recursive, preserve: false, name: '',
grub_device: false, type: disk, id: disk-sda}
- {device: disk-sda, size: 536870912, wipe: superblock, flag: boot, number: 1,
preserve: false, grub_device: true, type: partition, id: partition-0}
- {fstype: fat32, volume: partition-0, preserve: false, type: format, id: format-0}
- {device: disk-sda, size: -1, wipe: superblock, flag: '', number: 2,
preserve: false, type: partition, id: partition-1}
- {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-1}
- {device: format-1, path: /, type: mount, id: mount-1}
- {device: format-0, path: /boot/efi, type: mount, id: mount-0}