SUN CA : University of Delhi Agraj's Weblog

Thursday Mar 06, 2008

This article can prove useful for novices (like me) who do not have much experience working with Solaris
or for that matter with any flavour of Linux.

If you have two or more Operating Systems installed in your machine, then you must have seen a blue screen
asking you for your choice of operating system to boot into. That is, the GRUB bootloader for you.

To change the default booting Operating System or to edit the Timeout interval (the time for which the screen appears),
one must edit the grub.conf file or menu.lst file

The steps are :

1. Locate the required file in your machine.
Normally it is located in /etc/grub.conf or /boot/grub/grub.conf
With Solaris 10, it is present in /boot/grub/menu.lst (menu.lst is an alias for grub.conf)

2. Following represent some selected information from menu.lst:

#pragma ident "@(#)menu.lst 1.2 07/01/10 SMI"
#
# default menu entry to boot
default 0
#
# menu timeout in second before default OS is booted
# set to -1 to wait for user input
timeout 10

#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris Express Community Edition snv_76 X86
kernel$ /platform/i86pc/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris xVM
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris failsafe
kernel /boot/platform/i86pc/kernel/unix -s
module /boot/x86.miniroot-safe
#---------------------END BOOTADM--------------------

title Windows
rootnoverify (hd0,0)
chainloader +1

3. We will now change the default booting Operating system, its name and the timeout interval

To change the name of the OS, the 4th entry (with title) must be changed as follows:
"title Windows" is changed to "title Windows Vista" or anything of your choice

To double the timeout interval,
"timeout 10" is changed to "timeout 20" which means the blue screen will appear for 20 seconds now.

To change the default booting Operating system, change
"default 0" to "default x" where x is the position of the OS entry in menu.lst
for example to boot into Windows,
change "default 0" to "default 3"

4. Save the changes and bingo !! You are done.

5. Reboot to check that it has been done correctly.

Note 1 : Please do not edit any part of menu.lst file, which you do not know about, as it might
result in some unexpected behaviour.

Note 2 : Comments can be given in menu.lst by starting the line with # symbol

Note 3 : There is enough help given in the menu.lst file, just read the comments carefully and you will never fail.

Note 4 : Full tutorial on grub can be found on http://www.dedoimedo.com/computers/grub.html

Disclaimer : If you find anything wrong or missing, please leave a comment. Thanks.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed