From 6cf62fe24a94b1459f69a9931573f2dc5b6cce6f Mon Sep 17 00:00:00 2001 From: D4VID Date: Fri, 20 Dec 2024 22:15:07 +0000 Subject: [PATCH] Update 'README.md' --- README.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca2da2c..43a43b5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,93 @@ -# Netboot +# Network booting -Network booting \ No newline at end of file +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=,lo +bind-interfaces +dhcp-range=,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 +```