<chapter id="grub-101" arch="x86"><title>Locating the GRUB Menu's <filename>menu.lst</filename> File
(Tasks)</title><highlights><para>This chapter describes updating the GRUB <filename>menu.lst</filename> file
if you want to manually update the file. For example, you might want to change
the default time for how fast the default OS is booted. Or, you might want
to add another OS to the GRUB menu. This chapter provides several examples
for finding the <filename>menu.lst</filename> file.</para><para>For background information on GRUB based booting, see <olink targetdoc="solinstallpbiu" targetptr="grub-1" remap="external">Chapter 6, <citetitle remap="chapter">GRUB Based Booting for Solaris Installation,</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Planning for Installation and Upgrade</citetitle></olink>.</para>
</highlights><sect1 id="gbdfr" arch="x86"><title>Locating the GRUB Menu's <filename>menu.lst</filename> File
(Tasks)</title><para>You must always use the <command>bootadm</command> command to locate
the GRUB menu's <filename>menu.lst</filename> file. The <command>list-menu</command> subcommand
finds the active GRUB menu. The <filename>menu.lst</filename> file lists all
the operating systems that are installed on a  system.  The contents of this
file dictate the list of operating systems  that is displayed on the GRUB
menu.</para><para>Typically, the active GRUB menu's <filename>menu.lst</filename> file
is located at <filename>/boot/grub/menu.lst</filename>. In some situations,
the GRUB <filename>menu.lst</filename> file resides elsewhere. For example,
in a system that uses Solaris Live Upgrade, the GRUB  <filename>menu.lst</filename> file
might be on a boot environment that is not the currently running boot environment.
Or if you have upgraded a system with an x86 boot partition, the <filename>menu.lst</filename> file might reside in the <filename>/stubboot</filename> directory.
 Only the active GRUB <filename>menu.lst</filename> file  is used to boot
the system.  In order to modify the GRUB menu that is displayed when you boot
the system, the active GRUB  <filename>menu.lst</filename> file must be modified.
Changing any other GRUB <filename>menu.lst</filename> file has no effect on
the menu that is displayed when you boot the system.  To determine the location
of the active GRUB <filename>menu.lst</filename> file, use the <command>bootadm</command> command.
 The <command>list-menu</command> subcommand displays the location of the
