Need to edit boot loader

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Need to edit boot loader

Postby ellysium on Fri Dec 04, 2009 2:20 pm

I have just dual installed Linux Mint (Helena) with XP
I need to edit the boot loader so that it will default to th XP setting
can anyone help me with this problem

I've tried using Boot Manager and Grub Choose Default. Neither of them would open

Thanks in advance

ellysium
Last edited by ellysium on Fri Dec 04, 2009 3:06 pm, edited 1 time in total.
ellysium
Level 1
Level 1
 
Posts: 8
Joined: Mon Aug 31, 2009 10:35 am

Linux Mint is funded by ads and donations.
 

Re: Need to edit boot loader

Postby garda on Fri Dec 04, 2009 2:54 pm

Post the contents of /etc/default/grub and /boot/grub/grub.cfg. Use these commands to open them:
Code: Select all
gksu gedit /etc/default/grub

Code: Select all
gksu gedit /boot/grub/grub.cfg
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: Need to edit boot loader

Postby ellysium on Sat Dec 05, 2009 12:43 pm

Garda:

Here is the information you requested.

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

GRUB_DEFAULT=0
#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=""

# 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 entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"

- Grub,cfg-

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic-pae (/dev/sda3)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
linux /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=977d4ace-15c1-47f7-82d7-17765fa00f79 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic-pae
}
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic-pae (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
linux /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=977d4ace-15c1-47f7-82d7-17765fa00f79 ro single
initrd /boot/initrd.img-2.6.31-14-generic-pae
}
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (/dev/sda3)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=977d4ace-15c1-47f7-82d7-17765fa00f79 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Linux Mint 8 Helena, linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 977d4ace-15c1-47f7-82d7-17765fa00f79
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=977d4ace-15c1-47f7-82d7-17765fa00f79 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda2)" {
insmod ntfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 2418d42918d3f82e
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

Hope they are helpful
ellysium
Level 1
Level 1
 
Posts: 8
Joined: Mon Aug 31, 2009 10:35 am

Re: Need to edit boot loader

Postby proxima_centauri on Sat Dec 05, 2009 1:06 pm

Hi there,

This should have the desired effect.
Open up that grub file,
Code: Select all
gksudo gedit /etc/default/grub

Change GRUB_DEFAULT=0 to GRUB_DEFAULT="Microsoft Windows XP Professional (on /dev/sda2)"
Save and exit, then in terminal run sudo update-grub
All done.
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3937
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

Re: Need to edit boot loader

Postby garda on Sat Dec 05, 2009 1:23 pm

proxima_centauri wrote:Change GRUB_DEFAULT=0 to GRUB_DEFAULT="Microsoft Windows XP Professional (on /dev/sda2)"

Okay, that should work. If it does not, somehow, try one of these:

GRUB_DEFAULT="\"Microsoft Windows XP Professional (on /dev/sda2)\""
GRUB_DEFAULT=6

Then run:
Code: Select all
sudo update-grub
User avatar
garda
Level 5
Level 5
 
Posts: 744
Joined: Sat Aug 30, 2008 2:55 am
Location: /root

Re: Need to edit boot loader

Postby viking777 on Sat Dec 05, 2009 1:42 pm

Just install startupmanager from synaptic and it will allow you to change that without messing with the lunatic grub2 files. Unfortunately there is a problem with the installer for this program, and although you will see an entry for it in mintmenu, it won't work.

To fix this all you have to do is right click the menu button, select edit menu, then system/administration/startupmanager. Click properties and then in the box labelled 'command' delete everything in front of /usr/sbin/startupmanager and replace it with 'gksu' so it looks like this: gksu /usr/sbin/startupmanager

You will only have to do this once after that it will work automatically and will allow you to make limited changes to the grub2 files. Hopefully in time its abilities will be enhanced and it will allow you to do more.
Fujitsu Lifebook AH532 Laptop. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Ubuntu12.10 (Unity), Mint14 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 13
Level 13
 
Posts: 4916
Joined: Mon Dec 01, 2008 11:21 am

Re: Need to edit boot loader

Postby ellysium on Sat Dec 05, 2009 2:11 pm

Thank-you Garda
Perfection.

And thanks to all that helped with this problem

ellysium
ellysium
Level 1
Level 1
 
Posts: 8
Joined: Mon Aug 31, 2009 10:35 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], JoeFootball, nomko, sjmcc, usbtux and 30 guests