Skip to content

Commit 11b6620

Browse files
Add how to set up nfsroot
1 parent 18b3e0e commit 11b6620

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

hardware/raspberrypi/bootmodes/Readme.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Plug the SD card into the SERVER and boot the server, with it connected to the i
122122
```
123123
sudo apt-get install tcpdump
124124
sudo apt-get install dnsmasq
125-
sudo apt-get remove dhcpcd
125+
echo "denyinterfaces eth0" | sudo tee -a /etc/dhcpcd.conf
126126
```
127127

128128
After this we'll need to fix DNS because dnsmasq breaks it a bit...
@@ -186,6 +186,27 @@ cp /boot/bootcode.bin /tftpboot
186186
cp /boot/start.elf /tftpboot
187187
```
188188

189-
Now when you power off and then power on the CLIENT tcpdump should give lots of data (you should also notice the LEDs flashing for longer when it boots).
189+
Now when you power off and then power on the CLIENT tcpdump should give lots of data and the result should be the green LED flashing (this means it couldn't find the kernel, not surprising since we didn't give it one...)
190190

191+
Next, we need to provide the other files (kernel and dt overlays etc) which are currently stored on the SERVER's boot directory, so:
191192

193+
```
194+
cp -r /boot/* /tftpboot
195+
```
196+
197+
This should now allow your Pi to boot through until it tried to load a root filesystem (which it doesn't have)... This is the point where you need to provide a filing system which is beyond this tutorial... Although I'll give you some clues for sharing the SERVERS filesystem with the client...
198+
199+
* Reboot SERVER with a normal ethernet connection (you'll probably need to remove the dhcpcd.conf line to re-enable the client)
200+
* `sudo apt-get install nfs-kernel-server`
201+
* `sudo vi /etc/exports`
202+
* Add the line "/ *(rw,sync,no_subtree_check)" to exports
203+
* sudo systemctl restart rpcbind.service
204+
* sudo systemctl restart nfs-kernel-server.service
205+
* Reboot with the ethernet connected to the CLIENT and do the static IP thing again
206+
* Check the mount is working using something like `sudo mount 192.168.1.1:/ tmp`
207+
* edit /tftpboot/cmdline.txt and change to
208+
* "root=/dev/nfs nfsroot=192.168.1.1:/ rw ip=dhcp rootwait"
209+
* edit /etc/fstab and remove the /dev/mmcblkp1 and p2 lines
210+
* edit /boot/cmdline.txt (the SERVER's cmdline) and add "rw" to the line
211+
212+
Think that's it... Good luck...

0 commit comments

Comments
 (0)