active GRUB menu. The following procedures determine the location of the GRUB
menu's <filename>menu.lst</filename> file.</para><para>For more information about the <command>bootadm</command> command, see <olink targetdoc="refman1m" targetptr="bootadm-1m" remap="external"><citerefentry><refentrytitle>bootadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><task id="gbdei"><title>Locating the GRUB Menu's <literal>menu.lst</literal> file</title><tasksummary><para>In the following procedure, the system contains two operating systems:
Solaris and a Solaris Live Upgrade boot environment, <literal>second_disk</literal>.
The Solaris OS has been booted and contains the GRUB menu.</para>
</tasksummary><procedure>&suStepA;<step><para>To locate the <literal>menu.lst</literal> file, type:</para><screen># <userinput>/sbin/bootadm list-menu</userinput></screen><para>The location and contents of the file are displayed.</para><screen>The location for the active GRUB menu is: /boot/grub/menu.lst
default 0
timeout 10
0 Solaris
1 Solaris failsafe
2 second_disk
3 second_disk failsafe</screen>
</step>
</procedure>
</task><task id="gbdfm"><title>Locating the GRUB Menu's <filename>menu.lst</filename> File
When the active <filename>menu.lst</filename> file is in Another Boot Environment</title><tasksummary><para>In the following procedure, the system contains two operating systems: <literal>Solaris</literal> and a Solaris Live Upgrade boot environment, <literal>second_disk</literal>. In this example, the <filename>menu.lst</filename> file does not
exist in the currently running boot environment. The <literal>second_disk</literal> boot
environment has been booted. The <literal>Solaris</literal> boot environment
contains the GRUB menu. The <literal>Solaris</literal> boot environment is
not mounted. </para>
</tasksummary><procedure>&suStepA;<step><para>To locate the <literal>menu.lst</literal> file, type:</para><screen># <userinput>/sbin/bootadm list-menu</userinput></screen><para>The location and contents of the file are displayed.</para><screen>The location for the active GRUB menu is: /dev/dsk/<replaceable>device_name</replaceable>(not mounted)
The filesystem type of the menu device is &lt;ufs>
default 0
timeout 10
0 Solaris
1 Solaris failsafe
2 second_disk
3 second_disk failsafe</screen>
</step><step><para>Because the file system containing the <literal>menu.lst</literal> file
is not mounted, mount the file system. Specify the UFS file system and the
device name.</para><screen># <userinput>/usr/sbin/mount -F ufs /dev/dsk/</userinput><replaceable>device_name</replaceable> <userinput>/mnt</userinput></screen><para>Where <replaceable>device_name</replaceable> specifies the location
of the root (<filename>/</filename>) file system on the disk device of the
boot environment that you want to mount. The device name is entered in the
form of <filename>/dev/dsk/c</filename><replaceable>w</replaceable><filename>t</filename><replaceable>x</replaceable><filename>d</filename><replaceable>y</replaceable><filename>s</filename><replaceable>z</replaceable>. For example:</para><screen># <userinput>/usr/sbin/mount -F ufs /dev/dsk/c0t1d0s0</userinput> <userinput>/mnt</userinput></screen><para>You can access the GRUB menu at <filename>/mnt/boot/grub/menu.lst</filename></para>
</step><step><para>Unmount the filesystem</para><screen># <userinput>/usr/sbin/umount /mnt</userinput></screen><note><para>If you mount a boot environment or a file system of a boot environment,
ensure that the file system or file systems are unmounted after use. If these
file systems are not unmounted, future Solaris Live Upgrade operations on
that boot environment might fail.</para>
</note>
</step>
</procedure>
</task><task id="gbdhv"><title>Locating the GRUB Menu's <filename>menu.lst</filename> File
When a Solaris Live Upgrade Boot Environment is Mounted</title><tasksummary><para>In the following procedure, the system contains two operating systems: <literal>Solaris</literal> and a Solaris Live Upgrade boot environment, <literal>second_disk</literal>. The <literal>second_disk</literal> boot environment has been booted.
The  <literal>Solaris</literal> boot environment contains the GRUB menu. The <literal>Solaris</literal> boot environment is mounted at <filename>/.alt.Solaris</filename>.</para>
</tasksummary><procedure>&suStepA;<step><para>To locate the <literal>menu.lst</literal> file, type:</para><screen># <userinput>/sbin/bootadm list-menu</userinput></screen><para>The location and contents of the file are displayed.</para><screen>The location for the active GRUB menu is:
/.alt.Solaris/boot/grub/menu.lst
default 0
timeout 10
0 Solaris
1 Solaris failsafe
2 second_disk
3 second_disk failsafe</screen><para>Since the boot environment containing the GRUB menu is already mounted,
then you can access the <filename>menu.lst</filename> file 	at <filename>/.alt.Solaris/boot/grub/menu.lst.</filename></para>
</step>
</procedure>
</task><task id="gbdgd"><title>Locating the GRUB Menu's <filename>menu.lst</filename> File
When Your System Has an x86 Boot Partition</title><tasksummary><para>In the following procedure, the system contains two operating systems:
Solaris and a Solaris Live Upgrade boot environment, <literal>second_disk</literal>.
The <literal>second_disk</literal> boot environment has been booted. Your
system has been upgraded and an x86 boot partition remains. The boot partition
is mounted at <filename>/stubboot</filename> and contains the GRUB menu. For
an explanation of x86 boot partitions, see <olink targetdoc="solinstallpbiu" targetptr="diskspace-101" remap="external"><citetitle remap="section">Partitioning Recommendations</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Planning for Installation and Upgrade</citetitle></olink>.</para>
</tasksummary><procedure>&suStepA;<step><para>To locate the <literal>menu.lst</literal> file, type:</para><screen># <userinput>/sbin/bootadm list-menu</userinput></screen><para>The location and contents of the file are displayed.</para><screen>The location for the active GRUB menu is:
/stubboot/boot/grub/menu.lst
default 0
timeout 10
0 Solaris
1 Solaris failsafe
2 second_disk
3 second_disk failsafe</screen><para>You can access the <filename>menu.lst</filename> file at <filename>/stubboot/boot/grub/menu.lst.</filename></para>
</step>
</procedure>
</task>
</sect1>
</chapter>