Can't "update-grub"

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
jonnycat
Level 1
Level 1
Posts: 21
Joined: Wed May 09, 2012 12:26 am

Can't "update-grub"

Post by jonnycat »

Hi, I'm trying to change the default option in grub (Mint12, 64bit, KDE). I opened /etc/default/grub and changed "Default 0" to "Default 5" (for my WinXP installation)

When I go to do an "update-grub", I get the following error:

/etc/default/grub: 1: x#: not found

Any idea what is going wrong?
Last edited by jonnycat on Wed May 09, 2012 11:35 am, edited 1 time in total.

User avatar
Aging Technogeek
Level 13
Level 13
Posts: 4578
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Can't "update-grub"

Post by Aging Technogeek »

Try reducing the default from 5 to 4. Grub starts counting at 0 rather than 1 so the fifth entry by normal count will be the fourth entry by Grub count. If Your Windows entry is the last in a normal dual boot menu, setting the default to 5 would make Grub try to boot from a nonexistent entry, thus the "not found" error message.
Registered Linux User 483387

jonnycat
Level 1
Level 1
Posts: 21
Joined: Wed May 09, 2012 12:26 am

Re: Can't "update-grub" [SOLVED]

Post by jonnycat »

[edit] I solved this problem. The problem was that the first line in /etc/default/grub contained a character (x) before the comment/hash mark, which the "update-grub" was trying to process (hence the "x#:" in the error message). I removed the character before the commented out line, and I can now run update-grub with no problems. [edit]


I did try four, but I got the same error. Same with three, and same with 0, the default setting.

The reason I tried five originally is because I have six entries for grub:

LinuxMint12
LinuxMint12 recovery mode
Previous versions of Linux
Memtest
Memtest with serial console
WinXP

Anyone know why I am getting this error when I try to run "update-grub"?

Post Reply

Return to “Installation & Boot”