I made a BIG MISTAKE!(SOLVED!!!)

Questions about applications and software
Forum rules
Before you post please read this

I made a BIG MISTAKE!(SOLVED!!!)

Postby lmx on Mon Mar 11, 2013 11:38 pm

Hi guys...

I not not so well, right now... :shock:

In an atempt to run Valgring...with a lot of changes, and tired...i have PURGED one package that with it and been removed more 5 packages...

this is the sh*it I have done...

sudo apt-get purge libc6-amd64:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libibverbs1 libnuma1 libopenmpi1.3 libtorque2
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
lib64gcc1:i386* lib64gomp1:i386* lib64itm1:i386* lib64quadmath0:i386* libc6-amd64:i386*

0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 10.7 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 294672 files and directories currently installed.)
Removing lib64itm1 ...
Purging configuration files for lib64itm1 ...
Removing lib64gcc1 ...
Purging configuration files for lib64gcc1 ...
Removing lib64gomp1 ...
Purging configuration files for lib64gomp1 ...
Removing lib64quadmath0 ...
Purging configuration files for lib64quadmath0 ...
Removing libc6-amd64 ...
dpkg (subprocess): unable to execute installed post-removal script (/var/lib/dpkg/info/libc6-amd64.postrm): No such file or directory
dpkg: error processing libc6-amd64 (--purge):
subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
libc6-amd64
E: Problem executing scripts DPkg::Post-Invoke '/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 1 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null'
E: Sub-process returned an error code
E: Sub-process /usr/bin/dpkg returned an error code (1)


is there any chance to get back my computer???
is doesn't recognize a lot of commands...like one i need so much...apt-get
a lot, ...ls,etc...the desktop doesn't work...

At the beginning i have jumped in /var/apt/cache/archives...to install again this package...but i don't have apt,aptitude, dpkg...........................
I think i can't restart the computer because if i do this...it never comes up...

I ask you guys some attention,PLEASE, to try to figure out how to solve this big problem....vi doesn't work...i have to much things installed in this computer...OMG:::

thanks a lot in advance.
The computer will stay turned ON...

regards
Last edited by lmx on Wed Mar 13, 2013 1:18 pm, edited 3 times in total.
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Linux Mint is funded by ads and donations.
 

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!

Postby zerozero on Tue Mar 12, 2013 1:17 am

my friend, unfortunately i don't see way out of that.
not only libc6 is a basic low-level library upon which basically the all system depends but also without apt/dpkg i don't way to fix the damage.
usually there's always a way to fix things, i'm afraid in this situation it's not like that.

the only realistic advice i can give you is: rescue the data you can't lose to an external hdd/usb (if copying fails you can do it from a live session of any iso)

good luck.
zerozero
Level 16
Level 16
 
Posts: 6471
Joined: Tue Jul 07, 2009 2:29 pm

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!

Postby bigj231 on Tue Mar 12, 2013 1:36 am

Zerozero's advice is what I would recommend as well. Then reinstall your system. You can also try booting into a live environment and chrooting into your install, but there is no guarantee that you could/would fix anything there. There is a good possibility of making things worse, especially messing around with dpkg.

In the future: don't purge unless remove doesn't work. And most importantly: make sure you really mean it when you run anything as root. Hopefully you've learned how not to do it next time. :)
Good luck with your system.
Running on a 4-slot toaster @ 60Hz
User avatar
bigj231
Level 5
Level 5
 
Posts: 793
Joined: Fri Feb 26, 2010 10:16 am
Location: Middle of Nowhere

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!

Postby lmx on Tue Mar 12, 2013 12:46 pm

Zerozero:
Thanks man,
I can't copy anything,the majority of command have been lost :( , but i can use another operating system or a livecd...but in this case I have to turn off the machine, and if I turn it off...I know...it will never come UP. :(

bigj231:
Thanks, for the help...I will follow the advise of ZeroZero, but before that i need to try something...do you think that using a livecd i can replicate the libraries to my target machine??

using for example:
updatedb
locate libc6-amd64:i386

Are this libraries compiled in the target machine??i don't know if it is safe?There are any chance to brake the hardware, maybe??
If this happens to you how do you try to solve this mess?




I think that the problem stays in the name of the package..

