Quote:
Originally Posted by saikee
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"