Howto rescue broken gui ?

General support questions
User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Howto rescue broken gui ?

Post by bluegroper » 2018/10/20 23:27:22

Hi forum
Long story short. Recent abrupt power failure has broken my system.
I can boot up using multi-user.target (aka runlevel 3) ok.
But when I change to graphical.target (aka runlevel 5) just black screen only.

So, I'm thinking I should cleanly re-install all the graphical packages, including KDE.
Please, what is the-right-way to do this ?
Or, is there a-better-way to recover my gui ? :?:

TIA's for any tips or clues.

User avatar
TrevorH
Forum Moderator
Posts: 23879
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Howto rescue broken gui ?

Post by TrevorH » 2018/10/21 02:29:43

Look for errors in /var/log/Xorg.0.log
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Re: Howto rescue broken gui ?

Post by bluegroper » 2018/10/21 03:46:07

TrevorH wrote:
2018/10/21 02:29:43
Look for errors in /var/log/Xorg.0.log
There's nothing obvious (to me) in the log to indicate any problem/s.
Should I post the entire log file, or is that a bit rude ?

Actually, when running graphical.target the screen is grey (not black), and the mouse moves across the screen, but there's no ability to login.
Alt-F2 not working. (I use that a lot.)
Wait. I've now got a blue screen. Like a windoze BSOD, but I'm not using windoze.
Last edited by bluegroper on 2018/10/21 05:55:40, edited 1 time in total.

User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Re: Howto rescue broken gui ?

Post by bluegroper » 2018/10/21 05:06:28

Hoping I won't need to re-install the whole CentOS just to recover the gui. That would be a significant PITA.

hunter86_bg
Posts: 1422
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Howto rescue broken gui ?

Post by hunter86_bg » 2018/10/21 08:05:52

One approach is to check the consistency of the packages and check if any binaries are with wrong MD5 or configs altered that are not supposed to.
So:
1. Filesystem repair from Rescue Media
2. Verify packages:

Code: Select all

for package  in $(rpm -qa | sort); do echo "checking package: $package"; rpm -V $package;echo;echo; sleep 1; done
Be sure that all binaries are OK.
3. Get all packages from yum's group

Code: Select all

yum groupinfo 'Server with gui'
Then just run:

Code: Select all

yum reinstall package1 package2... packagen
Edit: there is a typo in the rpm verification command -> should be 'rpm -V'
Last edited by hunter86_bg on 2018/10/22 03:27:30, edited 1 time in total.

User avatar
TrevorH
Forum Moderator
Posts: 23879
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Howto rescue broken gui ?

Post by TrevorH » 2018/10/21 13:33:42

rpm -Va also works though doesn't tell you which file belongs to which package quite so easily.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Re: Howto rescue broken gui ?

Post by bluegroper » 2018/10/21 20:44:00

hunter86_bg wrote:
2018/10/21 08:05:52
One approach is to check the consistency of the packages and check if any binaries are with wrong MD5 or configs altered that are not supposed to.

Code: Select all

for package  in $(rpm -qa | sort); do echo "checking package: $package"; rpm -v $package;echo;echo; sleep 1; done
Thanks for the suggestion. I'll try this tomorrow.
For anyone else interested in this thread (and for posterity), rpm -V works better than rpm -v ;)

User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Re: Howto rescue broken gui ?

Post by bluegroper » 2018/10/22 01:15:58

Ok, after checking all the rpm packages, here's the output below, made using

Code: Select all

# for package in $(rpm -qa | sort); do rpm -V $package >> /tmp/rpm.log 2>&1 ; done & 
For clarity/brevity I deleted all the d=documentary lines
Is there any package/s obviously needing attention to bring the gui back to life ?
Sadly, I'm fearing a fresh "bare-metal" re-installation may be the undesired solution.
TIA's

Code: Select all

