You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
1.9 KiB
94 lines
1.9 KiB
# Network booting
|
|
|
|
https://documentation.ubuntu.com/server/how-to/installation/how-to-netboot-the-server-installer-on-amd64/
|
|
|
|
https://chatgpt.com/c/6765b743-ca68-800c-9a63-dd5768d20b4c
|
|
|
|
TODO: create squashfs image from live system
|
|
|
|
`apt install dnsmasq`
|
|
|
|
`vim /etc/dnsmasq.conf`
|
|
|
|
`mkdir -p /srv/tftp`
|
|
|
|
```
|
|
interface=<your interface>,lo
|
|
bind-interfaces
|
|
dhcp-range=<your interface>,192.168.0.100,192.168.0.200
|
|
dhcp-boot=pxelinux.0
|
|
dhcp-match=set:efi-x86_64,option:client-arch,7
|
|
dhcp-boot=tag:efi-x86_64,grubx64.efi
|
|
enable-tftp
|
|
tftp-root=/srv/tftp
|
|
```
|
|
|
|
~~`apt install debootstrap chroot squashfs-tools`~~
|
|
|
|
`cp /boot/vmlinuz /srv/tftp/vmlinuz`
|
|
|
|
`cp /boot/initrd.img /srv/tftp/initrd`
|
|
|
|
`apt download grub-efi-amd64-signed`
|
|
|
|
`dpkg-deb --fsys-tarfile grub-efi*deb | tar x ./usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed -O > /srv/tftp/grubx64.efi`
|
|
|
|
`apt download grub-common`
|
|
|
|
`dpkg-deb --fsys-tarfile grub-common*deb | tar x ./usr/share/grub/unicode.pf2 -O > /srv/tftp/unicode.pf2`
|
|
|
|
`mkdir -p /srv/tftp/grub`
|
|
|
|
`vim /srv/tftp/grub/grub.cfg`
|
|
|
|
```
|
|
set default="0"
|
|
#set timeout=-1
|
|
|
|
if loadfont unicode ; then
|
|
set gfxmode=auto
|
|
set locale_dir=$prefix/locale
|
|
set lang=en_US
|
|
fi
|
|
terminal_output gfxterm
|
|
|
|
set menu_color_normal=white/black
|
|
set menu_color_highlight=black/light-gray
|
|
if background_color 44,0,30; then
|
|
clear
|
|
fi
|
|
|
|
function gfxmode {
|
|
set gfxpayload="${1}"
|
|
if [ "${1}" = "keep" ]; then
|
|
set vt_handoff=vt.handoff=7
|
|
else
|
|
set vt_handoff=
|
|
fi
|
|
}
|
|
|
|
set linux_gfx_mode=keep
|
|
|
|
export linux_gfx_mode
|
|
|
|
menuentry 'FiksOS' {
|
|
gfxmode $linux_gfx_mode
|
|
linux /vmlinux $vt_handoff quiet splash
|
|
initrd /initrd
|
|
}
|
|
```
|
|
|
|
|
|
`vim /etc/netplan/10-static.yaml`
|
|
|
|
```yaml
|
|
network:
|
|
version: 2
|
|
ethernets:
|
|
enp0s8:
|
|
dhcp4: false
|
|
dhcp6: false
|
|
addresses:
|
|
- 192.168.11.1/24
|
|
```
|