/* Swtich from Pi to Root@raspberrypi */
sudo -i
/* Create (sub)folders */
sudo mkdir -p /srv/nfs
(Switch -p creates also a subfolder)
/* Set permissions on both folders SRV and NFS */
sudo chmod 777 srv & sudo chmod 777 nfs
/* Run command from location root@raspberrypi:/srv/nfs/ */
curl -Nks "
http://qutility.nl/toon-recovery-nfs-se ... age.tar.gz" | sudo tar zxvf -
/* Install NFS Server */
sudo apt-get install nfs-kernel-server portmap nfs-common
/* Edit exports file with nano (or vi) */
sudo nano /etc/exports
(Save changes with CRTL+0 and exit nano with CTRL+X)
/* Add line to file */
/srv/nfs *(rw,no_subtree_check,async,no_root_squash)
/* Enable NFS v2 */
sudo nano /etc/default/nfs-kernel-server
Change: RPCNFSDCOUNT=8
To: RPCNFSDCOUNT="-V 2 8"
Change: RPCMOUNTDOPTS="--manage-gids"
To: RPCMOUNTDOPTS="-V 2 --manage-gids"
/* Run command */
sudo cat /proc/fs/nfsd/versions
Output should be: +2 +3 +4 +4.1 +4.2
+2 means that NFS v2 is activated
/* Disable serial on Raspberry Pi */
sudo raspi-config
(Choose Option 3 and P6 (Serial Port). Disable both the options. Reboot if necessary.)
/* Restart NFS Server */
sudo service nfs-kernel-server restart
/* Install Phyton */
sudo apt install python-serial
/* Install terminal: Screen */
sudo apt install screen
/* Get ToonRecovery (execute from location root@raspberrypi:/srv/nfs/) */
git clone
https://github.com/ToonSoftwareCollecti ... covery.git
/* Go to folder */
cd ToonRecovery
/* Start Python */
sudo python . --jtag-available --output-level DEBUG (output switch is optional)
(After the message: INFO:recovery:Toon booting into recovery shell. For now, just start your favourite serial terminal)
/* Start Screen (Connect to serial) from new terminal */
sudo screen /dev/ttyUSB0 115200
FAQ:
Q: After running command 'Curl -Nks...' I receive an error message:
tar: toon/dev/console: Cannot mknod: Operation not permitted
toon/dev/ubi0_0
A: Make sure you run the command:
curl -Nks "
http://qutility.nl/toon-recovery-nfs-se ... age.tar.gz" | sudo tar zxvf -
(sudo must be after the dash)
Q: After running the command 'sudo python . --jtag-available' I receive an error message:
CRITICAL:__main__:Cannot autodetect jtag hardware.
A: Change in the file __main__.py (located in the folder ToonRecovery) line 6 and 22:
Change: supported_jtag_hardware=['auto']
To: supported_jtag_hardware=['/dev/ttyUSB0']
Change: default='auto')
To: default='/dev/ttyUSB0')
Change in the file recovery.py (located in the folder ToonRecovery) line 23:
Change: (
port=params['port'],
baudrate=115200
)
To:
params['port']=serial.Serial('/dev/ttyUSB0', 115200)
(Check if you are using USB0 of USB1 with the command: cd /dev/serial/by-id and ls -l)
(Output could be: >> lrwxrwxrwx 1 root root 13 Dec 15 19:17 usb-FTDI_FT232R_USB_UART_A50285BI-if00-port0 -> ../../ttyUSB0)
Stil got the same error message? Try 'sudo python . --jtag-hardware rpi4 --output-level DEBUG'
Q: After running the command 'sudo python . --jtag-available' I receive an error message:
CRITICAL:__main__:device reports readiness to read but returned no data (device disconnected or multiple access on port?)
A: Make sure you only use one serial connection. Kill other (screen) terminal processes with command:
sudo killall screen