Raspi&Gentooでネットブート
概要
導入方法
2. emerge --ask net-dns/dnsmasq
3. emerge --ask net-misc/ntp
4. /etc/portage/package.useにtftpのUSEフラグを追加
5. /etc/dnsmasq.confを編集
code:/etc/dnsmasq.conf
port=0
dhcp-range=192.168.88.255,proxy
log-dhcp
enable-tftp
tftp-root=/netboot/tftp
pxe-service=0,"Raspberry Pi Boot"
6. systemctl start dnsmasq
7. systemctl enable dnsmasq
8. emerge --ask net-fs/nfs-utils
9. mkdir /netboot/tftp
10. cpuのidのディレクトリを作る
1. 各フォルダに、/boot以下のファイルを全てコピーする
2. cmdline.txtを各々の環境に合わせて変更する
ルートディレクトリの設定
11. 各ノードのルートディレクトリを作成
12. 各ノードのetc/fstabを編集
boot領域のマウントを追加
13. exportsファイルの作成
14. timedatectl set-timezone Asia/Tokyo
15. systemctl start nfs-server
16. systemctl enable nfs-server
17. chrootしてsudo&nfs-utilsをインストール
1. mkdir -p /netboot/nodeX/run/systemd/resolve
2. cp /etc/resolve.conf /netboot/nodeX/run/systemd/resolve/stub-resolve.conf
3. chroot
4. rm -r /netboot/nodeX/run/systemd
18. chroot and create user, add passwd, add wheel group, and edit sudoers to allow wheel users sudo
19. chroot and enable systemd-resolved
参考文献