pythops / jetson-image

💾 Create minimalist, Ubuntu based images for the Nvidia jetson boards
349 stars 108 forks source link

User permissions, rootfs resize errors #91

Closed eusoubrasileiro closed 10 months ago

eusoubrasileiro commented 1 year ago

After using the scripts back again after one year or so I ended up with a bootable image. Some little problems:

1 .The home directory is owned by root not by the user created. It seams, don't know why Containerfile.rootfs useradd isn't working well maybe because everything is copied inside /build/Linux_for_Tegra? I don't know...

  1. The same as 1. for /tmp folder.
  2. Canot make jetson-ffmpeg work again.. exactly as this previous issue on an old version from hre
    Can't initialize nvrm channel 
    Couldn't create ddkvic Session: 
    Cannot allocate memory nvbuf_utils: 
    Could not create Default NvBufferSession  

    Maybe this weird behaviour is somehow related to nvidia not officially supporting focal only bionic? Who knows?

For while this is it. Will keep my tests and reporting here... I am certainly going to bionic again, just wondering if podman could create something usefull (without the errors above) without chroot, like you did.

All in all thanks a lot for introducing me to podman and just. Best Regards @pythops!

eusoubrasileiro commented 1 year ago

Solved the 3rd. It was a group problem missing add user to groups video,audio,adm. I found it looking at the script l4t_create_default_user.sh from the BSP tarball. When creating a user the groups should be -G "sudo,video,audio,adm" those are the nvidia defaults. Same also reported from here.

So surely jetson-ffmeg can run on focal.

I suggest you change your RUN useradd ...

pythops commented 1 year ago

Thanks for reporting those points, I'll check them Let me know if you noticed other issues or struggling with some tools,

eusoubrasileiro commented 1 year ago

@pythops thanks for the answer. I have tried a lot of things since your previous releases with vagrant... I am still exploring but if possible I would like to kindly make two questions (interconnected), if you dont mind answering:

  1. Why did you drop a isolated ubuntu (with vagrant) and chroot to use podman (without chroot)?
  2. Why not use the scripts from nvidia BSP and chroot to create the image directly inside podman or docker?

Thanks a lot!

eusoubrasileiro commented 1 year ago

Forgot to mention just build-jetson-image ... asks for my sudo password is it expected or something I am doing wrong?

eusoubrasileiro commented 1 year ago

Just downloaded and flashed your latest release (user jetson) the errors are the same.

So I'm here sharing my journalctl > text.file for you in case it's useful.

Well if I run by hand the resizerootfs.sh than it works.

Also \etc\resolv.conf is breaking apt and any dns resolution.

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search nvidia.com

Just had to fix by hand.

pythops commented 1 year ago

Good points. Let me answer them in the order

Why did you drop a isolated ubuntu (with vagrant) and chroot to use podman (without chroot)?

The vagrant + virtualbox is too heavy . podman in the other hand is lightweight and provide the same solution for this project

Why not use the scripts from nvidia BSP and chroot to create the image directly inside podman or docker?

That's what I'm doing now :)

just build-jetson-image ... asks for my sudo password is it expected or something I am doing wrong?

You're doing anything wrong, it's normal that it asks for password cause rootful podman is needed. If you don't want to be asked for password for podman , you can add this line in your /etc/sudoers

<YOUR USERNAME HERE> ALL=(ALL) NOPASSWD:SETENV: /usr/bin/podman

resizerootfs and dns errors

I'll check those and I'll fix them

eusoubrasileiro commented 1 year ago

Thanks @pythops

pythops commented 10 months ago

fixed here #103