0

I want to run some x86_64 apps from jetson nano,for example google chrome and teamviewer and I want also to copy heavy files from the sd card of the nano on a larger disk on the desktop PC. For this reason I've configured the NFS server on ubuntu x64 and the client on the jetson nano. I've configured the server adding this command inside the /etc/exports file :

/home/loziomario/Scrivania/Nano/qemu-chroot-I9 *(rw,fsid=0,insecure,no_root_squash,no_subtree_check,async,nohide)

on the client side,I mount the shared folder with this command :

sudo mount 192.168.1.6:/home/loziomario/Scrivania/Nano/qemu-chroot-I9  /root/Scrivania/Work/qemu-chroot-I9

where :

192.168.1.6 = ip number of the server (ubuntu 18.04 x64 bit)
192.168.1.3 = ip number of the nano / ubuntu 18.04 arm64

what I want to do is to copy the groovy chroot from the nano to the server,inside a shared folder,called "qemu-chroot-I9" and I do this with this command :

sudo rsync -avzhprt --numeric-ids /root/Scrivania/Work/qemu-chroot-nano/chroot-groovy-x86_64 /root/Scrivania/Work/qemu-chroot-I9

all the files are copied without problems. After this,I mount all the chroot system folders and I copy the qemu-x86_64-static file from the /usr/bin folder of the ubuntu / nano on the /usr/bin folder of the groovy chroot like this :

cp /usr/bin/qemu-x86_64-static /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/usr/bin

and :

xhost +
sudo mount -t sysfs /sys/ /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/sys/
sudo mount -t proc /proc/ /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/proc/
sudo mount --bind /dev /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/dev/
sudo mount --bind /dev/pts /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/dev/pts/
sudo mount --bind /dev/shm /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/dev/shm/

and I became root inside the chroot with this command :

sudo chroot /root/Scrivania/Work/qemu-chroot-I9/chroot-groovy-x86_64/ /bin/su -l root

(I can become root because I have been able to debootstrap (using the two debootstrapping stages :

1) debootstrap --foreign --arch amd64 groovy ./chroot-groovy-x86_64
  1. sudo chroot ./chroot-groovy-x86_64/ /debootstrap/debootstrap --second-stage

and I have configured correctly groovy first on the nano sd card)

and this is what happens if I try to install nano inside the chroot :

root@ziomario-desktop:~# apt install nano
Reading package lists… Done
Building dependency tree… Done
Suggested packages:
hunspell
The following NEW packages will be installed:
nano
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 284 kB of archives.
After this operation, 930 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu groovy/main amd64 nano amd64 5.2-1 [284 kB]
Fetched 284 kB in 1s (324 kB/s)

unfortunately this error occour :

debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: No locks available
dpkg: error: unable to lock dpkg database lock: No locks available
W: Not using locking for nfs mounted lock file /var/lib/dpkg/lock-frontend
W: Not using locking for nfs mounted lock file /var/lib/dpkg/lock
W: Not using locking for nfs mounted lock file /var/cache/apt/archives/lock
E: Sub-process /usr/bin/dpkg returned an error code (2)

according with this post

"debconf: DbDriver "config": config.dat is locked by another process: Resource temporarily unavailable" while installing packages

it says that doing :

sudo fuser -v /var/cache/debconf/config.dat

Will show you what process is holding the lock:

good. I gave this command outside the chroot like this :

root@ziomario-desktop:~# sudo fuser -v /var/cache/debconf/config.dat

output = nothing

I gave this command also on the server side :

root@loziomario-I9:/home/loziomario/Scrivania/Nano# sudo fuser -v /var/cache/debconf/config.dat

output = nothing

so,nothing is holding the lock.

this is even more interesting. I have renamed the config.dat file on ubuntu 18.04 arm64 outside of the chroot :

root@ziomario-desktop:/var/cache/debconf# mv config.dat config.dat_

root@ziomario-desktop:/var/cache/debconf# ls

config.dat-old config.dat_ passwords.dat templates.dat templates.dat-old

and I tried to install nano again :

root@ziomario-desktop:/var/cache/debconf# apt install nano
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
hunspell
The following NEW packages will be installed:
nano
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/284 kB of archives.
After this operation, 930 kB of additional disk space will be used.

but the error is still there :

debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: No locks available
dpkg: error: unable to lock dpkg database lock: No locks available
W: Not using locking for nfs mounted lock file /var/lib/dpkg/lock-frontend
W: Not using locking for nfs mounted lock file /var/lib/dpkg/lock
W: Not using locking for nfs mounted lock file /var/cache/apt/archives/lock
E: Sub-process /usr/bin/dpkg returned an error code (2)

it seems that there isn't an easy way to fix it. can someone help me ?

Marietto
  • 575

0 Answers0