I wanted to move /usr
on a Raspberry (Bullseye Linux) to an attached SSD, as I already and successfully did with /home
.
I copied /usr
with rsync to /media/ssd
, then renamed /usr
to /usr-bak
, in order to have it as a backup in case something goes wrong.
Now I realize that I can’t do anything anymore. All binaries are no longer executable.
They should be in /usr-bak/bin
now, as I only renamed /usr
instead of removing it.
I can see they are still there by typing /usr-bak/bin/ <TAB><TAB>
that autocompletes to everything I could need.
Unfortunately I am not able to run ls and whatever, especially mv
to rename that back and think about another and more clever way to continue.
Calling /usr-bak/bin/mv
tells me: No such file or directory
Same for . /usr-bak/bin/mv
, going into bin and only calling . mv
and whatever else came to my mind.
I also can’t run anything from /media/sdd/usr/bin
where again, everything exists but doesn’t execute.
What is happening here? Did the binaries lose their executable bit by moving the name?
What could I try before I get the raspberry out of where it is and plug it to monitor and keyboard?
Btw. I saw a bunch of similar questions here, but responses to them are not working for me as they rely on somehow executing something helpful. busybox, chmod and whatever… all that is no longer available to me.