Page 1 of 1

Grub Boot Order [Solved]

Posted: Wed Jan 16, 2013 6:26
by Chompjil
Alright so I have Sabayon XFCE and Win7 64-Bit on my Pavalion p7-1007c, and on the the GRUB 2.88 Bootloader I want Win7 to be the first option and have the ability to edit the time in which i can select it. :mrgreen: Thanks! (also i wanst so sure where to put this)

Re: Grub Boot Order

Posted: Wed Jan 16, 2013 7:42
by Ryuno-Ki
So, please, post your grub.cfg:

Code: Select all

# cat /boot/grub/grub.cfg
Don't forget to backup your configuration files! (This way, you can restore them via LiveDVD if necessary).
For example:

Code: Select all

# cp /boot/grub/grub.cfg /boot/grub/grub-backup.cfg
and the same with other files you touch ;-)

Also, you probably want to read the following: Have a look at the Naming convention, too ;-)

Long story short: First, you run os-prober and check, wether your windows system is detected. In that case, you have to copy your custom menu entry (40_custom) with another prefix. Of course, you should check the content first ;-)
To change the time, you just need to change the value GRUB_TIMEOUT=5 in /etc/default/grub to whatever you like ("Delay before booting default menu entry. Set to 0 to wait indefinitely. Default is 5 seconds.").

Code: Select all

$ su
# cp /boot/grub/grub.cfg /boot/grub/grub-backup.cfg # just to be safe :)
# cat /etc/grub.d/40_custom # here should be your windows mentioned
# cp /etc/grub.d/40_custom /etc/grub.d/08_custom # or anything leading with 0, but not 00
# chmod -x /etc/grub.d/40_custom # disable the default entry so it isn't listed
# nano -w /etc/default/grub
# grub2-mkconfig -o /boot/grub2/grub.cfg # create new cfg
Good luck :twisted:
I've no windows on this box, so it's nothing tested :!:

Re: Grub Boot Order

Posted: Fri Jan 18, 2013 1:02
by Chompjil
When I typed the cat /boot/grub/grub.cfg it says no such file or directory, is it because I'm Im in recovery mode?

Re: Grub Boot Order

Posted: Fri Jan 18, 2013 11:57
by Ryuno-Ki
Err … I didn't cache why you boot in recovery mode …
It should work with normal login + becoming root.

Re: Grub Boot Order

Posted: Fri Jan 18, 2013 17:23
by sabayonino
Now to change the boot order, you need to change the GRUB_DEFAULT Entry, for example you have windows7 in the 3rd position and you want to set it as default, to do that set default to 3: GRUB_DEFAULT=3 in /etc/default/grub

then update grub

Code: Select all

# grub2-mkconfig -o /boot/grub/grub.cfg

Re: Grub Boot Order

Posted: Sun Jan 20, 2013 8:39
by Chompjil
Ryuno-Ki wrote:Err … I didn't cache why you boot in recov :| ery mode …
It should work with normal login + becoming root.
I'm having graphics issues right now and I can only get to the cl in recovery mode

Edit : before you ask, yes I tried alt + f1

Re: Grub Boot Order

Posted: Sun Jan 20, 2013 13:56
by Ryuno-Ki
Chompjil wrote:Edit : before you ask, yes I tried alt + f1
Err … it is Ctrl+Alt+F1 (or any other number between 1 and 6 …).

Then I'd suggest, you ask for help concerning your graphic problems in another thread and go on here later.

Re: Grub Boot Order

Posted: Sat Jan 26, 2013 7:34
by Chompjil
So I was ablr to edit the grub but the grub2-mkconfig -o /boot/grub/grub.cfg didnt work

Re: Grub Boot Order

Posted: Sat Jan 26, 2013 12:07
by linuxfluesterer
Could you pls try to press the following keys:
Ctrl Alt (keep both pressed) and then F1 function key?
Then login as root.
Then type:

Code: Select all

grub2-
followed by the <Tab> key (left from the letter 'q')
You should see a list with all commands beginning with 'grub2-'.
And you should find

Code: Select all

grub2-mkconfig
So then go on and type 'mkc' and press the <Tab> key again (the command grub2-mkconfig should be written), followed by:

Code: Select all

-o /boot/grub/grub.cfg
If there is NO grub2-mkconfig, then there will be the command

Code: Select all

grub-mkconfig
(attention: without 2!)
In case, there is no grub2-mkconfig, then I suggest you to install Grub2 with Rigo, reinstall Grub2 package, if necessary.
(I remember there was a problem with Grub2). But your changes in grub-file will be lost (so make a backup and write back after install Grub2 package).

Hope to help you...

-Linuxfluesterer (I love KDE ...)

Re: Grub Boot Order

Posted: Sat Jan 26, 2013 20:55
by Chompjil
thanks guys problem fixed, if there was anyway to thank you all!