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

Archived topics about LMDE 1 and LMDE 2
Locked
lmx

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

Post by lmx »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
zerozero

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

Post by zerozero »

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.
bigj231

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

Post by bigj231 »

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.
lmx

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

Post by lmx »

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
zerozero

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

Post by zerozero »

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.
lmx

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

Post by lmx »

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
lmx

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

Post by lmx »

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
zerozero

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

Post by zerozero »

lmx wrote:thanks to zerozero for the guidance ;)
you did it all 8) congratulations
bigj231

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

Post by bigj231 »

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?
Orbmiser

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

Post by Orbmiser »

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.
.
lmx

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

Post by lmx »

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...
bigj231

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

Post by bigj231 »

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.
debianuser

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

Post by debianuser »

Hi lmx,

a few days ago I made the same mistake during the cleanup after migrating my main system (Debian wheezy) to 64 bit ([url]http://wiki.debian.org/Migrate32To64Bit[/url]). 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 ([url]http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23699206[/url]).

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
lmx

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

Post by lmx »

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
Locked

Return to “LMDE Archive”