LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to recover from a botched graphics card driver install (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-recover-from-a-botched-graphics-card-driver-install-4175533289/)

JustAnotherHuman 02-06-2015 02:06 PM

How to recover from a botched graphics card driver install
 
OK,

Lastnight I decided to finally attempt to install the dedicated ATI/AMD Catylist drivers. After all I was successfull with the HP drivers, right...

No matter which grub selection I make, getting in is broken, except of course for the Windows XP Pro x64 entry, that works just fine. I'm here with you today, because of the Fedora 21 Live DVD, (slooooww).

Here is the drivers log file:

==========================================================
Supported adapter detected.
Check if system has the tools required for installation.
Uninstalling any previously installed drivers.
Unloading radeon module...
rmmod: ERROR: Module radeon is in use
Unloading drm module...
rmmod: ERROR: Module drm is in use by: ttm drm_kms_helper radeon
[Message] Kernel Module : Trying to install a precompiled kernel module.
[Message] Kernel Module : Precompiled kernel module version mismatched.
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.18.3-201.fc21.x86_64/build SUBDIRS=/usr/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory '/usr/src/kernels/3.18.3-201.fc21.x86_64'
CC [M] /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6396:12: warning: ‘KCL_fpu_save_init’ defined but not used [-Wunused-function]
static int KCL_fpu_save_init(struct task_struct *tsk)
^
CC [M] /usr/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
/usr/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c: In function ‘KCL_ACPI_Slot_No_Hotplug’:
/usr/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:845:21: error: ‘struct acpi_device_flags’ has no member named ‘no_hotplug’
tdev->flags.no_hotplug = true;
^
scripts/Makefile.build:257: recipe for target '/usr/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o' failed
make[2]: *** [/usr/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o] Error 1
Makefile:1385: recipe for target '_module_/usr/lib/modules/fglrx/build_mod/2.6.x' failed
make[1]: *** [_module_/usr/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory '/usr/src/kernels/3.18.3-201.fc21.x86_64'
Makefile:88: recipe for target 'kmod_build' failed
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
[Reboot] Kernel Module : dracut
==========================================================

I just rebooted without attempting to configure the card, as per the ATI/AMD warning stating that it's important to do so, because my thinking was derailed due to seeing errors, and the install program said I needed to reboot. Afterall, I just couln't believe that with a "Failed to compile kernel module" error, it would actually keep the changes I'd made, that surely Linux had a failsafe in place for such circumstances. In other words, I'm also a newbie, and just don't know how many hoops of fire one has to jump through to be at peace with linux.

Can anyone please help be get back into my install, I've already set up so many things, there's just got to be a way, right?


Thanks in Advance!


JustAnotherHuman

mostlyharmless 02-06-2015 02:24 PM

I would mount the root file system under /mnt (on your live DVD), chroot into the system and uninstall the ATI/Catalyst driver. Something like, as root, assuming your root filesystem is under dev/sda1:

Code:

mount /dev/sda1 /mnt
cd /mnt
mount -t proc proc proc/
mount --bind /sys sys/
mount --bind /dev dev/
cd /
chroot /mnt
/usr/share/ati/fglrx-uninstall.sh

All of these need to be run as root, or with sudo. The last command may be different with Fedora, look at this http://www.if-not-true-then-false.co...Speed=noscript for example.

JustAnotherHuman 02-06-2015 03:19 PM

Quote:

Originally Posted by mostlyharmless (Post 5313207)
I would mount the root file system under /mnt (on your live DVD), chroot into the system and uninstall the ATI/Catalyst driver. Something like, as root, assuming your root filesystem is under dev/sda1:

Code:

mount /dev/sda1 /mnt
cd /mnt
mount -t proc proc proc/
mount --bind /sys sys/
mount --bind /dev dev/
cd /
chroot /mnt
/usr/share/ati/fglrx-uninstall.sh

All of these need to be run as root, or with sudo. The last command may be different with Fedora, look at this http://www.if-not-true-then-false.co...Speed=noscript for example.

OK, I'll try it, just please know that as a newbie, I don't know these commands very well, or the proper syntax. I'm actually a bit old, and have dealt with command lines over the years with Comm 64, thus C64 basic, Comm 128, thus CPM, Comm Amiga 1000, thus Amiga Basic, MS DOS 3.x thus GW Basic and up. Took intro to pascal, so I'm not totally intimadated by a text based interface. I just know that syntax has to be exact. I did download the latest Linux command pdf, but have only began to skim it's surface.

In this case I was hoping to find someone that's been there and done that, was once where I find myself ;)

So thanks for the help, I believe I understand it.

You're saying that while the Linux Live DVD is running, I can mount my linux installation on the HD, and uninstall the ATI drivers that are there, which should set up the default MESA driver configuration, right?
I'm just confused how the Live DVD will know that i'm dealing with another install of linux. But then I'm a newbie! ;)

Thanks very much for your time, I really do appreciate it!

Have a good day!


P.S. that last line "/usr/share/ati/fglrx-uninstall.sh" is in fact the correct path and filename, so you got it right! ;)



