Editing GRUB on Ubuntu

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 7:33 am

I installed the latest distro of Ubuntu on my Gateway LT3103 laptop and immediately upon booting I get garbled graphics such that it is impossible to see what's going on with the display. I found a post that explains how to fix my exact problem but I need some help in figuring out exactly how to do it. That is, how do I edit the requisite file? I can't boot into the OS and find the config file to edit in a text editor since the graphics are garbled beyond recognition. I tried holding down SHIFT upon boot to get to the GRUB boot menu and then pressing 'e' to edit, but it doesn't look like that has what I want.

The mostly unfollowable-to-a-non-Linux-wiz instructions wrote:Edit /etc/default/grub and add nomodeset to GRUB_CMDLINE_LINUX.

Then run sudo update-grub


Any help in understand what I'm doing wrong and how to go about editing this particular text file is much appreciated!
Sheep Rustlers in the sky! <S> Slapt | <S> FUI | Air Warrior II/III
FireGryphon
Darth Gerbil
Gold subscriber
 
 
Posts: 7330
Joined: Sat Apr 24, 2004 7:53 pm
Location: the abyss into which you gaze

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 8:03 am

When you got into the Grub menu was there a recovery mode option? If so I'd try following the instructions here: https://wiki.ubuntu.com/RecoveryMode to drop into a root shell, and then edit the file.
way2strong
Gerbil
 
Posts: 31
Joined: Fri Jun 27, 2008 7:07 am

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 8:04 am

Assuming Ubuntu doesn't mess with grub and it's standard the next time you get to the grub screen hit "a" (append) and at the end of the line that you can edit type in "single" and hit enter. This will boot in single user mode with no GUI. I don't know if it will ask you for your root password before you get a prompt- distros are different.

If you can't append for whatever reason hit "e" again to edit and on the line that looks something like "ro quiet splash" append "single" to the end of it and then hit "F10" to boot. This should be a one time setting (not persistent).

Once you are in edit the file and then run "update-grub" as they say (you should already be root and not need to sudo).
Elsoze
Gerbil
 
Posts: 29
Joined: Tue Jun 29, 2010 6:57 am

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 8:12 am

Boot into rescue mode using the Ubuntu CD, mount the root partition and edit the file.
GodsMadClown
Gerbil
Silver subscriber
 
 
Posts: 91
Joined: Thu Feb 27, 2003 10:02 am

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 9:22 am

GodsMadClown wrote:Boot into rescue mode using the Ubuntu CD, mount the root partition and edit the file.


That would get the file edited but he wouldn't be able to run update-grub without doing more work. Its been a while since I had to do this sort of thing but IIRC you have to chroot before running update-grub which is probably more than a beginner wants to do :wink:

Anyway, can't he just add the "nomodeset" to the kernel line of the normal gui login and boot that way? Apart from anything else this would check whether this fixes the problem before going any further.

FireGryphon... in that grub menu that you've already found edit the line that's got quiet splash on it and just add nomodeset to the end of it. Then boot by pressing F10. This will revert next time you reboot so you've still got to edit the file and run update-grub. To do that:
- open a terminal window
- enter this command gksudo gedit /etc/default/grub
- put nomodeset in the quotes next to GRUB_CMDLINE_LINUX= and save the file.
- then use this command sudo update-grub and make a note if it says anything about errors

Another possibility is that despite the gui being garbled the text terminal is still working... when booted into the garbled gui press CTRL+ALT+F1 and see if you can login that way.
If you can then edit the file with:
sudo nano -w /etc/default/grub
(CTRL+o saves the file and CTRL+x closes the text editor)
then run:
sudo update-grub
and reboot

If nomodeset doesn't work then try removing splash (which causes the pretty splash screen to be shown during bootup as this often causes problems on buggy hardware).
Fernando!
Your mother ate my dog!
cheesyking
Minister of Gerbil Affairs
 
Posts: 2246
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 9:30 am

Can you get to a console with Ctrl+Alt+F2 after Ubuntu has finished booting? If the console is still working, you can login and edit the file with vim or nano.
Flatland_Spider
Gerbil Elite
 
Posts: 816
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539

Re: Editing GRUB on Ubuntu

Postposted on Wed Nov 21, 2012 5:45 pm

sweet, thanks guys
Sheep Rustlers in the sky! <S> Slapt | <S> FUI | Air Warrior II/III
FireGryphon
Darth Gerbil
Gold subscriber
 
 
Posts: 7330
Joined: Sat Apr 24, 2004 7:53 pm
Location: the abyss into which you gaze


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: Google Adsense [Bot] and 2 guests