Raspberry Piでネットワーク構築/PXEブート

提供: Medeshima wiki
< Raspberry Piでネットワーク構築
2023年4月19日 (水) 14:40時点におけるHosakino (トーク | 投稿記録)による版 (ページの作成:「= 概要 = * https://www.raspberrypi.com/documentation/computers/remote-access.html#network-boot-your-raspberry-pi * https://debian-handbook.info/browse/buster/sect.nfs-…」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

概要

設定

シリアル

$ cat /proc/cpuinfo | grep Serial

ネットワークブート

Raspberry Pi 4 Model B

$ sudo raspi-config

Advanced Options -> Boot Order -> Network Boot

$ vcgencmd bootloader_config | grep BOOT_ORDER
BOOT_ORDER=0xf21

Raspberry Pi 3 Model B

$ vcgencmd otp_dump | grep 17:
17:3020000a

TFTPサーバ

  • /etc/dnsmasq.conf
pxe-service=0,"Raspberry Pi Boot"
enable-tftp
tftp-root=/tftpboot

$ sudo cp -r /boot/* /tftpboot

  • /tftpboot/cmdline.txt
console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.0.1:/nfsroot/raspberrypi,vers=4.1,proto=tcp rw ip=dhcp rootwait

NFSサーバ

  • /etc/exports
/nfsroot/raspberrypi 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/tftpboot 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash)

  • /nfsroot/raspberrypi/etc/fstab
192.168.0.1:/tftpboot /boot nfs defaults,vers=4.1,proto=tcp 0 0