Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed and configured Debian 7.2 Wheezy AMD64 few days ago, I spent days configuring everything out and installing useful apps etc, so finally I tried to install Wine.
And what happened?
Dependency problem - libc6 is version 2.13 but it should be 2.17 to satisfy Wine. Unfortunately, there is no stable version available so I used sid to install libc6 2.17. It got installed, but, after finishing installation, all commands stopped working. I was unable to call any command, it just reports that command is NOT found. I thought that reboot may fix the problem, so I done hard-reboot and after GRUB menu it stucks:

switch_root can't execute '/sbin/init' no such file or directory
Kernel Panic - not syncing

And my Debian is now is in unusable state. I have Dual Boot with Windows 7 64-bit. I also have Debian 7.2 Wheezy AMD64 live on USB flash so I can use it for repair.

I do not have enough experience with Debian based distros to solve this. Can someone give me step-by-step guide?

share|improve this question

migrated from serverfault.com Feb 2 at 22:10

This question came from our site for professional system and network administrators.

2  
Somewhat off-topic, but how did you install Wine? I think it's weird it wouldn't work with the libc provided... As for the solution, normally I would advice chrooting into the installation with a liveCD, but I think you'll be getting the same error. You could try to copy all /lic/libc files from the live environment into the new system, and once you have it running, reinstall the proper libc. –  Halfgaar Feb 2 at 21:27
    
I tried to install latest version of Wine, not one from the repository. –  xZero Feb 2 at 22:01
3  
If you need to run a modern version of wine, it's probably best to do so on a distribution which already provides the necessary dependencies. Mixing and matching from different Debian versions is generally a recipe for disaster and should be avoided when possible. –  Michael Hampton Feb 2 at 22:11
    
The thing is that this method is worked on Debian 7 Wheezy x86.... So I didn't expected problems like this. –  xZero Feb 3 at 0:11
    
It will take some serious Linux chops to recover the Debian system so it works again (copying over a bunch of /lib/ files from a rescue CD to the broken system, removing cached ld files by hand, etc.) Is there any important data that would be lost if you reinstall? –  samiam Feb 3 at 0:35
show 2 more comments

1 Answer 1

To repair libc6, start your Debian-based rescue system from the USB flash, mount your broken system partition and prepare a chroot environment using

mount --bind /proc MOUNTPATH/proc 
mount --rbind /dev MOUNTPATH/dev
mount --bind /sys MOUNTPATH/sys

Download the libc6 2.13-38 package for your architecture (probably amd64) from http://packages.debian.org/wheezy/libc6 and install it using dpkg -root=MOUNTPATH PATH_TO_DEBFILE. Probably you need to add some --force- flags. See the man page of dpkg for details. If this does not work, you can extract files using dpkg-deb -X and then copy it to the correct folder and run ldconfig -r MOUNTPATH.

After this you should be able to chroot to MOUNTPATH and run update-initramfs -u to update your initrd. Now your system should boot again. The package dependencies are probably still broken and need to be fixed by uninstalling/downgrading packages.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.