S.5....T.  c /etc/abrt/abrt.conf
S.5....T.  c /etc/yum.repos.d/adobe-linux-x86_64.repo
S.5....T.  c /etc/sysconfig/authconfig
.....UG..  g /var/run/avahi-daemon
..5....T.  c /etc/bluetooth/main.conf
.M.......  g /etc/pki/ca-trust/extracted/java/cacerts
.M.......  g /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
.M.......  g /etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem
.M.......  g /etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem
.M.......  g /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
S.5....T.  c /etc/yum.repos.d/CentOS-Base.repo
S.5....T.  c /etc/crontab
S.5....T.  c /etc/cups/cups-browsed.conf
S.5....T.  c /etc/yum.repos.d/epel.repo
S.5....T.  c /etc/freetds.conf
S.5....T.  c /etc/gdm/custom.conf
missing     /var/run/gluster
.M.......  c /etc/sysconfig/kernel
.......T.    /usr/lib/systemd/system/hddtemp.service
S.5....T.  c /etc/httpd/conf/httpd.conf
.M.......  g /var/log/dmesg
.M.......  g /var/log/dmesg.old
.M.......  g /var/lock/iscsi
.M.......  g /var/lock/iscsi/lock
.M.......  g /boot/initramfs-3.10.0-862.11.6.el7.x86_64.img
.M.......  g /boot/initramfs-3.10.0-862.14.4.el7.x86_64.img
.M.......  g /boot/initramfs-3.10.0-862.3.3.el7.x86_64.img
.M.......  g /boot/initramfs-3.10.0-862.6.3.el7.x86_64.img
.M.......  g /boot/initramfs-3.10.0-862.9.1.el7.x86_64.img
.......T.  c /etc/hba.conf
.M....G..  g /run/lsm
.M....G..  g /run/lsm/ipc
S.5....T.  c /etc/sysconfig/lm_sensors
S.5....T.  c /etc/logrotate.conf
S.5....T.  c /etc/mailcap
S.5....T.  c /etc/mime.types
S.5....T.  c /etc/minidlna.conf
S.5....T.  c /etc/monitorix/monitorix.conf
S.5....T.  c /etc/NetworkManager/NetworkManager.conf
.......T.    /etc/yum.repos.d/nux-dextop.repo
S.5....T.  c /etc/ssh/sshd_config
.M.......  g /var/lib/PackageKit/transactions.db
....L....  c /etc/pam.d/fingerprint-auth
....L....  c /etc/pam.d/password-auth
....L....  c /etc/pam.d/postlogin
....L....  c /etc/pam.d/smartcard-auth
....L....  c /etc/pam.d/system-auth
....L....  c /etc/pam.d/fingerprint-auth
....L....  c /etc/pam.d/password-auth
....L....  c /etc/pam.d/postlogin
....L....  c /etc/pam.d/smartcard-auth
....L....  c /etc/pam.d/system-auth
.......T.    /usr/share/perl5/vendor_perl/XBase/SQL.pm
S.5....T.  c /etc/yum.repos.d/pgdg-93-centos.repo
S.5....T.  c /etc/yum.repos.d/pgdg-95-centos.repo
S.5....T.  c /etc/php.ini
missing     /var/run/pulse
S.5....T.  c /etc/rsyncd.conf
S.5....T.  c /etc/samba/smb.conf
.M.......  g /etc/selinux/targeted/active/policy.linked
S.5....T.  c /etc/selinux/targeted/contexts/customizable_types
.M.......  g /etc/selinux/targeted/modules/active/modules/docker.pp
S.5....T.  c /etc/printcap
S.5....T.  c /etc/smartmontools/smartd.conf
S.5....T.  c /etc/sudoers
.M.......  c /etc/machine-id
SM5....T.  c /etc/rc.d/rc.local
.M.......  g /etc/udev/hwdb.bin
.M.......  g /var/lib/systemd/random-seed
S.5....T.  c /usr/share/texlive/texmf/tex/generic/config/language.dat
S.5....T.    /usr/share/texlive/texmf/tex/generic/config/language.def
S.5....T.  c /usr/share/texlive/texmf/web2c/fmtutil.cnf
..5....T.    /usr/share/texlive/texmf-dist/web2c/updmap.cfg
S.5....T.  c /usr/share/texlive/texmf/web2c/updmap.cfg
S.5......  c /var/lib/unbound/root.key
S.5......  c /var/lib/unbound/root.key
S.5......  c /etc/odbcinst.ini
S.5......  c /etc/odbcinst.ini
S.5....T.  c /etc/sysconfig/wpa_supplicant
missing     /var/run/wpa_supplicant
.M.......  g /var/log/xrdp.log
S.5....T.  c /etc/yum/yum-cron-hourly.conf
S.5....T.  c /etc/yum/yum-cron.conf

hunter86_bg
Posts: 1422
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Howto rescue broken gui ?

Post by hunter86_bg » 2018/10/22 03:31:08

I don't see anything critical.
Next step would be to reinstall the packages from the yum group 'Server with gui'.

User avatar
bluegroper
Posts: 219
Joined: 2005/09/07 23:04:21
Location: .au

Re: Howto rescue broken gui ?

Post by bluegroper » 2018/10/22 05:48:05

I've just noticed :

Code: Select all

# yum goup info x11 
indicates that initial-setup-gui is a mandatory package, but its not installed.
When I'm back at the other location, I'll (re)install and test, and work thru others.

Thanks for your helps.

Post Reply