Tuesday, October 13, 2015

I Used Shell to Alter Grub

World of Warcraft forced me to learn to fix my computer.



That's right.

So, my computer died last week. Kaput. After much fiddly research, a friend of mine who understands grub and sectors and so forth, pointed out that the errors I was receiving were related to a corrupted sector. We checked and sure enough my hard drive had been totally corrupted. We decided it was time for me to move to SSD. I installed a new SSD, reinstalled Ubuntu 14.04, and commenced with installing my favorite softwares. This is where WoW comes in. I reinstalled Wine 1.7 and proceeded to run the download executable for WoW. When it finished, after many many many many hours of waiting, I tried going in to play.

Uh oh.

All of my text was a garbled mess. Basically unreadable. This only happened now, because in the 6.2 patch of WoW they added some options for anti-aliasing. For some reason, that really messes with the graphics card if you're not using proper drivers for it. After a few searches I found that my Nvidia Geforce GT610 graphics card was not using proprietary drivers in Ubuntu. Instead Ubuntu had kindly assigned an open source driver to use. This might be nice, but for my gaming, I think it's a waste of a graphics card not to get the full experience, plus, you know, garbled text. So I trotted over to Nvidia online and downloaded the latest driver for my card. Then I rebooted.

Uh oh.

Upon reboot, the computer would pass my motherboard flash screen and then head to a blank screen and display this error: "ACPCI PCC probe failed" along with several lines of other failure information. Then it wouldn't move beyond that screen. Thinking I had botched something, I proceeded to reinstall Ubuntu. I reinstalled my software except for Wine and WoW. Then I did more research and found that some people recommended disabling FXAA on the graphics card. For the life of me I never found where I could do that. After multiple restarts and grabbing the motherboard menu, I would find the graphics card settings but nothing seemed to make sense for FXAA enabling or disabling. More research and I found that I could go into System Settings, Software and Updates, then to the Additional Drivers tab. I found several drivers listed for my graphics card, including the Ubuntu open source driver being used. I thought, "Well if they have these here, and they recognize them, then they must be safe. So I chose the one which said "current" and restarted.

Uh oh.

Once again I got the ACPCI error and no boot beyond that. This time, instead of reinstalling I Googled the error message on my laptop and found the following solution.

First, you need to boot in Recovery Mode. To do this you hold the shift key down when rebooting. You must however, wait till you pass the motherboard flash screen if you have one, otherwise it will just hang there. As soon as the flash screen is gone hold down the shift key and keep holding till you get a horrendous colored purple screen with a boot menu.

Choose Advanced Options for Ubuntu. On the next purple Barney screen, move the cursor to highlight the option with Recovery Mode in the line, but DO NOT enter. Instead hit 'e'. You first must alter the recovery mode boot script to boot into a read-write file system instead of the default read-only. Hitting 'e' will bring you to a screen with a short script. Find the line that starts like this: "linux    /boot/vmlinuz..." in that line you will notice "ro". Scroll to that and change that to "rw". Now hit F10 to continue the boot. This will bring you to another option menu. Here you will choose "root    Drop to root shell prompt". Now you are in a shell terminal where you have all the power. Muhahahaha. I Love Terminal!

Now the fun begins. You are going to use a text editor to edit your /etc/default/grub file. I used nano, only because I didn't have vim installed, usually I use vim. Pick whichever you're used to. If you've never done this before, use vim. The command is "vim /etc/default/grub".
Now you're going to scroll down through the text that pops up till you get to this line: 'GRUB_CMDLINE_LINUX_DEFAULT "quiet splash"'. Change that "quiet splash" to "quiet splash nomodeset". To do this, you must hit the 'i' key in order to insert text. Once you've entered your text, hit the escape key. Now type ":wq!". This tells the editor to force a write of the text you enterd and then quit. To check that your editing worked, now type the command "cat /etc/default/grub". This will show you the file you were just in. Check that the line you altered really has been altered. If not, go back in and try again. If it's good to go, now you MUST update grub. Type "update-grub". You are rockin' it. Now we get to do a restart ("shutdown -r now"). Type that. Go on, it's ok.

Your computer should restart and move it's way right past that ACPCI error screen. Once back inside your computer, your proprietary driver for the graphics card should work. Go open your favorite game. When I went back into World of Warcraft, not only was my text readable, but the graphics were gorgeous and my framerate was astounding. To think I'd been living with substandard graphics on a nice card...guh.