I just destroyed my computer by installing a bad package.
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 just destroyed my computer by installing a bad package.
This is what I did:
I downloaded an older version of glibc_2.7 from a site. Sorry, I don't know exactly where from. It was near the top of the google results and from rpmfind, though. The computer was totally unusable after I ran rpm2targz, then src2pkg on the package.
As root, I ran installpkg package.tgz. I saw a bunch of messages, such as /usr/bin/rm - no such file or directory. Then every command I ran was no such file or directory. I tried logging in on a tty (outside of X). After typing my username I didn't get a change to type my password. I feel so defeated. Anyway, there's a small change this wasn't just a malicious package, because I don't think the commands or directories were deleted. I was able to still cd to /usr/bin, for instance, and still able to auto complete all the commands I and INIT are unable to execute. Maybe converting the rpm to tgz on glib somehow was bad when running installpkg, or maybe installpkg was altered by another package I installed with installpkg earlier. I've been trying for days to install something to do video editing with. I tried everything, and the more I tried, the more weird and obscure dependencies I had to download and install. I was trying to install the older version of glib for cinerella available at linuxpackages. Glib 2.7 was the last dependency it complained about, needed for libc.so.6.
Going from room to room, I see on the destroyed computer when I try to reboot it:
INIT: unable to execute /sbin/agetty
INIT: Id "c3" spawning too fast. disabling for 5 minutes.
Should I just go ahead and reinstall, or is this fixable through a live distro? I feel so defeated.
glibc is one of the few things you _don't_ change, and even if you do, you install an official slackware glibc package, not some rpm glibc from rpmfind which you don't even know that is compatible with slackware and you never install packages from linuxpackages.net. You could try reinstalling the glibc package from the slackware disc by mounting your root partition with your slackware disc.
Thanks, I think I will try that. I had the crazy notion of being able to have my slackware version of glibc and an older verson on their just for cinerella. Anyway, I will definitely try reinstalling glibc from disc. Also, I will try using a live distro to mount the disc and see if all these files are, for some reason, non-executable, since all the files are there and I'm seeing the commands can't be executed, not no such file or directory.
I'll report back w/ more info, but for now I'm going to bed, the day wasted, but a good lesson learned. In a way this is humbling.
1. Boot from a Live CD
2. mount your root partition (but not in root)
3. inspect the contents of that tarball so you can see where things were installed - and manually remove items (including symlinks)
4. inspect the package for the good libc6 that you had - and manually unpack and install things
(check for symlinks which may have been intended to be created by a post-install script).
You can't actually boot a rescue CD and switch your root partition since you'll have the same problem as soon as the rescue CD mounts your root partition - a bad libc. You have to do all the fixing while booted into a different system.
pinniped: Thanks a lot for the suggestion. I never knew glibc would effect so much, but am glad to know it wasn't just a shady package changing permissions on commands or deleting content. I'm excited to try what you suggested. I wish I could just leave work now to get started on the repair process.
I appreciate all the replies. That glibc-recovery link really helped me end the experimental mindset and just get to work. I followed the directions exactly and everything's back to normal. The only thing I didn't need to do was rm /mnt/lib/incoming or /mnt/lib/tls (they didn't exist on my computer).
Unfortunately, though, I'm back to square one with trying to get something on my computer to edit video. I read @ work that texmex suggests Lives. I'll try compiling and installing that in a minute, but if there's a thousand dependency issues I'm going to give it a rest until tomorrow.
I know it's not their responsibility, but I wish the people who create and package this great multimedia software would either include all of the dependencies (and the dependencies' dependencies) or at least have a wget script included to get all the packages needed. They have to know people out there are struggling, staying up all night trying to edit videos or whatever the project may be, but aren't even able to compile or run precompiled builds.
I know it's not their responsibility, but I wish the people who create and package this great multimedia software would either include all of the dependencies (and the dependencies' dependencies) or at least have a wget script included to get all the packages needed. They have to know people out there are struggling, staying up all night trying to edit videos or whatever the project may be, but aren't even able to compile or run precompiled builds.
Package managers usually resolve dependencies, so you may want to consider using slapt-get (or other Slackware tools. I don't know since I don't use them), or another distro with a "better" package management system.
Dunno about the rest but I'm pretty sure that mencoder, mplayer, libmjpeg, libjack, and gdk-pixbuf-loaders(?) don't (based on a quick slocate on an installed Slackware machine). If it does, you REALLY want to check the versions properly, as well as any needed compilation options and patches.
Plus, you're probably talking about development headers, source etc. being available, not just the actual library itself (e.g. libtheora).
Dunno about the rest but I'm pretty sure that mencoder, mplayer, libmjpeg, libjack, and gdk-pixbuf-loaders(?) don't (based on a quick slocate on an installed Slackware machine). If it does, you REALLY want to check the versions properly, as well as any needed compilation options and patches.
Plus, you're probably talking about development headers, source etc. being available, not just the actual library itself (e.g. libtheora).
The headers won't be a problem in Slackware, as all official packages include the headers (so we don't have -devel packages in Slackware). From that list, Imagemagick, gtk, perl, libjpeg, sox, python, libtheora, SDL should be there already (and probably cdda2wav, too). You can grab one of the old official XMMS packages and install it on 12.1. mplayer and mencoder are the same thing, i.e. mencoder is part of mplayer and they easily compile on Slackware (if you still don't want to bother, there are packages or buildscripts out there). That leaves us with libmjpeg-tools, libjack and gdk-pixbuf-loaders(?). I think there are packages/scripts for libjack, too, and the others shouldn't be a problem.
One of the things I like about Slackware is that since all the packages include headers and come with unpatched, vanilla versions of the software, compilation of new software is almost always a painless issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.