Latrina

Untitled

Nov 29th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. IMAGE PREREQS:
  2. 1. As kernel you can either compile https://github.com/raspberrypi/linux or use the debian binary http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/
  3. 2. You then need to make an initramfs for the nfsroot. I have used dracut as per https://wiki.gentoo.org/wiki/Dracut#NFS_boot
  4. 3. You need to edit the inittab file if you intend on using the serial console https://wiki.gentoo.org/wiki/Raspberry_Pi_3_64_bit_Install#Serial_port_configuration
  5.  
  6.  
  7. # On the rpi.
  8. 1. Update rom and bootloader options and enable netboot if sd card is not present
  9. - See https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#updating-the-eeprom-configuration
  10. [all]
  11. BOOT_UART=1
  12. BOOT_ORDER=0x21
  13. DHCP_TIMEOUT=45000
  14. DHCP_REQ_TIMEOUT=4000
  15. TFTP_FILE_TIMEOUT=30000
  16. TFTP_PREFIX=1
  17. TFTP_PREFIX_STR=WHATEVERDIR/
  18. WAKE_ON_GPIO=1
  19. POWER_OFF_ON_HALT=0
  20.  
  21. # Setup TFTP + NFS Server
  22. 1. Install in.tftpd and nfs
  23. - rc-update add in.tftpd
  24. - rc-update add nfs
  25.  
  26. 2. cp -a /boot into /var/tftpboot/WHATEVERDIR
  27. 3. edit /var/tftpboot/WHATEVERDIR/cmdline.txt
  28. console=serial0,115200 root=/dev/nfs nfsroot=172.12.1.57:/WHATEVER/ROOTFS,vers=3,proto=tcp rw ip=dhcp rootwait
  29. 4. add /var/tftpboot/WHATEVERDIR to /etc/exports
  30. /var/tftpboot/WHATEVERDIR *(fsid=1,rw,sync,no_subtree_check,no_root_squash)
  31.  
  32. # ROOTFS setup
  33. 1. cp -a / /WHATEVER/ROOTFS
  34. 2. edit /WHATEVER/ROOTFS/etc/fstab
  35. 172.12.1.1:/var/tftpboot/WHATEVERDIR /boot nfs noauto,noatime,vers=3,proto=tcp 1 2
  36. 3. add the roofs dir to /etc/exports
  37. /WHATEVER/ROOTFS *(rw,sync,no_subtree_check,no_root_squash)
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
Add Comment
Please, Sign In to add comment