[SOLVED] Can't change boot choice in Grub menu. WHY?

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

[SOLVED] Can't change boot choice in Grub menu. WHY?

Postby quixote on Fri Aug 16, 2013 6:39 pm

I run LMDE Testing and installed Ubuntu Precise Pangolin in another partition to see whether it had improved at all. (No. ... ) It walked all over my Grub and put itself first in the boot order. I decided to deal with it, and nothing I try makes any difference! Yes, I'm running "sudo update-grub" after the changes. I'd like it to be a permanent solution so that updates don't push my preferred OS into another position.

Here's what I've tried: making an LMDE entry in /etc/init.d/grub/40_custom and then renumbering that to 08_custom. (Yes, I make it executable.) But I can't seem to get the syntax right. It keeps throwing errors at me and doesn't show up. Does anyone have an example of a simple entry that works? The install I'm trying to use is on sda6, so if I've understood right, that's (hd0,msdos6) in the new Grub2. My Grub is actually 1.99. Don't know if that makes a difference.

When that didn't work, I thought for the time being I'd at least point Grub at the entry I want, which is 9th after Ubuntu got done with it. I edited /etc/default/grub GRB_DEFAULT=9. But when I restarted, the choice was still defaulting to 0!

Huh? How is that even possible? Do I have to boot back into Ubuntu and make some sort of changes there? What the hell? Does anybody know what's happened?
Last edited by quixote on Fri Aug 16, 2013 11:01 pm, edited 1 time in total.
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Linux Mint is funded by ads and donations.
 

Re: Can't change boot choice in Grub menu. WHY?

Postby excollier on Fri Aug 16, 2013 6:59 pm

Try this (got it from Ubuntu Forum some time ago) works for me
Did you edit with superuser privileges?
Code:

sudo nano /etc/default/grub

And change
Code:

GRUB_DEFAULT=0

to something else for example
Code:

GRUB_DEFAULT=5

and finally run
Code:

sudo update-grub
Registered Linux user #557695
Here's a snippet of real excitement:
http://www.youtube.com/watch?v=kAPlnPtF ... 2cwvDhF-aw
http://www.youtube.com/watch?v=QflahNQMOgM
excollier
Level 4
Level 4
 
Posts: 291
Joined: Mon Oct 01, 2012 3:31 pm
Location: Way off centre.

Re: Can't change boot choice in Grub menu. WHY?

Postby quixote on Fri Aug 16, 2013 8:17 pm

Yes, I did. gksudo gedit or sudo nano depending on my mood. Good question, though. It could be one of those "Did you plug it in?" things that lead to a "D'Oh!" moment.
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Re: Can't change boot choice in Grub menu. WHY?

Postby caribriz on Fri Aug 16, 2013 8:34 pm

quixote wrote:I edited /etc/default/grub GRB_DEFAULT=9. But when I restarted, the choice was still defaulting to 0!


Just a thought ... did you save the file after editing it in LMDE, before running sudo update-grub?
I know I've forgotten to do it before. :roll:

Does the line in LMDE's /etc/default/grub still say GRUB_DEFAULT=9?
Image
Desktop: C2D E6400 / Asus P5LD2SE / 2GB ram / Asus GeForce 210 / 320GB (WinXP) & 1TB (Mint - various)
Laptop: Asus A53E-SX1455V - i5 2450M / 4GB ram / Intel HD 3000 / 500GB (Win7/Mint 13 Cinnamon)
caribriz
Level 5
Level 5
 
Posts: 786
Joined: Mon Nov 28, 2011 7:43 am

Re: Can't change boot choice in Grub menu. WHY?

Postby quixote on Fri Aug 16, 2013 9:15 pm

Yup, I did save it, and did run sudo update-grub afterwards, and it's still defaulting to 0!

One thing I notice as I'm running through the grub boot process again: it's grub version 1.99-21ubuntu3.10. :?: That sure isn't my original lmde grub.

What's involved in reinstalling grub if you have a working system? I mean, can I just run a command in the terminal? Everything I see on the web is about how to recover from system problems.
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Re: Can't change boot choice in Grub menu. WHY?

Postby quixote on Fri Aug 16, 2013 10:33 pm

Oh, aargh. Today is my day for being an absolute idiot.

https://help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2_from_a_Working_System:
Code: Select all
sudo grub-install /dev/sdX  # Example: sudo grub-install /dev/sda


Anyway, after I get that done, I'll see whether that solves my other problems.
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Re: Can't change boot choice in Grub menu. WHY?

Postby quixote on Fri Aug 16, 2013 11:01 pm

Yup. Problem solved.

I knew all about having to rebuild your computer after a Windows install, but after a linux distro? :shock:
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Re: [SOLVED] Can't change boot choice in Grub menu. WHY?

Postby kurotsugi on Sat Aug 17, 2013 5:24 am

well...you actually have two grub. one in your lmde partition and the other one in ubuntu partition. first of all we need to know which files you've been modified. if you modify the one in lmde partition then anything you did wont work since the grub interface in mbr is linked to grub in ubuntu partition. to modify the grub you'll need to login to ubuntu then customize the grub conf files. or else, you can rewrite your mbr to make it linked to your lmde's grub by reinstalling it from lmde just like what you've did.
kurotsugi
Level 5
Level 5
 
Posts: 702
Joined: Fri Jan 25, 2013 3:54 am

Re: [SOLVED] Can't change boot choice in Grub menu. WHY?

Postby quixote on Sun Aug 18, 2013 4:53 pm

Interesting. So my hunch that I had to boot into Ubuntu and make changes there wasn't that far off. I looked at /boot/grub/grub.cfg and if I understand it right, it also provides a template for how to manually edit the files in /etc/init.d/grub/. Useful for the future :D .
quixote
Level 1
Level 1
 
Posts: 49
Joined: Fri May 06, 2011 12:38 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 3 guests