Update: OK sda1 happens to be an NTFS partition. Using the desktop file explorer program supplied with fedora it shows that all installed linux volumes are mounted (on HD), as well as the live volumes. So how do I chroot (change root) so as to run the uninstall program?

OK the sda naming scheme seems to be not used under this 'live' distrubution. When I use the file explorer, my installed Home partition is called "54 GB Volume". When I right click and select properties, it's "name" is some long string of alpha/numerics with dash's (-) thrown in from time to time, and the "volume" is still called "54 GB Volume". The same thing applies to the live partitions, they are called _Fedora-Live-WS- (both volume and name)

What do I need to do?

mostlyharmless 02-06-2015 03:57 PM

The syntax should work, and the "chroot" part is the part that makes the live distribution know it's on your installed system.

The long characters are probably the UUID, for example 75b654f6-0b39-4ae8-99ef-19520b732d2a

Whatever the name or mount point that the home file system is on will work. Type in "mount" or "sudo mount" and post your results. You should be able to substitute whatever the mount point is for "mnt" in my example above.

EDDY1 02-06-2015 04:06 PM

You don't have the option to boot into console?
There should be an Advanced Option at grub splash, just press the down arrow to scroll thru them.

To get partition list use
Quote:

sudo fdisk -l

JustAnotherHuman 02-06-2015 04:07 PM

Quote:

Originally Posted by mostlyharmless (Post 5313249)
The syntax should work, and the "chroot" part is the part that makes the live distribution know it's on your installed system.

The long characters are probably the UUID, for example 75b654f6-0b39-4ae8-99ef-19520b732d2a

Whatever the name or mount point that the home file system is on will work. Type in "mount" or "sudo mount" and post your results. You should be able to substitute whatever the mount point is for "mnt" in my example above.

1st result:

Quote:

[root@localhost liveuser]# mount /dev/sda1 /mnt
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
[root@localhost liveuser]#
Quote:

[root@localhost liveuser]# mount
sysfs on /sys type sysfs (rw,relatime,seclabel)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=4067268k,nr_inodes=1016817,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,seclabel)
devpts on /dev/pts type devpts (rw,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sr0 on /run/initramfs/live type iso9660 (ro,relatime)
/dev/mapper/live-rw on / type ext4 (rw,noatime,seclabel,data=ordered)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
tmpfs on /tmp type tmpfs (rw,seclabel)
varcacheyum on /var/cache/yum type tmpfs (rw,relatime,context=system_u:object_r:rpm_var_cache_t:s0,mode=755)
vartmp on /var/tmp type tmpfs (rw,relatime,seclabel)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=817468k,mode=700,uid=1000,gid=1000)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda6 on /run/media/liveuser/Disk0-Part2 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)
/dev/sda5 on /run/media/liveuser/Disk0-Part1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)
/dev/sda1 on /run/media/liveuser/Disk0-Part0 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)
/dev/sda3 on /run/media/liveuser/68199037-ad73-40e5-90d2-5153b032bc74 type ext4 (rw,nosuid,nodev,relatime,seclabel,stripe=4,data=ordered,uhelper=udisks2)
/dev/loop2 on /run/media/liveuser/disk type squashfs (ro,nosuid,nodev,relatime,seclabel,uhelper=udisks2)
/dev/loop0 on /run/media/liveuser/disk1 type squashfs (ro,nosuid,nodev,relatime,seclabel,uhelper=udisks2)
/dev/mapper/fedora-home on /run/media/liveuser/d716782b-27b8-4f11-ac2c-b5acb34901ab type ext4 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
/dev/mapper/fedora-root on /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37 type ext4 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
/dev/sdb5 on /run/media/liveuser/Disk1-Part3 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper= udisks2)
/dev/mapper/live-osimg-min on /run/media/liveuser/_Fedora-Live-WS- type ext4 (ro,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
/dev/mapper/live-base on /run/media/liveuser/_Fedora-Live-WS-1 type ext4 (ro,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
[root@localhost liveuser]#

JustAnotherHuman 02-06-2015 04:16 PM

Quote:

Originally Posted by EDDY1 (Post 5313254)
You don't have the option to boot into console?
There should be an Advanced Option at grub splash, just press the down arrow to scroll thru them.

To get partition list use

All the Grub options are broken, except the "Windows XP Pro x64" line.

Yes even the rescue line. I know, I tried them all.

But thanks for your time!

mostlyharmless 02-06-2015 04:30 PM

If I grok your mount output, then it would seem that

/run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37

is your installed 54 GB root filesystem.

If you type cd /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37 and then type ls, I presume you will see your filesystem? The list should start with bin, etc, boot sbin and friends..

If that is so, and usr is there as well, with the directory populated with the usual bin, sbin, lib64 and so forth, particularly share/ati/, then you should be able to execute the initial chroot commands by substituting in

run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37 every time I wrote mnt; ie
Code:

cd /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37
mount -t proc proc proc/
mount --bind /sys sys/
mount --bind /dev dev/
cd /
chroot /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37
/usr/share/ati/fglrx-uninstall.sh

Note there's no need to mount it since your Fedora live seems to have done that. While you're chrooted in you can do any other restorative or repair work from the command line. You can rerun grub, for example.

cynwulf 02-06-2015 04:39 PM

I don't see why you can't boot into single user mode...? I would try that before attempting to chroot in.

Just hit 'e' at the grub menu on the kernel command line you wish to edit. This should be the latest kernel, so should usually be at the top of the list and then add the following to the end of the line (don't remove stuff that's already there).

Code:

single modprobe.blacklist=fglrx
Don't fret too much about what you can change here as it will not survive the next reboot.

This should start the kernel in single user mode and will also blacklist any existing fglrx module from loading. You should then be able to remove fglrx/undo what you did, etc.

mostlyharmless 02-06-2015 04:54 PM

That sounds like good advice too.

JustAnotherHuman 02-06-2015 05:12 PM

Quote:

Originally Posted by mostlyharmless (Post 5313268)
If I grok your mount output, then it would seem that

/run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37

is your installed 54 GB root filesystem.

If you type cd /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37 and then type ls, I presume you will see your filesystem? The list should start with bin, etc, boot sbin and friends..

If that is so, and usr is there as well, with the directory populated with the usual bin, sbin, lib64 and so forth, particularly share/ati/, then you should be able to execute the initial chroot commands by substituting in

run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37 every time I wrote mnt; ie
Code:

cd /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37
mount -t proc proc proc/
mount --bind /sys sys/
mount --bind /dev dev/
cd /
chroot /run/media/liveuser/7603f734-a399-4a10-b68e-48455f99ea37
/usr/share/ati/fglrx-uninstall.sh

Note there's no need to mount it since your Fedora live seems to have done that. While you're chrooted in you can do any other restorative or repair work from the command line. You can rerun grub, for example.

Thanks for hanging in there with me, mostlyharmless. I really do appreciate it, I owe you! Initially with a nym such as yours I was a bit skeptical. I was just hoping I was getting the 'mostly' part out of you! ;)

Yes it worked! I'm back into my Linux install. Of course I've learned a few things today. Thanks, old "older than newbie!" ;)

