Author Topic: [SOLVED] Recover or reinstall corrupted KDE?  (Read 2788 times)

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
[SOLVED] Recover or reinstall corrupted KDE?
« on: December 03, 2011, 11:15:17 AM »
My laptop battery died whilst I was working, and PCLOS now fails to boot. It gets as far as Xwindows, but then hangs halfway through loading KDE, no matter which user I log in as. I guess some KDE system files must have got corrupted...?

A physical HDD scan using the BIOS says there are no bad sectors; fsck reports clean.

Is there an easy way to recover the system from the command line? Or would it be better to reinstall PCLOS from CD?
« Last Edit: December 07, 2011, 02:16:55 AM by Texstar »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11561
  • ----IOFLU----
Re: Recover or reinstall?
« Reply #1 on: December 03, 2011, 11:29:13 AM »
My laptop battery died whilst I was working, and PCLOS now fails to boot. It gets as far as Xwindows, but then hangs halfway through loading KDE, no matter which user I log in as. I guess some KDE system files must have got corrupted...?

A physical HDD scan using the BIOS says there are no bad sectors; fsck reports clean.

Is there an easy way to recover the system from the command line? Or would it be better to reinstall PCLOS from CD?

Hard to tell with what little you've given us. What is the exact command you gave to fsck? Did you try to reset the ownership and permissions of your users $HOME directory? If so, in what manner?
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #2 on: December 03, 2011, 11:38:04 AM »
What is the exact command you gave to fsck?

fsck /dev/sda1 -r

It instantly reports clean

Did you try to reset the ownership and permissions of your users $HOME directory? If so, in what manner?

I haven't tried this. Should I? My home directory is on a separate partition, sda6. (fsck /dev/sda6 -r also reports clean).

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: Recover or reinstall?
« Reply #3 on: December 03, 2011, 11:55:19 AM »
What is the exact command you gave to fsck?

fsck /dev/sda1 -r

It instantly reports clean

Did you try to reset the ownership and permissions of your users $HOME directory? If so, in what manner?

If the filesystem on sda1 is an ext filesystem, the -r option is meaningless. Try
fsck -f /dev/sda1

Quote
I haven't tried this. Should I? My home directory is on a separate partition, sda6. (fsck /dev/sda6 -r also reports clean).
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11561
  • ----IOFLU----
Re: Recover or reinstall?
« Reply #4 on: December 03, 2011, 11:55:49 AM »
What is the exact command you gave to fsck?

fsck /dev/sda1 -r

It instantly reports clean

Did you try to reset the ownership and permissions of your users $HOME directory? If so, in what manner?

I haven't tried this. Should I? My home directory is on a separate partition, sda6. (fsck /dev/sda6 -r also reports clean).

From the liveCD, with all hard drive partitions unmounted, as root, try;

[root@localhost ~]# e2fsck -fy /dev/sda1              <Enter>

then;

[root@localhost ~]# e2fsck -fy /dev/sda6              <Enter>

Post your results, including prompt, command, and output.

Reboot to the hard drive installation, and try to log in again.

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #5 on: December 03, 2011, 12:25:20 PM »
Thanks for the replies, I'll try that now.

I've also found this in kdm.log, I don't know if it's relevant:
Code: [Select]
klauncher(3807) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit4: Communication error with launcher. Exiting!
kdmgreet(3801)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "Not connected to D-Bus server"

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #6 on: December 03, 2011, 02:51:08 PM »
I just tried old-polack's suggestion. Here are the results:

Code: [Select]
[guest@localhost guest]$ su
Password:
[root@localhost guest]# e2fsck -f /dev/sda1
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 159838/696320 files (0.4% non-contiguous), 1555825/2783253 blocks
[root@localhost guest]# e2fsck -f /dev/sda6
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda6: 54754/3293184 files (1.0% non-contiguous), 4808814/13159235 blocks
[root@localhost guest]#

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: Recover or reinstall?
« Reply #7 on: December 03, 2011, 03:33:09 PM »
I just tried old-polack's suggestion.

You didn't really. He also wanted you to use the -y option with e2fsck. But in your case that wasn't necessary. Both sda1 and sda6 seem to be all right. (Note that if you have an ext filesystem, running fsck is the same as running e2fsck: fsck will simply start e2fsck.)  :)

Quote
Here are the results:

Code: [Select]
[guest@localhost guest]$ su
Password:
[root@localhost guest]# e2fsck -f /dev/sda1
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 159838/696320 files (0.4% non-contiguous), 1555825/2783253 blocks
[root@localhost guest]# e2fsck -f /dev/sda6
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda6: 54754/3293184 files (1.0% non-contiguous), 4808814/13159235 blocks
[root@localhost guest]#

I'd start by renaming the directory ~/.kde4 (where "~" stands for "/home/<yourname>"), and if that doesn't help I'd reinstall kdebase4-core -- and if that doesn't help either, I'd reinstall most other parts of KDE.
« Last Edit: December 03, 2011, 03:38:00 PM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #8 on: December 04, 2011, 04:43:40 AM »
Thanks so much for taking the time to help with this. Unfortunately I'm still struggling...

I'd start by renaming the directory ~/.kde4 (where "~" stands for "/home/<yourname>"),
Code: [Select]
cd /home/jake
rename .kde4 .kde4_old .kde4
Then tried logging in as jake and booting KDE. It still hangs. (It also hangs if I log in as root and try and load KDE. I also created a new user, logged in using the new account, and still the same).

and if that doesn't help I'd reinstall kdebase4-core
Code: [Select]
apt-get install --reinstall kdebase4-core
Says it reinstalled 1 package successfully. Tried KDE again, unfortunately still the same.

