No Sudo Rights on BBB Client Using NFS Server

@Jack_Nightengale, i just retested my directions… I’m not sure what’s blocking “sudo” on your system, it might be how you copied the file system from the Beagle…

Server: 192.168.1.80
Beagle: 192.168.1.177

Server: Install NFS:

sudo apt install nfs-kernel-server
sudo nano /etc/exports
/opt/buster/ *(rw,sync,no_subtree_check,no_root_squash)
sudo exportfs -a

Beagle; Install NFS, and copy files over…

debian@beaglebone:~$ cat /etc/dogtag
BeagleBoard.org Debian Stretch IoT Image 2020-04-06

debian@beaglebone:~$ sudo apt install nfs-common

debian@beaglebone:~$ sudo mkdir /tmp/rootfs/
debian@beaglebone:~$ sudo mount -t nfs -o rw,nfsvers=3,rsize=8192,wsize=8192 192.168.1.80:/opt/buster/ /tmp/rootfs/

debian@beaglebone:~$ mount | grep nfs
192.168.1.80:/opt/buster/ on /tmp/rootfs type nfs (rw,relatime,vers=3,rsize=8192,wsize=8192,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.80,mountvers=3,mountport=41366,mountproto=udp,local_lock=none,addr=192.168.1.80)

debian@beaglebone:~$ cd /opt/scripts/tools/developers/
debian@beaglebone:/opt/scripts/tools/developers$ ./nfs-rsync.sh

NFS Settings for my setup:

#uname_r=4.14.108-ti-r131
client_ip=192.168.1.177
server_ip=192.168.1.80
gw_ip=192.168.1.1
root_dir=/opt/buster

Server: install tftpd-hpa, so we can use uname_r nfs boot…

sudo apt install tftpd-hpa

cat /etc/default/tftpd-hpa 
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/opt/buster/boot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

sudo /etc/init.d/tftpd-hpa restart

Beagle: Copy /nfs-uEnv.txt as /uEnv.txt and edit:

##client_ip needs to be set for u-boot to try booting via nfs

client_ip=192.168.1.177

#u-boot defaults: uncomment and override where needed

server_ip=192.168.1.80
gw_ip=192.168.1.1
#netmask=255.255.255.0
#hostname=
#device=eth0
#autoconf=off
root_dir=/opt/buster
#nfs_options=,vers=3
#nfsrootfstype=ext4 rootwait fixrtc

##use uname_r= only if TFTP SERVER is setup for uname_r boot:
uname_r=4.14.108-ti-r131

Verify Beagle is loading from tftp:

Loaded environment from /uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
Checking if client_ip is set ...
gpio: pin 56 (gpio 56) value is 1
Running nfsboot_uname_r ...
Booting from 192.168.1.80 ...
cpsw Waiting for PHY auto negotiation to complete.. done
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.80; our IP address is 192.168.1.177
Filename 'vmlinuz-4.14.108-ti-r131'.
Load address: 0x82000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ########
	 1.4 MiB/s
done
Bytes transferred = 9654768 (9351f0 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.80; our IP address is 192.168.1.177
Filename 'dtbs/4.14.108-ti-r131/am335x-boneblack.dtb'.
Load address: 0x88000000
Loading: #####
	 5.2 MiB/s
done
Bytes transferred = 60180 (eb14 hex)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffee000, end 8ffffb13 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.108-ti-r131 (voodoo@x2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1stretch SMP PREEMPT Tue Mar 24 19:18:37 UTC 2020
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] CPU: All CPU(s) started in SVC mode.

Login into System:

Debian GNU/Linux 9 beaglebone ttyS0

BeagleBoard.org Debian Stretch IoT Image 2020-04-06

Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

default username:password is [debian:temppwd]

beaglebone login: debian
Password: 
Last login: Fri May 15 14:44:59 UTC 2020 on ttyS0

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian@beaglebone:~$

debian@beaglebone:~$ mount | grep nfs
192.168.1.80:/opt/buster on / type nfs (rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.1.80,mountvers=3,mountproto=udp,local_lock=all,addr=192.168.1.80)

debian@beaglebone:~$ whoami
debian

debian@beaglebone:~$ sudo whoami
root

debian@beaglebone:~$ sudo reboot
[  OK  ] Stopped target RPC Port Mapper.
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Sound Card.
[  OK  ] Stopped target Host and Network Name Lookups.
         Stopping dnsmasq - A lightweight DHCP and caching DNS server...
[  OK  ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Unmounting RPC Pipe File System...
[  OK  ] Stopped target Timers.