Jump to content

Recommended Posts

Posted (edited)

I ran an update on my orangpi PC2.

 

Setting up armbian-zsh (24.5.1) ...
cp: cannot create directory '/home/unifi/.oh-my-zsh': No such file or directory
cp: cannot create regular file '/home/unifi/.zshrc': No such file or directory
chown: cannot access '/home/unifi/.oh-my-zsh': No such file or directory
chown: cannot access '/home/unifi/.zshrc': No such file or directory

Witch is to be expected to fail, because that is a system user I accedentally gave an above 1000 UID

 

Unifi is UID 1003, my regular user bedna (1000) is the owner of /home/bedna

 

I don't mind, I don't use zsh anyway, but figured you would want to know about this.

 

Edit

I spoke to early, the update actually breaks the system.
Seems to be network related because it gets stuck at that if I connect a display to the device.

 

I have restored a backup and retried 2 times, same thing, so there is presumably something wrong on your side here.

 

This is what the terminal gave during the update, and as you can see, it looks like it all goes smooth, something in the firmware or kernel?

  Reveal hidden contents

 

Edited by bedna
Posted
  On 6/16/2024 at 5:04 AM, bedna said:

I have restored a backup and retried 2 times, same thing, so there is presumably something wrong on your side here.

Expand  


Hmm, can you give us a bit more information on how to reproduce this? If I start with a clean image, which you have used? 

Bullseye is not well maintained by upstream, so we don't provide images anymore. Its suggested to use Bookworm from some time.

 

Edit: https://github.com/armbian/build/blob/main/lib/functions/compilation/packages/armbian-zsh-deb.sh#L40-L54 Looks like this doesn't work well in your case. Needs some adjustments, ideas are welcome.

Posted
  On 6/16/2024 at 5:04 AM, bedna said:
cp: cannot create directory '/home/unifi/.oh-my-zsh': No such file or directory
Expand  

 

  On 6/16/2024 at 5:04 AM, bedna said:

Unifi is UID 1003, my regular user bedna (1000) is the owner of /home/bedna

Expand  

Do I understand correctly?
Are you logged in as a "benda" user?
There is another user "unifi" in your OS, but he does not have a home directory?
Or does the directory exist but the user "1003" has write rights?

Who has "sudo" rights? UID 1003 or 1000?

Posted
  On 6/17/2024 at 10:49 AM, Igor said:

Edit: https://github.com/armbian/build/blob/main/lib/functions/compilation/packages/armbian-zsh-deb.sh#L40-L54 Looks like this doesn't work well in your case. Needs some adjustments, ideas are welcome.

Expand  

Before these actions, it is necessary to verify users with UID >= 1000.
And in the loop for the found users, first check the existence of the home directory and if it exists, then do these actions (cp, chown).

Posted (edited)

Oh crap! I missed these repliess, I must make sure to activate email notification, I'm sorry!

I honestly just left it unupdated, it's not a huge issue for me, I don't really use it for other than testing a script.

The img it was installed from was "Armbian_community_24.5.0-trunk.93_Orangepipc2_bookworm_current_6.6.18_minimal" and I am aware it IS a "community release", that's why I didn't put a massive amount of investigation.

 

  On 6/17/2024 at 2:07 PM, going said:

Are you logged in as a "benda" user?

Expand  

 

Close.. "bedna".. xD
But yes, bedna is UID 1000, the ONLY sudo user.
1003 is a system user, no home, no login shell IIRC.

 