Because kdm.log complains about not being able to find a running DBUS server (see above), I also tried:
Code: [Select]
apt-get install --reinstall kdm
apt-get install --reinstall dbus
Reinstalled successfully, but still KDE won't start.

and if that doesn't help either, I'd reinstall most other parts of KDE.
What's the best way of doing this? Do I have to use apt-get install --reinstall for every individual package name, or is there a quicker way?

Thanks again for your patience!

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: Recover or reinstall?
« Reply #9 on: December 04, 2011, 06:57:12 AM »
Thanks so much for taking the time to help with this. Unfortunately I'm still struggling...

I'd start by renaming the directory ~/.kde4 (where "~" stands for "/home/<yourname>"),
Code: [Select]
cd /home/jake
rename .kde4 .kde4_old .kde4

Try
Code: [Select]
mv .kde4 .kde4_oldinstead. (I don't know why your rename command didn't work. The syntax seems to be correct. Perhaps the permissions and ownership have changed, as O-P suspected. In that case the mv command may not work either before you've restored the correct ones.)

Quote
Then tried logging in as jake and booting KDE. It still hangs. (It also hangs if I log in as root and try and load KDE. I also created a new user, logged in using the new account, and still the same).

and if that doesn't help I'd reinstall kdebase4-core
Code: [Select]
apt-get install --reinstall kdebase4-core
Says it reinstalled 1 package successfully. Tried KDE again, unfortunately still the same.

Because kdm.log complains about not being able to find a running DBUS server (see above), I also tried:
Code: [Select]
apt-get install --reinstall kdm
apt-get install --reinstall dbus
Reinstalled successfully, but still KDE won't start.

and if that doesn't help either, I'd reinstall most other parts of KDE.
What's the best way of doing this? Do I have to use apt-get install --reinstall for every individual package name, or is there a quicker way?

Thanks again for your patience!
« Last Edit: December 04, 2011, 07:29:51 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #10 on: December 04, 2011, 07:54:47 AM »
I think my rename command did work: when I checked my home directory later, there was a new .kde4 directory that KDE had created, alongside the renamed .kde4_old directory. But despite this, KDE still failed to load.

So I think your earlier diagnosis is correct: I'm at the point where I should reinstall most parts of KDE. I just don't know how best to do that form the command line. Do you know if something along the lines of apt-get install --reinstall kde* would work?

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall?
« Reply #11 on: December 04, 2011, 08:53:37 AM »
My KDE is back! I started reinstalling every kde package manually, working from a list of packages on the livecd, and reinstalling kdelibs4 did the trick.

Thanks O-P and B-B for taking the time to help.

Offline jakevoelcker

  • Jr. Member
  • **
  • Posts: 27
Re: Recover or reinstall corrupted KDE?
« Reply #12 on: December 04, 2011, 09:36:37 AM »
... but it would appear I'm not quite out of the wood yet :(  A couple of apps fail to start where they previously worked fine. Chromium browser, for example, says:
Code: [Select]
[jake@localhost ~]$ chromium-browser
Segmentation fault
[jake@localhost ~]$

I've completely removed and then reinstalled the chromium-browser package in Synaptic, but no change. I then reinstalled every currently installed kde and gtk package I could find in Synaptic, but again it made no difference.

Is there any way to batch reinstall basically all packages in case several are corrupted?
« Last Edit: December 04, 2011, 09:49:54 AM by jakevoelcker »

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6377
  • I'm going South
Re: Recover or reinstall corrupted KDE?
« Reply #13 on: December 04, 2011, 11:03:23 AM »
... but it would appear I'm not quite out of the wood yet :(  A couple of apps fail to start where they previously worked fine. Chromium browser, for example, says:
Code: [Select]
[jake@localhost ~]$ chromium-browser
Segmentation fault
[jake@localhost ~]$

I've completely removed and then reinstalled the chromium-browser package in Synaptic, but no change. I then reinstalled every currently installed kde and gtk package I could find in Synaptic, but again it made no difference.


I'm glad you at least got KDE back.

Your Chromium segfaulting might be related to plankton172's problem here: http://www.pclinuxos.com/forum/index.php/topic,99423.msg843894.html#msg843894. So if you have an Nvidia card you might take Texstar's advice in that thread before you try anything else.

Quote
Is there any way to batch reinstall basically all packages in case several are corrupted?



I think a fresh install would be faster -- even if you have to adjust your settings afterwards.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Recover or reinstall corrupted KDE?
« Reply #14 on: December 04, 2011, 11:08:58 AM »
... but it would appear I'm not quite out of the wood yet :(  A couple of apps fail to start where they previously worked fine. Chromium browser, for example, says:
Code: [Select]
[jake@localhost ~]$ chromium-browser
Segmentation fault
[jake@localhost ~]$

I've completely removed and then reinstalled the chromium-browser package in Synaptic, but no change. I then reinstalled every currently installed kde and gtk package I could find in Synaptic, but again it made no difference.

Is there any way to batch reinstall basically all packages in case several are corrupted?


I think they call that a reinstallation from last ISO (or last remaster you possibly made)...
=> it's possible to list all installed packages in Synaptic; you can select first one, scroll to last one, and while <Shift> pressed in, click last one; then right click on the list and select an action....
I just think that this can generate problems; and it would be easier to do a fresh install in that case (and faster!)

Maybe someone has a suggestion (you could e.g. reset permissions of all files and folders in your home-directory to your user account);


For Chromium: does it help to remove the .chromium in your home-dir? (attention: backup of your bookmarks, preferences, ....?)
=> or try it in a different user account (see if it does start up there)