LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2011, 01:04 PM   #1
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Rep: Reputation: Disabled
Dual boot question - startupmanager changes don't stick


Hi - new to the board. I recently installed a fresh hard drive in my pc and installed a dual boot of W7 and 11.04 Natty. The problem is I want to changed the default os to W7. I opened the startupmanager program (GUI interface) and made that adjustment, but it doesn't seem to stick. Keeps right on defaulting to 11.04 Natty. Any advice on how to edit the startupmanager so it will make that change? Thanks!
 
Old 09-06-2011, 01:08 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
I opened the startupmanager program (GUI interface) and made that adjustment, but it doesn't seem to stick
Please tell us how you make the adjustment. It would help a great deal to determine what you did incorrectly, and what you need to do to change the default OS to boot.
 
Old 09-06-2011, 01:11 PM   #3
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
I did a little Googling and came up with this. Let me know if it works:

Run this command:

Code:
grub-choose-default
If the command doesn't exist, try installing it:

Code:
sudo apt-get -y install grub-choose-default
If it doesn't exist, then you will have to manually edit /boot/grub/grub.cfg and change it in there (which I guess isn't a very beloved idea in the new Ubuntu versions).
 
Old 09-06-2011, 01:20 PM   #4
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bigrigdriver View Post
Please tell us how you make the adjustment. It would help a great deal to determine what you did incorrectly, and what you need to do to change the default OS to boot.
I basically did this... https://help.ubuntu.com/10.04/switch...ot-custom.html
Installed startup manager, opened the program, did the drop down box for the default os and closed it.
I am a bit confused as to is this the same as grub, and what is grub2? I am a newbie at ubuntu. Did they make a change in which program does this function for Ubuntu 11.04 Natty Narwhal? Thanks.

Update... actually it was this instruction that I followed... https://help.ubuntu.com/community/StartUpManager

Last edited by Sigma66062; 09-06-2011 at 01:33 PM.
 
Old 09-06-2011, 01:25 PM   #5
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
Quote:
Originally Posted by Sigma66062 View Post
I basically did this... https://help.ubuntu.com/10.04/switch...ot-custom.html
Installed startup manager, opened the program, did the drop down box for the default os and closed it.
I am a bit confused as to is this the same as grub, and what is grub2? I am a newbie at ubuntu. Did they make a change in which program does this function for Ubuntu 11.04 Natty Narwhal? Thanks.
GRUB is the bootloader. GRUB version 2 is just a new version - which Ubuntu ships with by default. So, for you, GRUB is GRUB. Here's more info on GRUB for you: http://www.gnu.org/software/grub/

Now, the program you used to attempt the default OS change is just a graphical front-end for the GRUB configuration file at /boot/grub/grub.cfg

In my opinion, anybody new to Linux should seriously consider installing (or attempting to install) a more difficult distribution (such as Gentoo or Arch) - at least in a virtual machine. You will learn soooooo much by doing that.
 
Old 09-06-2011, 01:36 PM   #6
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks kasl, I did some searching and found this instruction... https://help.ubuntu.com/8.04/switchi...ot-custom.html
Where you edit the grub file in a text editor and change the default value. I'll try that later tonight to see if that works. I just assumed the changes to the Startup manager program would do that for me! What is the use of that program if it doesn't do that? Oh well.
 
Old 09-06-2011, 01:39 PM   #7
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
Quote:
Originally Posted by Sigma66062 View Post
Thanks kasl, I did some searching and found this instruction... https://help.ubuntu.com/8.04/switchi...ot-custom.html
Where you edit the grub file in a text editor and change the default value. I'll try that later tonight to see if that works. I just assumed the changes to the Startup manager program would do that for me! What is the use of that program if it doesn't do that? Oh well.
Out of curiousity, did you run that startupmanager program as root? If not, try this (replace startupmanager with whatever the program is called. gksudo just makes it so the GUI program will run as a super-user with PERMISSIONS to actually modify the grug.cfg file):

Code:
gksudo startupmanager
Also, the link you posted to https://help.ubuntu.com/8.04/switchi...ot-custom.html is not a good resource. It is for a version of Ubuntu that is very old and doesn't even use the same GRUB configuration.

