This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:it:pxe [2021/11/17 15:02] – [Ubuntu Autoinstall yaml] phil | public:it:pxe [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PXE ====== | ||
- | * https:// | ||
- | * https:// | ||
- | |||
- | |||
- | ===== CentOS/RHEL Kickstart ===== | ||
- | |||
- | Not finished, just notes. | ||
- | < | ||
- | :rhel_8.5 | ||
- | set rhel-ver 8.5 | ||
- | goto rhel_server_ks | ||
- | |||
- | : | ||
- | imgfree | ||
- | kernel ${main-url}/ | ||
- | initrd ${main-url}/ | ||
- | imgargs vmlinuz initrd=initrd.img ip=dhcp inst.repo=${main-url}/ | ||
- | boot || goto failed | ||
- | </ | ||
- | |||
- | / | ||
- | |||
- | ===== Autoinstall/ | ||
- | |||
- | * https:// | ||
- | * https:// | ||
- | * https:// | ||
- | * | ||
- | |||
- | |||
- | ==== Ubuntu Autoinstall yaml ==== | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * https:// | ||
- | * https:// | ||
- | * https:// | ||
- | * [[https:// | ||
- | * https:// | ||
- | * https:// | ||
- | ===== PXE ===== | ||
- | |||
- | === iPXE Autoinstall Ubuntu Server from ISO or NFS === | ||
- | |||
- | < | ||
- | : | ||
- | set release focal | ||
- | set type server | ||
- | goto ubuntu_server | ||
- | |||
- | : | ||
- | set release focal | ||
- | set type server | ||
- | goto ubuntu_server_nfs | ||
- | |||
- | : | ||
- | imgfree | ||
- | kernel ${boot-url}ubuntu/ | ||
- | initrd ${boot-url}ubuntu/ | ||
- | boot | ||
- | |||
- | : | ||
- | imgfree | ||
- | kernel ${boot-url}ubuntu/ | ||
- | initrd ${boot-url}ubuntu/ | ||
- | boot | ||
- | </ | ||
- | |||
- | Some environments will require '' | ||
- | |||
- | === iPXE Boot Ubuntu 20.04 Desktop ISO === | ||
- | < | ||
- | : | ||
- | imgfree | ||
- | kernel ${boot-url}nfs/ | ||
- | initrd ${boot-url}nfs/ | ||
- | imgargs vmlinuz initrd=initrd boot=casper ip=dhcp url=${boot-url}ubuntu/ | ||
- | boot | ||
- | </ | ||
- | |||
- | ==== Auto install 20.04 and greater using ubiquiti installer (autoinstall.yml) ==== | ||
- | ipxe menu item | ||
- | < | ||
- | : | ||
- | imgfree | ||
- | kernel ${boot-url}ubuntu/ | ||
- | initrd ${boot-url}ubuntu/ | ||
- | boot | ||
- | </ | ||
- | |||
- | File structure: | ||
- | < | ||
- | tftp$ find ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | ubuntu/ | ||
- | </ | ||
- | |||
- | meta-data | ||
- | < | ||
- | instance-id: | ||
- | </ | ||
- | |||
- | user-data aka autoinstall.yml | ||
- | < | ||
- | # | ||
- | autoinstall: | ||
- | apt: | ||
- | geoip: true | ||
- | preserve_sources_list: | ||
- | primary: | ||
- | - arches: [amd64] | ||
- | uri: http:// | ||
- | identity: {hostname: autoinstall-00, | ||
- | keyboard: {layout: us, variant: '' | ||
- | locale: en_US.UTF-8 | ||
- | network: | ||
- | network: | ||
- | ethernets: | ||
- | eth0: | ||
- | critical: true | ||
- | dhcp-identifier: | ||
- | dhcp4: true | ||
- | version: 2 | ||
- | ssh: | ||
- | allow-pw: true | ||
- | authorized-keys: | ||
- | - " | ||
- | install-server: | ||
- | storage: | ||
- | grub: | ||
- | reorder_uefi: | ||
- | config: | ||
- | - {ptable: gpt, wwn: ' | ||
- | path: /dev/sda, wipe: superblock, preserve: false, name: '', | ||
- | type: disk, id: disk-sda} | ||
- | - {device: disk-sda, size: 536870912, wipe: superblock, flag: boot, number: 1, | ||
- | preserve: false, grub_device: | ||
- | - {fstype: fat32, volume: partition-0, | ||
- | - {device: disk-sda, size: 1073741824, wipe: superblock, flag: '', | ||
- | preserve: false, grub_device: | ||
- | - {fstype: ext4, volume: partition-1, | ||
- | - {device: disk-sda, size: 238444085248, | ||
- | preserve: false, grub_device: | ||
- | - name: ubuntu-vg | ||
- | devices: [partition-2] | ||
- | preserve: false | ||
- | type: lvm_volgroup | ||
- | id: lvm_volgroup-0 | ||
- | - {name: ubuntu-lv, volgroup: lvm_volgroup-0, | ||
- | type: lvm_partition, | ||
- | - {fstype: ext4, volume: lvm_partition-0, | ||
- | - {device: format-2, path: /, type: mount, id: mount-2} | ||
- | - {device: format-1, path: /boot, type: mount, id: mount-1} | ||
- | - {device: format-0, path: /boot/efi, type: mount, id: mount-0} | ||
- | version: 1 | ||
- | user-data: | ||
- | timezone: America/ | ||
- | disable_root: | ||
- | late-commands: | ||
- | - echo 'phil ALL=(ALL) NOPASSWD: | ||
- | - sed -ie ' | ||
- | - curtin in-target --target /target update-grub2 | ||
- | </ | ||
- | |||
- | ==== autoinstall.yml config bugs ==== | ||
- | list of bugs | ||
- | |||
- | |||
- | ====== FreeDOS w/ Payload ====== | ||
- | * https:// | ||
- | * https:// | ||
- | < | ||
- | #!ipxe | ||
- | |||
- | :freedos | ||
- | : | ||
- | sanhook ${boot-url}firmware/ | ||
- | sanboot --no-describe --drive 0x00 ${boot-url}firmware/ | ||
- | boot || goto failed | ||
- | |||
- | |||
- | :failed | ||
- | echo Booting failed, dropping to shell | ||
- | goto shell | ||
- | </ | ||
- | |||
- | < | ||
- | truncate payload.img --size 32MB | ||
- | sfdisk payload.img << EOF | ||
- | 63,,b | ||
- | EOF | ||
- | </ | ||
- | |||
- | < | ||
- | losetup --partscan /dev/loop20 ./ | ||
- | mkfs.vfat / | ||
- | </ | ||
- | |||
- | < | ||
- | mount / | ||
- | cp < | ||
- | umount /mnt | ||
- | losetup -d /dev/loop20 | ||
- | </ | ||
- | |||
- | ====== WinPE ======= | ||
- | |||
- | * [[https:// | ||
- | * [[https:// | ||
- | |||
- | |||
- | - [[https:// | ||
- | - [[https:// | ||
- | - [[https:// | ||
- | - Copy WinPE into temp directory: | ||
- | - Open " | ||
- | - < | ||
- | mkdir C: | ||
- | copype x86 C: | ||
- | copype amd64 C: | ||
- | </ | ||
- | - Inject virtio drivers into winpe | ||
- | - Open an elevated " | ||
- | - [[https:// | ||
- | - Inject drivers AMD64< | ||
- | dism / | ||
- | dism / | ||
- | dism / | ||
- | </ | ||
- | - Inject drivers x86< | ||
- | dism / | ||
- | dism / | ||
- | dism / | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||