help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

change default os


From: Tom Davies
Subject: change default os
Date: Thu, 14 Mar 2013 10:12:04 +0000 (GMT)

Hi :)
+1
to Jordan Uggla's post.  Please ignore Simon's as he seems to be complicating the issue.  The move from Grub1 to Grub2 was a big jump and a radical change in the way Grub works.  Simon is trying to deal with Grub2 in the way that would have been excellent with Grub1 but that doesn't work anymore in Grub2.  A LOT of people are still trying to edit the Cfg file but it's really not a good idea.  Marc Stewart helped me a lot with Grub2 ...


Boot Menu
To put Windows or pre-existing OS at the top of the boot menu
(from Launchpad question
https://answers.launchpad.net/ubuntu/+source/grub2/+question/108890
)

Marc Stewart said on 2010-04-30:
It's trivial to move Windows to the top of the GRUB2 menu. Open a terminal and enter:

cd /etc/grub.d
sudo mv 30_os-prober 08_os-prober
sudo update-grub

That'll make GRUB look for non-Linux OSes first, putting Windows at the top.


The advantage with this is
1.  when you update or upgrade Grub2 it still puts Windows at the top of the list
2.  however many kernels get installed into your distro Windows stays in the same position
3.  however many kernels are in the list the default selection is still only about 1 arrow-key away from the most recent kernel for your distro. 

Jordan Uggla's method for changing the Default value from a number to a name is excellent and would "be the icing on the cake" if you follow Marc Stewart's method of moving the "prober" elements around.  Just to clarify how to do that i tend to open a command-line and do

cd /etc/default
sudo cp grub grub-2013-03-14
gksu gedit grub

a more 'elegant' unixy way might be something like.  Note that again the 2nd line there is just to make a back-up of the file jic ...

su
cp /etc/default/grub /etc/default/grub-backup
vi /etc/default/grub
exit

But i kinda hate Vi (and emacs) and find Gedit much easier to work with.  Leafpad, Kate, SCiTe and tons of others are also nice gui text-editors.  Also i prefer to move my command-line into the right folder so i can have a good poke around without having to type long pathnames (even with tab-complete).  I also prefer gksu for opening gui interfaces and sudo for command-line stuff.  I really don't think going into the full su is good practice anymore but i'm sure everyone has their own opinion!  For back-ups i prefer putting the date in reverse so i can easily see which is the most recent.  I find just using "backup" is a Pita when you start trying to remember which was "the good one" a few months later. 


Someone else in the thread mentioned about Grub2 misbehaving weirdly and someone suggested trojan.  Trojans are extremely unlikely in any Gnu&Linux or other Unix-based system.  It's more likely to be user-error due to a misunderstanding or from following advice from a well-meaning person that hasn't quite understood everything yet.  No-one knows everything but we get fantastic results by learning off each other even if it's with people we disagree with. 

Still it's probably a good idea to reinstall Grub2 just to sort out whatever mess happened or perhaps just to learn a little more about how Grub2 works.  I like this guide as it covers many different ways of installing Grub2 and has nice pics too. 

https://help.ubuntu.com/community/Grub2/Installing

So, good luck and regards from
Tom :) 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]