how to edit grub

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nichos

how to edit grub

Post by nichos »

I try to learn ubuntu 11.04.

Host is XP & dual boot 11.04.

Present boot default on boot menu is XP & then 11.04.

In XP's boot.ini I moved up Ubuntu above winXP but, now although the boot menu has first ubuntu then XP this is highlighted & boots 1st.

How do I make it to boot auto in Ubuntu ?.

Was given the instruction below, found "grub", which opened in Text Editorbut will not edit. Grite wont either.

How can I edit it please. .........thanx .......nick

"....Edit /etc/default/grub, find the line GRUB_DEFAULT=0 (usually line #4 I think), change the zero to four (or whatever) and then, in a terminal type sudo update-grub ...."
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29607
Joined: Wed Jul 06, 2011 3:58 am

Re: how to edit grub

Post by xenopeek »

When you turn on your computer, and you have to select which operating system to boot, is that the Windows bootloader or the Linux bootloader (GRUB)? Editing boot.ini only has use if you are using the Windows bootloader. Please have a look around the selection screen to see if there are some identifying words, marking it the Windows bootload, or GRUB.

If you are using the Windows bootload, in Windows cmd run the following:

Code: Select all

bootcfg /default /ID#
Where # is the startup-id number of the section operating systems in the file boot.ini that you want to have as default.

If you are using GRUB (the Linux bootloader), edit the file with the following (open Terminal application to run these commands):

Code: Select all

gksudo gedit /etc/default/grub
Then look indeed for the line "GRUB_DEFAULT=0" and either change the number to what you want, or change it to "GRUB_DEFAULT=saved" to have GRUB remember your selection from the previous boot. To effect the changes run:

Code: Select all

sudo update-grub2
Image
nichos

Re: how to edit grub

Post by nichos »

Tnank you,

the booting is:-

1st. gives two options, Windows or Ubuntu.

Selecting Win it gos to XP & selecting Ubuntu it gows in

2nd. menu has four ubuntu options & 2 Wins. No Nos are given.

I tried the "gksudo gedit /etc/default/grub" & "sudo update-grub2" but, makes no change & neither the " bootcfg /default /ID#" with #2 set does anything.

Where do I go wrong? ........nick
nichos

SOLVED.....Will stay with present bootloader

Post by nichos »

SOLVED

Thanks all for your paitence & help.

I understood by now that I do not have enough knowledge to deal with this.

Will stay with present bootloader & each time catch it to select ubuntu.
Locked

Return to “Installation & Boot”