The weird thing though is that originally, during boot up, there was this little teardrop shaped graphic that fills up with white until the end when it finally flashes the fedora "F" and you're in, that was changed to a bar, that eventually led to a lock up, after I botched the ati/catylist install, that has some how persisted, even though I'm in and it's working. Not that it's that big of a deal, either a teardrop shaped ball or a bar, but it does indicate that all was not reversed, I'm just hoping that enough was!

Yes there were a few errors during the uninstall as well, but I'm thinking it was ati's fault.

Again, thanks man!

One question though, am I right to assume that we bound the two dirs from the two installations that you believed would be required for the uninstall, namely "sys" and "dev"? That's my take; yes/no?

Later my friend!

JustAnotherHuman 02-06-2015 05:19 PM

Quote:

Originally Posted by cynwulf (Post 5313276)
I don't see why you can't boot into single user mode...? I would try that before attempting to chroot in.

Just hit 'e' at the grub menu on the kernel command line you wish to edit. This should be the latest kernel, so should usually be at the top of the list and then add the following to the end of the line (don't remove stuff that's already there).

Code:

single modprobe.blacklist=fglrx
Don't fret too much about what you can change here as it will not survive the next reboot.

This should start the kernel in single user mode and will also blacklist any existing fglrx module from loading. You should then be able to remove fglrx/undo what you did, etc.

Good to know! Actually that sounds kind of quicker, no need to boot the slow Fedora Workstation Live DVD.

Thanks man, I'll probably try and install the ati/catalyst drivers at a later date, once I figure out what went wrong, and I'll remember this just in case it fails again.

Thanks guys!

Later!

JustAnotherHuman

mostlyharmless 02-06-2015 05:23 PM

proc and sys are part of the running system (in this case the live DVD); if you want your chrooted system to reflect what the running kernel is using, you should bind them. Uninstall might have worked anyway; I'm not sure; it probably varies from uninstaller to uninstaller script.

Personally, I kind of liked it when uninstalling meant erasing the executable. ;)

JustAnotherHuman 02-06-2015 05:42 PM

Quote:

Originally Posted by mostlyharmless (Post 5313300)
proc and sys are part of the running system (in this case the live DVD); if you want your chrooted system to reflect what the running kernel is using, you should bind them. Uninstall might have worked anyway; I'm not sure; it probably varies from uninstaller to uninstaller script.

Personally, I kind of liked it when uninstalling meant erasing the executable. ;)

Yes I'm already experiencing the Pro's and Con's of the switch. I really like how fast I can switch between windows in gnome, as I do a lot of copy/cut and paste between windows. Then again MS Windoze is a lot more newbie friendly. But then it might just seem that way because of all the time I've devoted to it. We'll see once I've done the same with Linux; if I live that long. ;)


All times are GMT -5. The time now is 11:01 PM.