in Multiarch...if I understood it correctly, when you have :i386 is for arch i386...but I'm in a amd64 arch...
When i tried to configure right Valgrind...i find a clue in the sometimes not so friend google... :( someone have a problem closest to mine...but only compiling for 32 bits ...

So to figure out i tried to remove libraries for i386 that maybe conflicting with amd64 libraries...well...i stay in a point that I have removed the libraries above...but its strange libc6-amd64:i386 seems to be a i386 library???!why my amd64 system is gone??

Is there any chance to copy the files from another amd64 machine to this one??

for example using:
updatedb
locate libc6-amd64:i386

and copy any entry given by the above command to the disk attached via usb for example??
I don know how ...does any one know??Are this libraries compiled for a target machine??

Guys at this moment, i have a very open mind about your ideas,...please fill free to share your opinions...if you can do that. :oops:

Thanks for the help guys , and sorry my bad English.

regards
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!

Postby zerozero on Tue Mar 12, 2013 1:05 pm

i don't believe much that this will work, anyway i don't see other option

first and absolutely fundamental: you have to find out exactly the version of dpkg that is broken

then follow this http://www.debianhelp.co.uk/debianproblem.htm What to do if the dpkg command is broken (the proper link http://qref.sourceforge.net/quick/ch-pa ... tml#s6.3.7)
in the pool you have to pick the same exact version, this is what i have
Code: Select all
~ $ apt policy dpkg
dpkg:
  Installed: 1.16.9
  Candidate: 1.16.9
  Version table:
 *** 1.16.9 0
but is possible that you have something different

then (if you make dpkg work) reinstall libc6

the questions you have about multiarch and the i386 and amd64 versions of the same package might be relevant to find out why valgring didn't work properly but have nothing to do with your system before that;
wording this differently: in a multiarch system is normal to have i386 and amd64 versions of the same lib (and even amd64:i386)
Code: Select all
~ $ apt policy libc6-amd64:i386
libc6-amd64:i386:
  Installed: (none)
  Candidate: 2.13-37
  Version table:
     2.13-37 0


if the above doesn't work, i'm sorry.
zerozero
Level 16
Level 16
 
Posts: 6471
Joined: Tue Jul 07, 2009 2:29 pm

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!

Postby lmx on Wed Mar 13, 2013 1:05 am

Hi Guys,

Hell Yahhh...I have my system Back!!!! 8) (yesterday i start to feel that I am the worst person in the world...Now...this filing have disappeared).

Tomorrow, i Will post how i have solved the problem(now...5:08 oclock of the morning :( )

A big thanks to bigj231, and a very very special THANKS to zerozero(this man would not let me die alone, and offered me some guidance, which helped me solve my problem). :wink:

I wish you the best in your life ;)

Regards

PS.Sorry my English
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Re: In an attempt to run Valgrind...i made a BIG MISTAKE!(SO

Postby lmx on Wed Mar 13, 2013 1:16 pm

Hi guys...

When i rebooted the system, and when switching from initramfs to my real system...the init process have not been created(the system was unable to find init)...a received a kernel panic...i have done the following:

I have followed the link posted by zerozero...
http://www.debianhelp.co.uk/debianproblem.htm

the section "What to do if the dpkg command is broken"...it serves to any package...(Maybe NOT to all, but for a great amount of packages)

I have setup a live-usb system with debian LMDE...

I have mounted the disc with my Operating system in /media/LMDE

then, downloaded all the packages I need(accidentally removed) from http://www.debian.org/distrib/packages :

one at a time...

ar x package_name.deb ,it will extract 3 files...we want the data.tar.gz

moved this file to the root of my system(/media/LMDE...i have mounted it first)
and...
tar xzfv data.tar.gz ...it will extract the files inside to the correct locations with correct permission(I think)...remember its a tarball file ;)

I have done this to all the packages....(i have inclusive done it for dpkg package...seeing the apt policy from zerozero).

After this...reboot with my system.. :D

With all the files in the system, now the system goes up...but the dpkg...doesn't know that the files are installed(they are not in their database).

so i have checked(one by one), for example, in my case:

dpkg -l | grep -i libc6-amd64

rc libc6-amd64 2.13-37 i386 Embedded GNU C Library: 64bit Shared libraries for AMD64

it appears like marked to be removed(but it is manually installed), and are there config files

so i have installed it again...

apt-get install libc6-amd64:i386

i have done this to any package that i have installed manually...
after that check if everything is ok:

dpkg -l | grep -i libc6-amd64

ii libc6-amd64 2.13-37 i386 Embedded GNU C Library: 64bit Shared libraries for AMD64

like you can see the package have been marked to installation, and is installed successfully(ii).

Now I think is everything ok.


thanks to zerozero for the guidance ;)

regards

PS:Sorry my english
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby zerozero on Wed Mar 13, 2013 7:38 pm

lmx wrote:thanks to zerozero for the guidance ;)
you did it all 8) congratulations
zerozero
Level 16
Level 16
 
Posts: 6471
Joined: Tue Jul 07, 2009 2:29 pm

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby bigj231 on Wed Mar 13, 2013 9:54 pm

