Raspberry Pi netbootのTFTP host directory設計
Posted: | Categories: pxe | Tags: openwrt, pxe, RaspberryPi, tftp
Raspberry Pi netbootのTFTP host directory設計
Raspberry Pi の network boot は、一般的な PXE の pxelinux.cfg とは違う挙動をする。
特に Pi firmware は、TFTP root 直下だけでなく board 固有の directory を探す。bootfile でサブディレクトリを指定しても、cmdline.txt が期待した場所から読まれないことがある。
このため、Pi ごとの board hash directory を TFTP root 直下に実ディレクトリとして作り、host ごとに cmdline.txt を制御する設計が扱いやすい。
本文中の 192.0.2.0/24 は説明用の documentation range である。homecluster-infra で OpenWrt 実機へ反映する場合は、router hostvars の openwrt_lan_ipaddr、openwrt_dhcp_ntp_servers、openwrt_gentoo_server_host を外部 inventory で明示し、TFTP / NFS / dnsmasq の endpoint に documentation range を残さない。
目的
- boot firmware / kernel / DTB / initramfs は release 単位で共有する
- host ごとの
config.txt/cmdline.txtは board hash directory に置く - NFS root の release 切替は
cmdline.txtで行う - TFTP release の更新と host boot 先の切替を分ける
directory構成
例として、TFTP root を次のように分ける。
Read more...