I've deleted /bin by mistake. Now I can't boot my Slackware64 13 system.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've deleted /bin by mistake. Now I can't boot my Slackware64 13 system.
Well, as the title says, I deleted /bin by mistake. I wanted to remove a bin folder that was in a backup partition and I think I used rm -r /bin as root instead of rm -r bin (this happens when one is tired and needs some sleep :-).
From there on, terminal did not recognize commands. I didn't realized what happened until I rebooted my computer and it stopped loading and, of course, there isn't any prompt nor X.
So, before I start to cry :-( Is there something I can do to recover my /bin folder and Slackware64 13?
Now, I can write this thread because I am running Debian Lenny. I can also mount Slackware partitions from here. Advantages of using more than a Linux OS.
Do you still have the Slack install disk? I think it is a live-CD, so you could boot from it and copy /bin to your Slack partition.
Yes, I have it but I am not sure it is a livedvd. Is it possible to copy the /bin folder to my slackware partition but from Debian (which I am using now)?
If that is possible, Do I have just to copy it as root or I have to do something else? Where is /bin in the Slackware DVD?
If you have a backup of /bin at hand, just copy it to / -- but I guess you don't so AFAIK all you can do is reinstall, not forgetting backup directories containing files that you wish to keep, at least /home (if you need to re-format the partition where it lives), /etc and maybe /var (e.g. for databases files).
If you have a backup of /bin at hand, just copy it to / -- but I guess you don't so AFAIK all you can do is reinstall, not forgetting backup directories containing files that you wish to keep, at least /home (if you need to re-format the partition where it lives), /etc and maybe /var (e.g. for databases files).
No, I don't have any /bin backup :-(
And...What about the packages I've installed? Will I have to reinstall them?
My partition scheme in slackware is:
/
/home
SWAP
I didn't mean to copy /bin from Debian to Slackware. What I was trying to say was if I could copy /bin from the slacware dvd to /bin in slackware root partition but using debian to copy those files. But, as far as I can see, there isn't any /bin folder in slackware dvd.
You will possibly not have to install your packages if they installed to /usr/bin, but be prepared to install them if they don't work. If you just go to the slackware directory on your cd and you will see a, d, e, f .... etc and run
upgradepkg --reinstall */*.t?z
that should look at /var/log/packages and only install the packages that you have installed on your system. This is useful if, like me, you trim your install.
Yes, you will have to reinstall all packages, be it included or not in the distribution, as all directories but /home will have to be formatted during setup.
If you installed some packages in /opt (e.g. this could be the case for OpenOffice and Adobe Reader), you could backup their directories. But then you will have to re-create the symbolic links to it after having copied it to the new system, so I'm not sure this is worth the hassle. All in all I think you'll be better off reinstalling everything, to make sure you have a clean system.
Then if you happen to build yourself a package, e.g. using the slackbuilds available at http://slackbuilds.org, keep the package after installing it just in case.
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,640
Rep:
Chances that you have to reinstall your custom compiled packages are low. That depends of course on which packages exactly that are, but on my system I don't have a single (of many custom compiled) package which saves a file in /bin.
If you are not sure and if you can identify the packages (by a special tag or something) you can check that. For example to look for all packages build by script from Slackbuilds.org:
Yes, you will have to reinstall all packages, be it included or not in the distribution, as all directories but /home will have to be formatted during setup.
You really will not have to re-install your entire system. Just boot your computer using the install cd/dvd and then follow the instructions in my previous post, and all your settings will be intact.
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,640
Rep:
Do what samac says
What came to my mind in addition: After reinstalling all apps you will probably have some ".new" files let's say in /etc. Be sure to search for them (find /etc -type -f -name "*.new"), merge eventually made changes and remove the duplicate files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.