Nice job. You have much more perseverance than I. I would have just reinstalled. I think you'll be pretty well set for any other problems you encounter. :D
P.S. I trust you've now taken the time to make a system image or a full system backup?
Running on a 4-slot toaster @ 60Hz
User avatar
bigj231
Level 5
Level 5
 
Posts: 793
Joined: Fri Feb 26, 2010 10:16 am
Location: Middle of Nowhere

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby Orbmiser on Thu Mar 14, 2013 2:07 am

Kudo's to sticking with it and recovering it all.

Highly recommended tho is not to be lazy when living on the edge. Make mirror backups of your partitions before doing anything major to the system. Will save ton's or headaches and time in the future. Can use Clonezilla or Redo Backup (easier clonezilla) or other image backup programs. Also I store important data can't lose backed up to a external usb. So more than one copy.

Once I have a distro setup and installed with my software and tweaked to my liking. Then partitions get backed up to an external usb drive. Now can experiment and be back to a working distro in 20mins. Also reusing the same partitions can try out different flavors. Currently have Bodhi,Ubuntu 12.10,Funduntu,Voyager 12.10 xfce,Mint 14 Cinnamon & KDE backed up as well as my Win7 & Winxp partitions.

Now even if my HD dies the Big Gasp! can swap in a new HD and be back to full triple boot system in 30mins.
.
User avatar
Orbmiser
Level 7
Level 7
 
Posts: 1514
Joined: Thu Oct 18, 2012 5:16 pm
Location: Portland,Oregon

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby lmx on Thu Mar 14, 2013 12:51 pm

Hi Guys,
thanks ;)

I was very lucky, if not some people in this community, probably would not succeed in recovery ... because I had too much to lose if my operating system died...
In this situation, your head seems to explode...in a minute.

When you lost all configs you have, and you don't find a way to get it back...its complicated...but everything goes well now , thanks to zerozero ;)



bigj231:
"P.S. I trust you've now taken the time to make a system image or a full system backup?"


Orbmiser:
"Can use Clonezilla or Redo Backup (easier clonezilla) or other image backup programs."




Well...i think in making,online imaging...i don know yet the config i will use...

Situation 1:
I think that I will use rsync...i have a raspberry PI running all core services of my network:
DHCP
DNS(in progress)
printer server
scanner server
Nis+(in progress)

I think i will attach via USB a Harddisk to it...

The problem is that i don't know how long it can take to perform a differential backup(in a raspberry pi), in a 100Mb/s network...

My idea is...when my computer start...raspberry will start to make a differential backup, and I need to make some configs...to only shutdown if the backup is made...

Situation 2:
Using clonezilla or something, per week for example(...i will discover what make more sense).

thanks guys

regards

i don know what solution is best...
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby bigj231 on Thu Mar 14, 2013 5:44 pm

The best way I've found to make backups is to start them before I go to sleep and check them in the morning. If you have the hard drive space, make a local backup then send it over the network. Then you can just check the MD5 sums when you wake up.
Running on a 4-slot toaster @ 60Hz
User avatar
bigj231
Level 5
Level 5
 
Posts: 793
Joined: Fri Feb 26, 2010 10:16 am
Location: Middle of Nowhere

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby debianuser on Thu Jun 20, 2013 5:24 pm

Hi lmx,

a few days ago I made the same mistake during the cleanup after migrating my main system (Debian wheezy) to 64 bit (http://wiki.debian.org/Migrate32To64Bit). So I think I know how you felt. ;-)

In this case to get package files back into place you could have also used
Code: Select all
dpkg-deb -x package.deb mount_point_of_the_system
in your live system.

The problem was caused by bug #699206 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23699206).

To remove libc6-amd64:i386:

Boot into an alternative system and mount your system to, say /mnt

Code: Select all
cd /mnt/lib64
sudo rm ld-linux-x86-64.so.2
sudo ln -s /lib/x86_64-linux-gnu/ld-2.13.so ld-linux-x86-64.so.2

Now you can savely remove it from within your system:

Code: Select all
apt-get purge libc6-amd64:i386

Cheers,
Martin
debianuser
Level 1
Level 1
 
Posts: 1
Joined: Thu Jun 20, 2013 4:48 pm

Re: I made a BIG MISTAKE!(SOLVED!!!)

Postby lmx on Wed Jul 17, 2013 8:30 pm

Hi debianuser,

yes the glibc is dangerous in Debian...if we are not concentrated...bad things will hapend :x

that is a safer solution, that save time and maybe a lot of error typos ;)

I doesn't know that it was the problem... :S

Thanks for share, now we know how to solve the problem without even the need to create it... ;)

regards
tux
Regards
lmx
lmx
Level 1
Level 1
 
Posts: 43
Joined: Thu Jul 14, 2011 4:11 pm

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 2 guests