mdegans / tegrity

Helps bake Tegra system images
MIT License
19 stars 2 forks source link

Is --script option working? #6

Open eMrazSVK opened 1 year ago

eMrazSVK commented 1 year ago

Hello, I am trying to implement a Python deployment script for our Jetson device, which includes running "install" script inside chroot, so it can be re-used in the future. I tested everything using --enter interactive mode, but this is not an option, since I want to automatize this process.

Using your QemuRunner would be nice, but I get errors related to non-root access, which is not sufficient I guess:

mount: only root can use "--options" option

I cannot - and do not want to run this whole script as sudo. So if this worked, this would be one solution to my problem.

Another solution would by to use subprocess and run tool tegrity-qemu as a subprocess inside Python. So I tried:

sudo tegrity-qemu rootfs/ --script /home/dcs_user/test.sh

And I get:

FileNotFoundError: [Errno 2] No such file or directory: '/home/dcs_user/test.sh'

Where am I supposed to put the script I want to run?

Thank you for your time!