menu.lst is no longer used with GRUB in Ubuntu.

Last edited by kasl33; 09-06-2011 at 01:40 PM.
 
Old 09-06-2011, 01:49 PM   #8
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kasl_33 View Post
Out of curiousity, did you run that startupmanager program as root? If not, try this (replace startupmanager with whatever the program is called. gksudo just makes it so the GUI program will run as a super-user with PERMISSIONS to actually modify the grug.cfg file):

Code:
gksudo startupmanager
Also, the link you posted to https://help.ubuntu.com/8.04/switchi...ot-custom.html is not a good resource. It is for a version of Ubuntu that is very old and doesn't even use the same GRUB configuration.

menu.lst is no longer used with GRUB in Ubuntu.
As a new user, I find this to be a difficulty in navigating through the Ubuntu support forum/documentation. Never really sure if what I'm seeing applies to my version etc... Thanks for the tip, I will try that and report back :-)
 
Old 09-06-2011, 02:10 PM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Let me take you by the hand since no one offer you how to to change just one digit.

In Ubuntu desktop click "Applications", then "accessories" and then "terminal" to get a terminal.

Tell Linux you want to edit Grub's configuration file /boot/grub/grub.cfg by
Code:
sudo gedit /boot/grub/grub.cfg
you will be ask to supply the current password. Type it in and you will see the content of /boot/grub/grub.cfg. The line that is of interest to you is marked in red. I paste a few lines before and after.
Code:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
Grub counts from zero so set default=0 mean if the user doesn't know which system to boot then get ready by highlighting the first system in the boot menu. If you want the second system then change 0 to 1 and so on. Remember all you need is to change just one digit. That cannot be hard, can it?

Save the file and your boot menu fill default to the desired system on the next boot.

---------------------below is additional information if you are interested--------------------------


All boot loaders have the similar "default" facility and this is what it looks like in Xp's boot.ini
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(8)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(8)\WINDOWS="Microsoft Windows XP Home Edition" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(0)partition(6)\WINNT="Microsoft Windows 2000 Professional" /FASTDETECT
multi(0)disk(0)rdisk(0)partition(6)\WINDOWS="Xp Home @ sda6 to be booted up as a D-drive" /FASTDETECT
c:\="Microsoft Windows 98"
The same word "fault" is also used in Win7/Vista BCD store shown below
Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=D:
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {ntldr}
                        {a45fce4b-5752-11df-be54-8744924079e4}
                        {current}
toolsdisplayorder       {memdiag}
timeout                 30

Last edited by saikee; 09-06-2011 at 02:28 PM.
 
Old 09-06-2011, 06:08 PM   #10
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by saikee View Post
Let me take you by the hand since no one offer you how to to change just one digit.

In Ubuntu desktop click "Applications", then "accessories" and then "terminal" to get a terminal.

Tell Linux you want to edit Grub's configuration file /boot/grub/grub.cfg by
Code:
sudo gedit /boot/grub/grub.cfg
you will be ask to supply the current password. Type it in and you will see the content of /boot/grub/grub.cfg. The line that is of interest to you is marked in red. I paste a few lines before and after.
Code:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
Grub counts from zero so set default=0 mean if the user doesn't know which system to boot then get ready by highlighting the first system in the boot menu. If you want the second system then change 0 to 1 and so on. Remember all you need is to change just one digit. That cannot be hard, can it?

Save the file and your boot menu fill default to the desired system on the next boot.

---------------------below is additional information if you are interested--------------------------


All boot loaders have the similar "default" facility and this is what it looks like in Xp's boot.ini
Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(8)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(8)\WINDOWS="Microsoft Windows XP Home Edition" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(0)partition(6)\WINNT="Microsoft Windows 2000 Professional" /FASTDETECT
multi(0)disk(0)rdisk(0)partition(6)\WINDOWS="Xp Home @ sda6 to be booted up as a D-drive" /FASTDETECT
c:\="Microsoft Windows 98"
The same word "fault" is also used in Win7/Vista BCD store shown below
Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=D:
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {ntldr}
                        {a45fce4b-5752-11df-be54-8744924079e4}
                        {current}
