notes:linux_automatic_network_install
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| notes:linux_automatic_network_install [2024/05/06 07:23] – [Directory structure] Nikita Kipriyanov | notes:linux_automatic_network_install [2024/05/15 09:53] (current) – [Bootloader configuration] Nikita Kipriyanov | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| ===== Boot server configuration ===== | ===== Boot server configuration ===== | ||
| - | We can use ISC DHCPD + BIND + tftpd-hpa, or dnsmasq. | + | We can use ISC DHCPD + BIND + tftpd-hpa, or dnsmasq |
| - | ==== Directory structure | + | ==== PXE bootloader |
| - | All (more or less) dynamic data is t be stored in ''/ | + | All (more or less) dynamic data is to be stored in ''/ |
| + | |||
| + | <tabbox GRUB> | ||
| + | |||
| + | GRUB manual is available here: [[https:// | ||
| + | |||
| + | < | ||
| + | srv/ | ||
| + | ┠─ dhcp-hostsfile.cfg | ||
| + | ┗━ tftp/ | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ┠─ gentoo | ||
| + | ┖─ initramfs.igz | ||
| + | </ | ||
| + | |||
| + | The most logic lies within ''/ | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | The rest items are symlinks to these files: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | This approach is new to me, but it can support both " | ||
| + | |||
| + | To generate the contents of that directory (including GRUB images themselves) a Gentoo system was used, where GRUB was emerged with '' | ||
| + | |||
| + | < | ||
| + | grub-mknetdir --net-directory=/ | ||
| + | grub-mknetdir --net-directory=/ | ||
| + | </ | ||
| + | |||
| + | Then the ''/ | ||
| + | |||
| + | <tabbox PXELinux> | ||
| < | < | ||
| Line 24: | Line 95: | ||
| ┠─ dhcp-hostsfile.cfg | ┠─ dhcp-hostsfile.cfg | ||
| ┗━ tftp/ | ┗━ tftp/ | ||
| - | | ||
| - | | ||
| | | ||
| | | ||
| | | ||
| | | ||
| + | | ||
| | | ||
| | | ||
| - | | ||
| | | ||
| | | ||
| Line 40: | Line 109: | ||
| | | ||
| | | ||
| - | | ||
| - | | ||
| | | ||
| | | ||
| | | ||
| | | ||
| - | | + | |
| | | ||
| | | ||
| Line 57: | Line 124: | ||
| </ | </ | ||
| - | The most logic is within ''/ | + | The most logic is within ''/ |
| * '' | * '' | ||
| + | * '' | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | * '' | ||
| The rest items are symlinks to these files: | The rest items are symlinks to these files: | ||
| Line 68: | Line 135: | ||
| * '' | * '' | ||
| - | Boot menu can contain | + | This is well tested setup. The main downside is that PXELinux doesn' |
| + | |||
| + | </ | ||
| + | |||
| + | Boot menu can contain | ||
| + | |||
| + | We need some more work in preseed/ | ||
| + | |||
| + | ==== DNS, DHCP and TFTP servers ==== | ||
| + | |||
| + | <tabbox dnsmasq> | ||
| - | ==== dnsmasq ==== | ||
| The default Debian' | The default Debian' | ||
| The most configuration is ''/ | The most configuration is ''/ | ||
| + | |||
| <file - / | <file - / | ||
| no-dhcp-interface = tun0 | no-dhcp-interface = tun0 | ||
| + | # upstream DNS | ||
| server = 10.226.130.130 | server = 10.226.130.130 | ||
| server = 10.226.130.131 | server = 10.226.130.131 | ||
| no-resolv | no-resolv | ||
| - | domain = test.ucom.am, 172.31.1.0/ | + | domain = auto.example.org, 172.31.1.0/ |
| - | domain = test.ucom.am, 172.31.255.0/ | + | domain = auto.example.org, 172.31.255.0/ |
| domain-needed | domain-needed | ||
| expand-hosts | expand-hosts | ||
| - | # no dynamic allocation for DHCP service on this subnet; static allocation via dhcp-host will still be possible | + | # no dynamic allocation for DHCP service on these subnets; static allocation via dhcp-host |
| dhcp-range = 192.168.205.224, | dhcp-range = 192.168.205.224, | ||
| dhcp-range = 172.31.255.0, | dhcp-range = 172.31.255.0, | ||
| Line 106: | Line 184: | ||
| dhcp-match = set:http, option: | dhcp-match = set:http, option: | ||
| - | dhcp-boot = tag: | + | dhcp-boot = tag: |
| - | dhcp-boot = tag: | + | dhcp-boot = tag: |
| - | + | ||
| - | #pxe-prompt = " | + | |
| - | #pxe-prompt = "Press F8 for menu.", | + | |
| - | # | + | |
| - | # | + | |
| log-queries | log-queries | ||
| Line 118: | Line 191: | ||
| </ | </ | ||
| - | It references the ''/ | + | It references the ''/ |
| <file - / | <file - / | ||
| BC: | BC: | ||
| Line 136: | Line 209: | ||
| </ | </ | ||
| - | I put auxiliary | + | Auxiliary |
| - | <file / | + | < |
| cname = boot.test.ucom.am, | cname = boot.test.ucom.am, | ||
| </ | </ | ||
| - | ==== Mini HTTPD ==== | + | <tabbox ISC DHCPD, ISC BIND, tftpd-hpa> |
| - | Needed for EL variants to be able to run installer from the network. | + | |
| + | * [[https:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== HTTP server | ||
| + | |||
| + | Needed for EL variants to be able to run installer from the network. | ||
| + | |||
| + | This directory is already served | ||
| ===== Debian: preseed ==== | ===== Debian: preseed ==== | ||
| Line 155: | Line 238: | ||
| ==== Bootloader configuration ==== | ==== Bootloader configuration ==== | ||
| + | |||
| + | <tabbox GRUB> | ||
| + | |||
| + | <file - / | ||
| + | set timeout=1 | ||
| + | |||
| + | menuentry ' | ||
| + | linux debian-bookworm/ | ||
| + | initrd debian-bookworm/ | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | <tabbox PXELinux> | ||
| + | |||
| <file - / | <file - / | ||
| default debian-bookworm-auto | default debian-bookworm-auto | ||
| Line 162: | Line 260: | ||
| kernel debian-bookworm/ | kernel debian-bookworm/ | ||
| append priority=critical initrd=debian-bookworm/ | append priority=critical initrd=debian-bookworm/ | ||
| - | |||
| </ | </ | ||
| + | |||
| + | </ | ||
| + | |||
| ==== Example preseed file ==== | ==== Example preseed file ==== | ||
| Works for Bullseye too (it was actually originally developed for Bullseye, but worked with Bookworm like a charm)! | Works for Bullseye too (it was actually originally developed for Bullseye, but worked with Bookworm like a charm)! | ||
| + | |||
| + | <tabbox BIOS> | ||
| <file - / | <file - / | ||
| Line 292: | Line 394: | ||
| in-target chmod 0600 / | in-target chmod 0600 / | ||
| </ | </ | ||
| + | |||
| + | <tabbox UEFI> | ||
| + | |||
| + | </ | ||
| ==== Additional documentation ==== | ==== Additional documentation ==== | ||
| Line 316: | Line 422: | ||
| ==== Bootloader configuration ==== | ==== Bootloader configuration ==== | ||
| + | |||
| + | <tabbox GRUB> | ||
| + | |||
| + | <file - / | ||
| + | set timeout=1 | ||
| + | |||
| + | menuentry ' | ||
| + | linux ol8u9/ | ||
| + | initrd ol8u9/ | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <tabbox PXELinux> | ||
| + | |||
| <file - / | <file - / | ||
| default ol8u9 | default ol8u9 | ||
| Line 324: | Line 444: | ||
| # it will append .../ | # it will append .../ | ||
| </ | </ | ||
| + | |||
| + | </ | ||
| ==== Example kickstart file ==== | ==== Example kickstart file ==== | ||
| + | |||
| + | <tabbox BIOS> | ||
| + | |||
| <file - / | <file - / | ||
| # | # | ||
| Line 432: | Line 557: | ||
| %end | %end | ||
| </ | </ | ||
| + | |||
| + | <tabbox UEFI> | ||
| + | |||
| + | </ | ||
| + | |||
| ==== Additional documentation ==== | ==== Additional documentation ==== | ||
| * https:// | * https:// | ||
notes/linux_automatic_network_install.1714980215.txt.gz · Last modified: by Nikita Kipriyanov
