LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual boot question - startupmanager changes don't stick (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-question-startupmanager-changes-dont-stick-901461/)

Sigma66062 09-06-2011 01:04 PM

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!

bigrigdriver 09-06-2011 01:08 PM

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.

kasl33 09-06-2011 01:11 PM

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).

Sigma66062 09-06-2011 01:20 PM

Quote:

Originally Posted by bigrigdriver (Post 4463139)
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

kasl33 09-06-2011 01:25 PM

Quote:

Originally Posted by Sigma66062 (Post 4463153)
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.

Sigma66062 09-06-2011 01:36 PM

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.

kasl33 09-06-2011 01:39 PM

Quote:

Originally Posted by Sigma66062 (Post 4463164)
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.

Sigma66062 09-06-2011 01:49 PM

Quote:

Originally Posted by kasl_33 (Post 4463168)
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 :-)

saikee 09-06-2011 02:10 PM

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


Sigma66062 09-06-2011 06:08 PM

Quote:

Originally Posted by saikee (Post 4463202)
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"

Sigma66062 09-06-2011 06:21 PM

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.

Larry Webb 09-06-2011 06:23 PM

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.

Sigma66062 09-06-2011 06:49 PM

Quote:

Originally Posted by Larry Webb (Post 4463353)
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!

saikee 09-06-2011 07:10 PM

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.

Sigma66062 09-06-2011 07:19 PM

Quote:

Originally Posted by saikee (Post 4463369)
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?


All times are GMT -5. The time now is 08:24 AM.