toolsdisplayorder       {memdiag}
timeout                 30
Okay, I tried this but this is what the text read...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="6"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"

It was already set to 6? I expected it to be set to 0... Also note, it says NOT to edit this file. I opened /etc/default/grub and didn't see much that looked like it the default os setting was set to 6 there too... Now, I'm really confused. Why is it not working?

My /etc/default/grub file...

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=6
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=" vga=771"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Last edited by Sigma66062; 09-06-2011 at 07:03 PM.
 
Old 09-06-2011, 06:21 PM   #11
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
PS - I just let it restart to make sure I wasn't daft, and yes, eventhough W7 is the 6th listing, it starts Ubuntu after the time out. Should I make the default = 5 maybe? Since it starts with 0... Confusing because my file does not look the same as the documentation.
 
Old 09-06-2011, 06:23 PM   #12
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
What saikee said will work but if you modify the

sudo gedit /etc/default/grub

with the same directions as saikee shows.

then type

sudo grub-update and it will make the changes and they will stay till you change it in this file.

If you run grub-update for any reason or do an upgrade you will have to redo saikee's method.
 
Old 09-06-2011, 06:49 PM   #13
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Larry Webb View Post
What saikee said will work but if you modify the

sudo gedit /etc/default/grub

with the same directions as saikee shows.

then type

sudo grub-update and it will make the changes and they will stay till you change it in this file.

If you run grub-update for any reason or do an upgrade you will have to redo saikee's method.
I try sudo grub-update but it says command not found??? This is frustrating!

/// I was able to sudo update-grub now though...

/// I changed the GRUB_DEFAULT=5 thinking that it would then choose the 6th option (W7), did the sudo update-grub, but nope, same old effect. Boots Ubuntu as default. Aggggh!

Last edited by Sigma66062; 09-06-2011 at 06:54 PM.
 
Old 09-06-2011, 07:10 PM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Try to disable these lines by putting a # in front

Code:
#GRUB_DEFAULT=6
##GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
#GRUB_TIMEOUT=10
#GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
#GRUB_CMDLINE_LINUX=" vga=771"
Do worry about changing the Grub configuration. A user can write his/her own using about 1/3 commands what Ubuntu is using. It is only Ubuntu's idea not to touch it.

If the /boot/grub/grub.cfg is defective or missing Grub2 will boot to a prompt which a user can use it to boot any operating system manually.

As far As I know there is no installed PC operating system that one cannot boot up manually from a Grub prompt. That is the true power of Grub.
 
Old 09-06-2011, 07:19 PM   #15
Sigma66062
LQ Newbie
 
Registered: Sep 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by saikee View Post
Try to disable these lines by putting a # in front

Code:
#GRUB_DEFAULT=6
##GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
#GRUB_TIMEOUT=10
#GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
#GRUB_CMDLINE_LINUX=" vga=771"
Do worry about changing the Grub configuration. A user can write his/her own using about 1/3 commands what Ubuntu is using. It is only Ubuntu's idea not to touch it.

If the /boot/grub/grub.cfg is defective or missing Grub2 will boot to a prompt which a user can use it to boot any operating system manually.

As far As I know there is no installed PC operating system that one cannot boot up manually from a Grub prompt. That is the true power of Grub.
Tried adding the "#''s then sudo update-grub, restarted... same thing... didn't change default or prompt me after timeout... Any other ideas?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed UP Boot Order on dual-boot, don't know GRUB2, need help -- another's PC hilyard Linux - Newbie 4 06-25-2011 12:57 AM
[SOLVED] Don't know what to do!! Help with dual boot problems please. HazMat117 Linux - Desktop 5 04-26-2008 09:42 PM
don't want to dual boot any long... how do I get back to just windows ? brjoon1021 Linux - Newbie 6 02-26-2008 05:40 AM
Dual boot with Linux, need help! so i don't loose orginal windoz mr_coffee Linux - Newbie 13 01-05-2006 04:09 PM
Why don't more people use IDE swap kits instead of dual boot? shivandeveloper Linux - Newbie 16 12-04-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration