-
-
Save neofob/60b8200ccab5de0b3143f09edd3c053b to your computer and use it in GitHub Desktop.
Revisions
-
rikka0w0 revised this gist
Jan 12, 2020 . 1 changed file with 3 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,40 +30,28 @@ apt install tftpd-hpa (nothing, they are identical) ``` # Setup NFS server ``` sudo apt install nfs-kernel-server echo "/srv/nfs 192.168.0.0/16(async,no_root_squash,no_subtree_check,ro)" >> /etc/exports systemctl restart nfs-kernel-server.service ``` # Mount ISO image ``` sudo mkdir /mnt/ubuntu_18_desktop_iso sudo mount -o loop ubuntu-18.04.3-desktop-amd64.iso ln -s /mnt/ubuntu_18_desktop_iso /srv/nfs/ ``` # Add a Ubuntu LiveCD entry ``` mkdir /srv/tftp/casper cp /srv/nfs/casper/initrd /srv/tftp/casper cp /srv/nfs/casper/vmlinuz /srv/tftp/casper ``` Append to `/srv/tftp/ubuntu-installer/amd64/boot-screens` ``` label live -
rikka0w0 revised this gist
Jan 6, 2020 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -88,6 +88,9 @@ systemctl restart nfs-kernel-server systemctl restart tftpd-hpa.service ``` # Delete these files to save some space `rm -rf boot.img.gz netboot.tar.gz xen` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration -
rikka0w0 revised this gist
Jan 6, 2020 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -66,18 +66,21 @@ cp /srv/nfs/casper/vmlinuz /srv/tftp/casper # 9. Add LiveCD entry Append to `/srv/tftp/ubuntu-installer/amd64/boot-screens` ``` label live menu label Ubuntu Desktop 18.04 Live menu default kernel casper/vmlinuz append nfsroot=192.168.x.x:/srv/nfs netboot=nfs boot=live boot=casper initrd=/casper/initrd systemd.mask=tmp.mount -- ``` Replace `default install ` with `default live`, delete `menu default` under `label install`. This only controls which menu item is selected by default. # 10. Add timeout to the boot menu In `/srv/tftp/pxelinux.cfg/default` (NOT `/srv/tftp/ubuntu-installer/amd64/pxelinux.cfg/default`), replace `timeout 0` with: ``` timeout 50 ONTIMEOUT live ``` This controls the timeout action. # Restart NFS / TFTP server: ``` -
rikka0w0 revised this gist
Jan 6, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,8 @@ cp /srv/nfs/casper/initrd /srv/tftp/casper cp /srv/nfs/casper/vmlinuz /srv/tftp/casper ``` # 9. Add LiveCD entry Append to `/srv/tftp/ubuntu-installer/amd64/boot-screens` ``` label ubuntudesktop menu label Ubuntu Desktop 18.04 Live -
rikka0w0 revised this gist
Jan 6, 2020 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,6 +71,13 @@ label ubuntudesktop append nfsroot=192.168.x.x:/srv/nfs netboot=nfs boot=live boot=casper initrd=/casper/initrd systemd.mask=tmp.mount -- ``` # 10. Add timeout to the boot menu In `/srv/tftp/pxelinux.cfg/default` (NOT `/srv/tftp/ubuntu-installer/amd64/pxelinux.cfg/default`), replace `timeout 0` with: ``` timeout 50 ONTIMEOUT live ``` # Restart NFS / TFTP server: ``` systemctl restart nfs-kernel-server -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,14 +63,20 @@ cp /srv/nfs/casper/initrd /srv/tftp/casper cp /srv/nfs/casper/vmlinuz /srv/tftp/casper ``` # 9. Append to /srv/tftp/ubuntu-installer/amd64/boot-screens ``` label ubuntudesktop menu label Ubuntu Desktop 18.04 Live kernel casper/vmlinuz append nfsroot=192.168.x.x:/srv/nfs netboot=nfs boot=live boot=casper initrd=/casper/initrd systemd.mask=tmp.mount -- ``` # Restart NFS / TFTP server: ``` systemctl restart nfs-kernel-server systemctl restart tftpd-hpa.service ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,7 +53,14 @@ systemctl restart nfs-kernel-server.service ``` sudo mkdir /mnt/ubuntu_18_desktop_iso sudo mount -o loop ubuntu-18.04.3-desktop-amd64.iso ln -s /mnt/ubuntu_18_desktop_iso /srv/nfs/ ``` # 8. Prepare Live Boot files ``` mkdir /srv/tftp/casper cp /srv/nfs/casper/initrd /srv/tftp/casper cp /srv/nfs/casper/vmlinuz /srv/tftp/casper ``` # 8. Append to /srv/tftp/ubuntu-installer/amd64/boot-screens -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -61,12 +61,13 @@ ln -s /mnt/ubuntu_18_desktop_iso /srv/nfs label ubuntudesktop menu label Ubuntu Desktop 18.04 Live kernel casper/vmlinuz append nfsroot=192.168.x.x:/srv/nfs netboot=nfs boot=live boot=casper initrd=/casper/initrd systemd.mask=tmp.mount -- ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration 3. https://wiki.debian.org/PXEBootInstall 4. Another solution, https://forum.openwrt.org/t/solved-dhcp-config-pxe-boot-from-external-tftp-server/5880/2 5. Openwrt doc, https://openwrt.org/docs/guide-user/base-system/dhcp 6. Ubuntu Live PXE, http://c-nergy.be/blog/?p=13243 -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,6 +56,14 @@ sudo mount -o loop ubuntu-18.04.3-desktop-amd64.iso ln -s /mnt/ubuntu_18_desktop_iso /srv/nfs ``` # 8. Append to /srv/tftp/ubuntu-installer/amd64/boot-screens ``` label ubuntudesktop menu label Ubuntu Desktop 18.04 Live kernel casper/vmlinuz append nfsroot = 192.168.1.150:/var/www/html/desktop/bionic netboot=nfs ro file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz systemd.mask=tmp.mount -- ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -52,8 +52,8 @@ systemctl restart nfs-kernel-server.service # 7. Mount ISO image ``` sudo mkdir /mnt/ubuntu_18_desktop_iso sudo mount -o loop ubuntu-18.04.3-desktop-amd64.iso ln -s /mnt/ubuntu_18_desktop_iso /srv/nfs ``` Reference: -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -49,7 +49,12 @@ echo "/srv/nfs 192.168.0.0/16(async,no_root_squash,no_subtree_check,ro)" >> /etc systemctl restart nfs-kernel-server.service ``` # 7. Mount ISO image ``` sudo mkdir /mnt/ubuntu_18_desktop_iso sudo mount -o loop ubuntu-18.04.3-desktop-amd64.iso ln -s /mnt/ubuntu_18_desktop_iso ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ apt install tftpd-hpa (nothing, they are identical) ``` # 5. Download Ubuntu NetBoot ``` cd /srv/tftp @@ -42,6 +42,15 @@ ls boot.img.gz ldlinux.c32 mini.iso netboot.tar.gz pxelinux.0 pxelinux.cfg ubuntu-installer xen ``` # 6. Setup NFS server ``` sudo apt install nfs-kernel-server echo "/srv/nfs 192.168.0.0/16(async,no_root_squash,no_subtree_check,ro)" >> /etc/exports systemctl restart nfs-kernel-server.service ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration -
rikka0w0 revised this gist
Jan 4, 2020 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,18 @@ apt install tftpd-hpa # diff test /srv/tftp/test (nothing, they are identical) ``` # 5 Download Ubuntu NetBoot ``` cd /srv/tftp wget -r --no-parent --reject="index.html*" "http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/" mv archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/* . ls ``` ``` boot.img.gz ldlinux.c32 mini.iso netboot.tar.gz pxelinux.0 pxelinux.cfg ubuntu-installer xen ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ -
rikka0w0 revised this gist
Jan 3, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,4 +34,5 @@ Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration 3. https://wiki.debian.org/PXEBootInstall 4. Another solution, https://forum.openwrt.org/t/solved-dhcp-config-pxe-boot-from-external-tftp-server/5880/2 5. Openwrt doc, https://openwrt.org/docs/guide-user/base-system/dhcp -
rikka0w0 revised this gist
Jan 3, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,4 +33,5 @@ apt install tftpd-hpa Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration 3. https://wiki.debian.org/PXEBootInstall 4. Another solution:https://forum.openwrt.org/t/solved-dhcp-config-pxe-boot-from-external-tftp-server/5880/2 -
rikka0w0 revised this gist
Jan 3, 2020 . 1 changed file with 25 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,35 @@ In this configuration, DHCP will run on the OpenWrt Box, while the TFTP server ( # 1. Add to `/etc/config/dhcp` on OpenWrt Box ``` config boot linux option filename 'pxelinux.0' option serveraddress '192.168.?.?' option servername '?' ``` # 2. Restart DHCP server on OpenWrt Box `/etc/init.d/dnsmasq restart` # 3. Install TFTP server on another computer ``` apt install tftpd-hpa # vi /etc/default/tftpd-hpa # systemctl status tftpd-hpa # systemctl restart tftpd-hpa ``` # 4. Test TFTP server (Optional) ``` # cd /tmp # uname -a >/srv/tftp/test # tftp 192.168.0.2 tftp> get test tftp> quit # diff test /srv/tftp/test (nothing, they are identical) ``` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration 3. https://wiki.debian.org/PXEBootInstall -
rikka0w0 revised this gist
Jan 3, 2020 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,14 @@ In this configuration, DHCP will run on the OpenWrt Box, while the TFTP server (the one serves the boot files) runs on a different computer. # 1. Add to `/etc/config/dhcp` on OpenWrt Box ```config boot linux option filename 'pxelinux.0' option serveraddress '192.168.?.?' option servername '?' ``` # 2. Restart DHCP server `/etc/init.d/dnsmasq restart` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ -
rikka0w0 revised this gist
Jan 3, 2020 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,12 @@ # 1. Add to `/etc/config/dhcp` on OpenWrt Box `config boot linux option filename 'pxelinux.0' option serveraddress '192.168.?.?' option servername '?' ` # 2. `` and `/etc/init.d/dnsmasq restart` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/ 2. TFTP boot, https://openwrt.org/docs/guide-user/base-system/dhcp_configuration -
rikka0w0 created this gist
Jan 3, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 1. Add to `/etc/config/dhcp` on OpenWrt Box `config boot linux option filename 'pxelinux.0' option serveraddress '192.168.?.?' option servername '?' ` Reference: 1. https://stelfox.net/blog/2013/12/configuring-pxe-booting-on-openwrt/