Originally Posted by
Regis_Wang
yes, but it's a very old backup, does it work?
Traditionally, /bin contains some essential command binaries that need to be available in single user mode for all users, like ls, cp, rm.... The syntax of this commands didn't change substantially in the past few years. So yes, it should work.
Originally Posted by
Regis_Wang
thx a lot!
i'll try it!
but after that how can i repair the links? you know, i installed many software.
You can list the packages which have files installed in /bin with:
and you can reinstall them with:
Code:
sudo apt-get update
sudo apt-get --reinstall install pkg1 pkg2 pkg3 ...
where pkg1 pkg2 pkg3 ... are the name of the packages listed by dpkg.
Even if you don't have a backup you only need a few GNU/utilities which you can copy over from a (binary compatible) Live CD/USB or existing Linux installation:
- /bin/dash (I guess any POSIX-compliant shell will do it)
- /bin/sh (must be a symlink to the shell /bin/dash)
- /bin/sh.distrib (optional, same as sh, a symlink to dash)
- /bin/cp
- /bin/rm
- /bin/sed
- /bin/grep
- /bin/tar
- /bin/gzip
Then you can chroot into Ubuntu and reinstall the packages you need.
Bookmarks