Edit. I made a check, and it actually is supposed to have a home in /home/unifi (MY BAD.. xD

unifi:x:1003:1003:System user for Unifi,,,:/home/unifi:/usr/sbin/nologin

So that is on me, I probably forgot to use the --system option or smthn, it is not a big deal and most likely not connected to the network failing at boot anyway.


And the zsh is just super strange, I never use it even though I know it comes with the img.
(I now realize, the option in the installation is just selecting the shell, there is absolutely a zsh installed on the opi, I have just not noticed it)

 

I will try with a fresh image and come back with results, when I get time...

 

Edit 2:
https://github.com/armbian/build/blob/2a2e609e3c5e55404759ea9a2cf010b268c2f356/lib/functions/compilation/packages/armbian-zsh-deb.sh#L49C3-L49C129

awk -F'[:]' '{if (\$3 >= 1000 && \$3 != 65534 || \$3 == 0) print ""\$1":"\$3" "\$6"/.zshrc"}' /etc/passwd | xargs -n2 chown -R

Is the "culprit".
 

In this situation it IS my bad as shown above, not sure what I did because the directory was not created, but the entry in /etc/passwd clearly exist.
A solution would be to run [-d <user-home-path found in passwd> ], but tbh, babysitting at that level is imho a bit too far...
This is on me..
But the system freezing at boot trying to connect to network, I will look deeper into.

Edited by bedna
Posted

This script assumes that there should be one user on your system with a UID >= 1000.

https://github.com/armbian/build/blob/main/lib/functions/compilation/packages/armbian-zsh-deb.sh#L40-L54

In general, this is not true.

 

If you need an administrator user without a home directory, you can create one with a UID < 1000.

But in this case, zsh will not work correctly for him. Or fix the situation manually.

 

  On 6/26/2024 at 7:04 AM, bedna said:

But the system freezing at boot trying to connect to network, I will look deeper into.

Expand  

There may be two problems here.
There is no clock on the device and the OS makes a request to a remote time server at startup and if it does not receive a timestamp, then it just waits. It looks like it's stuck.
1) The external internet connection is not working.
2) You have updated the kernel package. Your OS is Debian Bullseye.

Packages are collected in the ubuntu noble environment (24.04).

This may have caused the Ethernet connection to break down.

 

P.S.

Try installing Ubuntu 24.04 on your device.
And your 4 year updates won't create any problems.

Posted
  On 6/26/2024 at 12:55 PM, going said:

There is no clock on the device and the OS makes a request to a remote time server at startup and if it does not receive a timestamp, then it just waits. It looks like it's stuck.
1) The external internet connection is not working.
2) You have updated the kernel package. Your OS is Debian Bullseye.

Expand  

 

Yeah, I didn't react to the comment about if I was using bullseye, I was 100% sure I had a bookworm img installed, but that might not be the case.
Thank you for providing feedback, but I will reinstall with the latest community img and see what that leads to. :)

Posted (edited)
  On 6/26/2024 at 12:55 PM, going said:

There is no clock on the device and the OS makes a request to a remote time server at startup and if it does not receive a timestamp, then it just waits. It looks like it's stuck.
1) The external internet connection is not working.
2) You have updated the kernel package. Your OS is Debian Bullseye.

Expand  

 

Yeah, I didn't react to the comment about if I was using bullseye, I was 100% sure I had a bookworm img installed, but that might not be the case, I must have dreamt I installed the only opiPC2 img I had downloaded on my computer.
 

  On 6/26/2024 at 12:55 PM, going said:

And your 4 year updates won't create any problems.

Expand  


WDYM? I updated that system at least once a week up until it no longer worked. Worked flawlessly up until I made the post.

 

Thank you for providing feedback, but I will reinstall with the latest community img and see what that leads to. :)

Edited by bedna
I tried to edit the above post to add info, but instead it made a new post, and now I can not delete any of them.. Mods, feel free to clean up..
Posted

@going
Interesting....

 

update-initramfs: Armbian: Symlinking /boot/uInitrd-6.6.31-current-sunxi64 to /boot/uInitrd
'/boot/uInitrd' -> 'uInitrd-6.6.31-current-sunxi64'
update-initramfs: Armbian: done.
Remove unused generated file: /boot/initrd.img-6.1.63-current-sunxi64
Remove unused generated file: /boot/uInitrd-6.1.63-current-sunxi64
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.6.31-current-sunxi64'
Armbian: Debian compat: linux-update-symlinks install 6.6.31-current-sunxi64 boot/vmlinuz-6.6.31-current-sunxi64
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.6.31-current-sunxi64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.6.31-current-sunxi64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.6.31-current-sunxi64
I: /initrd.img is now a symlink to boot/initrd.img-6.6.31-current-sunxi64
Armbian 'linux-image-current-sunxi64' for '6.6.31-current-sunxi64': 'postinst' finishing.

 

I wiped the sd-card, but I have access to a backup to before running this update..
You guys need/want something from me?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines