Raspberry Pi PXEのTFTP artifactとNFS rootfsを同じrelease境界で扱う
Posted: | Tags: ansible, gentoo, pxe, raspberry-pi
Raspberry Pi PXEのTFTP artifactとNFS rootfsを同じrelease境界で扱う
目的
Raspberry Pi を PXE / network boot で運用すると、boot firmware が読む TFTP artifact と、Linux が mount する NFS rootfs が別々の場所に置かれる。
この 2 つの対応がずれると、kernel / DTB / initramfs / module set / rootfs のどこで壊れたかを追いにくい。
ここでは、TFTP artifact と NFS rootfs を同じ release 境界で promote する設計をまとめる。
前提
構成は次のように分ける。
DHCP / TFTP server
-> TFTP root
dates/<release>/
<board-or-host-prefix>/
NFS server
-> rootfs/<release>/
Raspberry Pi firmware は board 固有の prefix directory を読める。host directory には config.txt、cmdline.txt、symlink などを置き、cmdline.txt で NFS rootfs release を切り替える。