<?Pub UDT _bookmark _target?><?Pub UDT __target_1 _target?><?Pub UDT registeredtm trademark?><?Pub EntList bull rArr sect?><?Pub CX solbook(book(title()bookinfo()chapter(10)?><chapter id="grubtasks-1"><?Pub Tag atict:info tracking="on" ref="0"?><?Pub Tag atict:user user="sk23612" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="jonj" fullname="Juanita Heieck"?><?Pub Tag atict:user user="kathys"
fullname="Kathy Slattery"?><?Pub Tag atict:user user="cathleen" fullname=""?><?Pub Tag
atict:user user="eb151805" fullname="Juanita Heieck"?><?Pub Tag atict:user
user="jh118764" fullname="Juanita Heieck"?><?Pub Tag atict:user user="lh136763"
fullname="Laura Hartman"?><title>Modifying Solaris Boot Behavior (Tasks)</title><indexterm><primary>managing boot behavior</primary>
</indexterm><indexterm><primary>boot behavior</primary><secondary>managing</secondary>
</indexterm><indexterm><primary>Solaris boot behavior</primary><secondary>how to manage</secondary>
</indexterm><highlights><para>This chapter provides information about modifying boot behavior on Solaris
systems.</para><itemizedlist><para>The following is list of the information in this chapter:</para><listitem><para><olink targetptr="ggkuh" remap="internal">Modifying Boot Behavior on SPARC
Based Systems (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="getov" remap="internal">Modifying Solaris Boot Behavior on
x86 Based Systems (Task Map)</olink></para>
</listitem>
</itemizedlist><para>For what's new in booting and general overview information about the
boot process, see <olink targetptr="hbintro-66644" remap="internal">Chapter&nbsp;8, Introduction
to Shutting Down and Booting a System</olink>.</para><para>For step-by-step instructions on booting a Solaris system, see <olink targetptr="hbsparcboot-79782" remap="internal">Chapter&nbsp;12, Booting a Solaris System (Tasks)</olink>.</para>
</highlights><sect1 id="ggkuh"><title>Modifying Boot Behavior on SPARC Based Systems (Task
Map)</title><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="112.00*"/><colspec colname="column2" colwidth="158.85*"/><colspec colname="column3" colwidth="125.15*"/><thead><row rowsep="1"><entry colsep="1" rowsep="1"><para>Task</para>
</entry><entry colsep="1" rowsep="1"><para>Description</para>
</entry><entry colsep="1" rowsep="1"><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Identify the PROM revision number.</para>
</entry><entry colsep="1" rowsep="1"><para>Use the banner command at the <literal>ok</literal> prompt to display
the PROM revision number for a system.</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="hbsparcboot-68368" remap="internal">How to Find the PROM Revision Number
for a System</olink></para>
</entry>
</row><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Identify devices on the system that can be booted.</para>
</entry><entry colsep="1" rowsep="1"><para>Before modifying boot behavior by using the boot PROM, identify the
devices on the system.</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="hbsparcboot-75" remap="internal">How to Identify Devices on a System</olink></para>
</entry>
</row><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Display the current boot device.</para>
</entry><entry colsep="1" rowsep="1"><para>Use this procedure to determine the current default boot device from
which the system will boot.</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="ggmpz" remap="internal">How to Determine the Default Boot Device</olink></para>
</entry>
</row><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Change the default boot device.</para>
</entry><entry colsep="1" rowsep="1"><itemizedlist><para>To change the default boot device, use one of the following methods:</para><listitem><para>Change the <literal>boot-device</literal> parameter at the
boot PROM.</para>
</listitem><listitem><para>Change the <literal>boot-device</literal> parameter by using
the <command>eeprom</command> command.</para>
</listitem>
</itemizedlist>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="hbsparcboot-61766" remap="internal">How to Change the Default Boot
Device by Using the Boot PROM</olink></para><para><olink targetptr="bootdevice-change" remap="internal">How to Change the Default Boot
Device by Using the eeprom Command</olink></para>
</entry>
</row><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Reset the system.</para>
</entry><entry colsep="1" rowsep="1"><para>When you reset the system, the system runs diagnostic tests on the hardware,
then reboots.</para>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="hbsparcboot-84747" remap="internal">Resetting the System</olink></para>
</entry>
</row><row><?PubTbl row rht="0.83in"?><entry colsep="1" rowsep="1"><para>Change the default boot file.</para>
</entry><entry colsep="1" rowsep="1"><itemizedlist><para>To change the default kernel that the system boots, use one of the following
methods:</para><listitem><para>Change the <literal>boot-file</literal> parameter by using
the boot PROM.</para>
</listitem><listitem><para>Change the<literal>boot-file</literal> parameter by using
the <command>eeprom</command> command.</para>
</listitem>
</itemizedlist>
</entry><entry colsep="1" rowsep="1"><para><olink targetptr="ggmsh" remap="internal">How to Change the Default Kernel by Using the
Boot PROM</olink></para><para><olink targetptr="bootfile-change" remap="internal">How to Change the Default Kernel
by Using the eeprom Command</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><sect2 id="hbsparcboot-41506" arch="sparc"><title>Using the Boot PROM</title><para>The boot PROM is used to boot a system. You might need to change the
way the system boots. For example, you might want to reset the device to boot
from or run hardware diagnostics before you bring the system to a multiuser
level. </para><para>System administrators typically use the PROM level to boot a system.
You can also change the default boot file and boot device at the PROM level.</para><itemizedlist><para>If you need to perform any of the following tasks, you need to change
the default boot device:</para><listitem><para>Add a new drive to the system either permanently or temporarily</para>
</listitem><listitem><para>Change the network boot strategy</para>
</listitem><listitem><para>Temporarily boot a stand-alone system from the network</para>
</listitem>
</itemizedlist><para>For a complete list of PROM commands, see <olink targetdoc="refman" targetptr="monitor-1m" remap="external"><citerefentry><refentrytitle>monitor</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> or <olink targetdoc="refman" targetptr="eeprom-1m" remap="external"><citerefentry><refentrytitle>eeprom</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.</para>
</sect2><task id="hbsparcboot-68368" arch="sparc"><title>How to Find the PROM Revision
Number for a System</title><procedure remap="single-step"><step><para><indexterm id="hbsparcboot-ix991"><primary><command>banner</command> command (PROM)</primary></indexterm>Display a system's PROM revision number by using
the <command>banner</command> command. </para><screen>ok <userinput>banner</userinput>
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #<replaceable>number</replaceable>.
Ethernet address <replaceable>number</replaceable>, Host ID: <replaceable>number</replaceable>.</screen><para><indexterm id="hbsparcboot-ix992"><primary>PROM</primary><secondary>finding the PROM revision</secondary></indexterm>Hardware configuration information,
including the revision number of the PROM, is displayed. In this example,
the PROM revision number is 3.15.</para>
</step>
</procedure>
</task><task id="hbsparcboot-75" arch="sparc"><title>How to Identify Devices on a
System</title><tasksummary><para>You might need to identify the devices on the system to determine what
are the appropriate devices to boot from.</para>
</tasksummary><taskprerequisites><itemizedlist><para>Before you can safely use the <command>probe</command> commands to determine
what devices are attached to the system, you need to do the following:</para><listitem><para>Change the PROM <literal>auto-boot?</literal> parameter to
false.</para><screen>ok <userinput>setenv auto-boot? false</userinput></screen>
</listitem><listitem><para>Issue the <command>reset-all</command> command to clear system
registers.</para><screen>ok <userinput>reset-all</userinput></screen>
</listitem>
</itemizedlist><para>You can view the <command>probe</command> commands that are available
on your system by using the <command>sifting probe</command> command:</para><screen>ok <userinput>sifting probe</userinput></screen><para>If you run the <command>probe</command> commands without clearing the
system registers, the following message is displayed:</para><screen>ok <userinput>probe-scsi</userinput>
This command may hang the system if a Stop-A or halt command
has been executed.  Please type reset-all to reset the system 
before executing this command. 
Do you wish to continue? (y/n) <userinput>n</userinput></screen>
</taskprerequisites><procedure><step id="hbsparcboot-step-79"><para>Identify the devices on the system.</para><screen>ok <userinput>probe-</userinput><replaceable>device</replaceable></screen>
</step><step id="hbsparcboot-step-80"><para>(Optional) If you want the system to
reboot after a power failure or after using the <command>reset</command> command,
then reset the <literal>auto-boot?</literal> parameter to true.</para><screen>ok <userinput>setenv auto-boot? true</userinput>
auto-boot? =          true</screen>
</step><step id="hbsparcboot-step-81"><para>Boot the system to multiuser mode.</para><screen>ok <userinput>reset-all</userinput></screen>
</step>
</procedure><example arch="sparc"><title>Identifying the Devices on a System</title><para>The following example shows how to identify the devices connected to
an <trademark>Ultra</trademark> 10 system.</para><screen>ok <userinput>setenv auto-boot? false</userinput>
auto-boot? =          false
ok <userinput>reset-all</userinput>
Resetting ... 

Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #10933339.
Ethernet address 8:0:20:a6:d4:5b, Host ID: 80a6d45b.

ok <userinput>probe-ide</userinput>
  Device 0  ( Primary Master ) 
          ATA Model: ST34321A                                

  Device 1  ( Primary Slave ) 
         Not Present

  Device 2  ( Secondary Master ) 
         Removable ATAPI Model: CRD-8322B                               

  Device 3  ( Secondary Slave ) 
         Not Present

ok <userinput>setenv auto-boot? true</userinput>
auto-boot? =          true</screen><para>Alternatively, you can use the <command>devalias</command> command to
identify the device aliases and the associated paths of devices that <emphasis>might</emphasis> be connected to the system. For example:</para><screen>ok <userinput>devalias</userinput>
screen                   /pci@1f,0/pci@1,1/SUNW,m64B@2
net                      /pci@1f,0/pci@1,1/network@1,1
cdrom                    /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f
disk                     /pci@1f,0/pci@1,1/ide@3/disk@0,0
disk3                    /pci@1f,0/pci@1,1/ide@3/disk@3,0
disk2                    /pci@1f,0/pci@1,1/ide@3/disk@2,0
disk1                    /pci@1f,0/pci@1,1/ide@3/disk@1,0
disk0                    /pci@1f,0/pci@1,1/ide@3/disk@0,0
ide                      /pci@1f,0/pci@1,1/ide@3
floppy                   /pci@1f,0/pci@1,1/ebus@1/fdthree
ttyb                     /pci@1f,0/pci@1,1/ebus@1/se:b
ttya                     /pci@1f,0/pci@1,1/ebus@1/se:a
keyboard!                /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode
keyboard                 /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
mouse                    /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
name                     aliases</screen>
</example>
</task><task id="ggmpz" arch="sparc"><title>How to Determine the Default Boot Device</title><procedure><step><para>Bring the system to the <literal>ok</literal> PROM prompt.</para><para>For more information, see <olink targetptr="hbsyshalt-93400" remap="internal">How to
Shut Down a Stand-Alone System</olink>.</para>
</step><step><para>Use the <command>printenv</command> command to determine the default
boot device.</para><screen>ok <userinput>printenv boot-device</userinput></screen><variablelist><varlistentry><term><literal>boot-device</literal></term><listitem><para>Identifies the parameter for setting the device from which
to boot.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>device</replaceable>[<replaceable>n</replaceable>]</term><listitem><para>Identifies the <literal>boot-device</literal> value such as
a disk or the network. The <replaceable>n</replaceable> can be specified as
the <replaceable>disk number</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist><para>The default boot-device is displayed in a format that is similar to
the following:</para><programlisting>boot-device = /pci@1f,4000/scsi@3/disk@1,0:a</programlisting><para>If the default boot-device is a network boot device, the output is similar
to the following:</para><programlisting width="100">boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@a,0:a \
/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a disk net</programlisting>
</step>
</procedure>
</task><task id="hbsparcboot-61766" arch="sparc"><title>How to Change the Default
Boot Device by Using the Boot PROM</title><tasksummary><para>You might need to identify the devices on the system before you can
change the default boot device to some other device. For information on identifying
devices on the system, see <olink targetptr="hbsparcboot-75" remap="internal">How to Identify
Devices on a System</olink>.</para>
</tasksummary><procedure><step id="hbsparcboot-step-3"><para>Change to run level 0.</para><screen># <userinput>init 0</userinput></screen><para>The <literal>ok</literal> PROM prompt is displayed. For more information,
see the<olink targetdoc="refman" targetptr="init-1m" remap="external"><citerefentry><refentrytitle>init</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</step><step id="hbsparcboot-step-5"><para>Change the value of the <literal>boot-device</literal> parameter.</para><screen>ok <userinput>setenv boot-device</userinput> <replaceable>device</replaceable>[<replaceable>n</replaceable>]</screen><para>Use one of the <command>probe</command> commands if you need help identifying
the disk number.</para>
</step><step id="hbsparcboot-step-6"><para>Verify that the default boot device has
been changed.</para><screen>ok <userinput>printenv boot-device</userinput></screen>
</step><step id="hbsparcboot-step-7"><para>Save the new <literal>boot-device</literal> value.</para><screen>ok <userinput>reset-all</userinput></screen><para>The new <literal>boot-device</literal> value is written to the PROM.</para>
</step>
</procedure><example arch="sparc"><title>Changing the Default Boot Device</title><para>In this example, the default boot device is set to disk.</para><screen># <userinput>init 0</userinput>
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok <userinput>setenv boot-device /pci@1f,4000/scsi@3/disk@1,0</userinput>
boot-device =         /pci@1f,4000/scsi@3/disk@1,0
ok <userinput>printenv boot-device</userinput>
boot-device           /pci@1f,4000/scsi@3/disk@1,0
ok <userinput>boot</userinput>
Resetting ... 

screen not found.
Can't open input device.
Keyboard not present.  Using ttya for input and output.

Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.

Rebooting with command: boot disk1                                    
Boot device: /pci@1f,4000/scsi@3/disk@1,0  File and args:</screen><para>In this example, the default boot device is set to the network.</para><screen># <userinput>init 0</userinput>
# 
INIT: New run level: 0
.
.
.
The system is down.
syncing file systems... done
Program terminated
ok <userinput>setenv boot-device net</userinput>
boot-device =         net
ok <userinput>printenv boot-device</userinput>
boot-device           net                    disk
ok <userinput>reset</userinput>
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard
OpenBoot 3.15, 128 MB memory installed, Serial #<replaceable>number</replaceable>.
Ethernet address <replaceable>number</replaceable>, Host ID: <replaceable>number</replaceable>.



Boot device: net  File and args:
.
.
.
pluto console login:</screen>
</example>
</task><task id="bootdevice-change" arch="sparc"><title>How to Change the Default
Boot Device by Using the <command>eeprom</command> Command</title><procedure><step><para>Become superuser or assume an equivalent role.</para>
</step><step><para>Specify the alternate kernel to boot.</para><screen># <userinput>eeprom boot-device <replaceable>new-boot-device</replaceable></userinput></screen>
</step><step><para>Verify that the new parameter has been set.</para><screen># <userinput>eeprom boot-device</userinput></screen><para>The output should display the new <command>eeprom</command> value for
the <literal>boot-device</literal> parameter.</para>
</step>
</procedure>
</task><sect2 id="hbsparcboot-84747" arch="sparc"><title>Resetting the System</title><para><indexterm id="hbsparcboot-ix995"><primary>resetting</primary><secondary> a SPARC based system</secondary></indexterm>Run the following command from the <literal>ok</literal> prompt:</para><screen>ok <userinput>reset-all</userinput></screen><para><indexterm id="ghctm"><primary><command>reset</command> command</primary></indexterm>The self-test program, which runs diagnostic tests on the hardware,
is executed. Then, if the <literal>auto-boot?</literal> parameter is set to
true, the system is rebooted.</para>
</sect2><task id="ggmsh" arch="sparc"><title>How to Change the Default Kernel by Using
the Boot PROM</title><indexterm><primary><literal>boot-file</literal> property</primary><secondary>changing</secondary>
</indexterm><indexterm><primary>changing boot properties</primary>
</indexterm><indexterm><primary>properties</primary><secondary>changing the <literal>boot-file</literal> property</secondary>
</indexterm><procedure><step id="ggmwq"><para>Change to run level 0.</para><screen># <userinput>init 0</userinput></screen><para>The <literal>ok</literal> PROM prompt is displayed. For more information,
see the<olink targetdoc="refman" targetptr="init-1m" remap="external"><citerefentry><refentrytitle>init</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</step><step><para>Set the <literal>boot-file</literal> property to an alternate
kernel.</para><screen>ok <userinput>setenv boot-file <replaceable>boot-file</replaceable></userinput></screen>
</step><step id="ggmvl"><para>Verify that the default boot device has been changed.</para><screen>ok <userinput>printenv boot-file</userinput></screen>
</step><step id="ggmwa"><para>Save the new <literal>boot-file</literal> value.</para><screen>ok <userinput>reset-all</userinput></screen><para>The new <literal>boot-file</literal> value is written to the PROM.</para>
</step>
</procedure>
</task><task id="bootfile-change" arch="sparc"><title>How to Change the Default Kernel
by Using the <command>eeprom</command> Command</title><procedure><step><para>Become superuser or assume an equivalent role.</para>
</step><step><para>Specify the alternate kernel to boot.</para><screen># <userinput>eeprom boot-file <replaceable>new boot-file</replaceable></userinput></screen><para>For example:</para><screen># <userinput>eeprom boot-file=kernel.<replaceable>name</replaceable>/sparcv9/unix</userinput></screen>
</step><step><para>Verify that the new parameter has been set.</para><screen># <userinput>eeprom boot-file</userinput></screen><para>The output should display the new <command>eeprom</command> value for
the specified parameter.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="getov"><title>Modifying Solaris Boot Behavior on x86 Based Systems
(Task Map)</title><indexterm><primary>modifying boot behavior (Task Map)</primary>
</indexterm><indexterm><primary>boot behavior, modifying on x86 based systems</primary>
</indexterm><table frame="all" id="getny" arch="x86"><title>Modifying Boot Behavior: Task
Map</title><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Set boot file parameters by using the <command>eeprom</command> command.</para>
</entry><entry><para>Modify boot behavior on an x86 based system by using the <command>eeprom</command> command.
Boot options that are set by using the <command>eeprom</command> command persist
over a system reboot, unless these options are overridden by modifying kernel
behavior in the GRUB menu at boot time.</para>
</entry><entry><para><olink targetptr="fwbon" remap="internal">How to Modify Boot Behavior by Using the eeprom
Command</olink></para>
</entry>
</row><row><entry><para>Modify boot behavior by editing the GRUB menu at boot time.</para>
</entry><entry><para>Modify boot behavior by editing GRUB menu at boot time. Boot options
that are specified by modifying the boot behavior in the GRUB menu persist
only until the next system reboot.</para>
</entry><entry><para><olink targetptr="fwbme" remap="internal">How to Modify Boot Behavior by Editing the
GRUB Menu at Boot Time</olink></para>
</entry>
</row><row><entry><para>Modify boot behavior by manually editing the <filename>menu.lst</filename> file.</para>
</entry><entry><para>Modify boot behavior by editing the <filename>menu.lst</filename> configuration
file to add new OS entries or redirect the console. Changes you make to the
file persist over system reboots.</para>
</entry><entry><para><olink targetptr="fvbbb" remap="internal">How to Modify Boot Behavior by Editing the
menu.lst File</olink></para>
</entry>
</row><row><entry><para>Modify
the <filename>menu.lst</filename> file to include entries that support the <command>findroot</command> command.</para>
</entry><entry><para>Additional
menu entries that use the <command>findroot</command> command can be added
to the <filename>menu.lst</filename> file menu after an installation or upgrade.</para>
</entry><entry><para><olink targetptr="ggvms" remap="internal">How to Add GRUB Menu Entries That Use the findroot Command</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table><sect2 id="fwbee"><title>Modifying Boot Behavior on x86 Based Systems</title><indexterm><primary><command>eeprom</command> command</primary><secondary>modifying boot behavior</secondary>
</indexterm><indexterm><primary>modifying boot behavior</primary><secondary>in GRUB menu at boot time</secondary>
</indexterm><itemizedlist><para>The primary methods for modifying boot behavior on an x86 based system
are as follows:</para><listitem><para>By using the <command>eeprom</command> command.</para><para>The <command>eeprom</command> command
is used to assign a different value to a standard set of properties. These
values, which are equivalent to the SPARC OpenBoot PROM NVRAM variables, are
stored either in the <filename>/boot/solaris/bootenv.rc</filename> file or
in the <filename>menu.lst</filename> file. Changes that are made to boot behavior
by using the <command>eeprom</command> command persist over each system reboot
and are preserved during a software upgrade. See the <olink targetdoc="refman" targetptr="eeprom-1m" remap="external"><citerefentry><refentrytitle>eeprom</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page for more information.</para><caution><para>If you directly edit the <filename>menu.lst</filename> file, certain
boot properties (boot-file, boot-args, and console) may not be changed at
a later time by using the <command>eeprom</command> command.</para>
</caution>
</listitem><listitem><para>By editing the GRUB menu at boot time.</para><para>Changes
that are made by modifying the GRUB kernel behavior at boot time override
options that you set by using the <command>eeprom</command> command. However,
these changes only remain in effect until the next time you boot the system.
See the <olink targetdoc="refman" targetptr="kernel-1m" remap="external"><citerefentry><refentrytitle>kernel</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</listitem><listitem><para>By manually editing the GRUB <filename>menu.lst</filename> file.</para><caution><para>Any system generated changes made to <filename>menu.lst</filename> entries
are changed or lost during a system upgrade. However, any new boot entries
that you manually added remain after an upgrade. You can override <command>eeprom</command> settings by editing the GRUB menu at boot time or by editing the <command>menu.lst</command> file. Changes made by editing the GRUB menu at boot time
do not persist. Changes that are made to <filename>menu.lst</filename> file
persist over system reboots.</para>
</caution>
</listitem>
</itemizedlist><task id="fwbon" arch="x86"><title>How to Modify Boot Behavior by Using the <command>eeprom</command> Command</title><indexterm><primary>Setting boot behavior by using <command>eeprom</command> command</primary><secondary>GRUB based booting</secondary>
</indexterm><indexterm><primary><command>eeprom</command> command</primary><secondary>how to use to set boot parameters</secondary><tertiary>GRUB</tertiary>
</indexterm><tasksummary><para>You can display or set boot parameters by using the <command>eeprom</command> command.
These parameters are found in the <filename>/boot/solaris/bootenv.rc</filename> file.
Changes that are made by using the <command>eeprom</command> command persist
over a system reboot. You can override <command>eeprom</command> settings
by editing the GRUB menu at boot time to specify alternative boot behavior.</para><para>See <olink targetptr="fwbme" remap="internal">How to Modify Boot Behavior by Editing
the GRUB Menu at Boot Time</olink>. For more information about changes to
the <command>eeprom</command> command in this release, see the <olink targetdoc="refman" targetptr="eeprom-1m" remap="external"><citerefentry><refentrytitle>eeprom</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</tasksummary><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step><para>To change the specified parameter, type the <command>eeprom</command> command
with the appropriate arguments .</para><screen># <userinput>eeprom <replaceable>parameter</replaceable>=<replaceable>new-value</replaceable></userinput></screen>
</step><step><para>Verify that the new parameter has been set.</para><screen># <userinput>eeprom <replaceable>parameter</replaceable></userinput></screen><para>The output should display the new <command>eeprom</command> value for
the specified parameter.</para>
</step>
</procedure><example id="fwbps" arch="x86"><title>Setting <literal>boot-file</literal> Parameters by Using the <command>eeprom</command> Command</title><para>This example shows how to manually specify that the system boot a 64-bit
kernel. Note that the system must support 64-bit computing.</para><screen># <userinput>eeprom boot-file=kernel/amd64/unix</userinput></screen><para>This example shows how to manually boot a 32-bit kernel on a 64-bit
capable system.</para><screen># <userinput>eeprom boot-file=kernel/unix</userinput></screen><para>This example shows how to restore the default auto detected boot behavior
on a system.</para><screen># <userinput>eeprom boot-file=""</userinput></screen>
</example>
</task>
</sect2><sect2 id="fwbqs" arch="x86"><title>Modifying Boot Behavior by Editing the
GRUB Menu at Boot Time</title><indexterm><primary>GRUB based booting</primary><secondary>modifying kernel Behavior in the GRUB menu at boot time</secondary>
</indexterm><indexterm><primary>GRUB menu</primary><secondary>modifying GRUB kernel behavior</secondary>
</indexterm><indexterm><primary>kernel behavior</primary><secondary>modifying in GRUB menu</secondary>
</indexterm><para>The following is an example of a GRUB main menu in a Solaris release
that supports booting a system from a ZFS root file system. This menu is based
on the contents of the <filename>menu.lst</filename> configuration file and
includes menu entries for all of the bootable OS instances on the system.
The first entry in the menu is the default, unless otherwise specified. To
specify another boot entry as the default, add the <command>default=</command><replaceable>n</replaceable> command to the <filename>menu.lst</filename> file, where <replaceable>n</replaceable> is a number, starting from 0 (the first boot entry).</para><screen>GNU GRUB  version 0.95  (637K lower / 3144640K upper memory)
 +-------------------------------------------------------------------------+
be1)
be1 failsafe
be3
be3 failsafe
be2
be2 failsafe
+-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.</screen><note><para>The information that is contained in the <filename>menu.lst</filename> file
varies, depending on the Solaris release and the installation method that
was used.</para>
</note><para>To edit a boot entry in the GRUB menu, use the arrow keys to select
the entry, then type <command>e</command>.</para><screen>GNU GRUB  version 0.95  (637K lower / 3144640K upper memory)
 +-------------------------------------------------------------------------+
findroot (BE_be1,0,a)
bootfs rpool/ROOT/szboot_0508
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS 
module$ /platform/i86pc/$ISADIR/boot_archive
 +-------------------------------------------------------------------------+
      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, 'e' to edit the
      commands before booting, or 'c' for a command-line.</screen><para>For instructions on editing the GRUB menu at boot time, see <olink targetptr="fwbme" remap="internal">How to Modify Boot Behavior by Editing the GRUB Menu at
Boot Time</olink>.</para>
</sect2><sect2 id="ghchp"><title>Description of the GRUB Edit Menu</title><para>The following examples show the edit menu in the various GRUB implementations:</para><para><emphasis role="strong">GRUB ZFS Support:</emphasis></para><screen>grub edit&gt; kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,<replaceable>prop=value</replaceable> [,<replaceable>prop=value</replaceable>...]][-asrvxk]
[-m <replaceable>smf-options</replaceable>] [-i altinit]</screen><note><para>When adding boot arguments on a system with ZFS support, any additional <option>B</option> options should be added after the default <option>B</option> <literal>$ZFS-BOOTFS</literal> argument.</para>
</note><para><emphasis role="strong">GRUB hypervisor Support:</emphasis></para><screen remap="wide" width="100">grub edit&gt; module$ /platform/i86xpv/$ISADIR/unix /platform/i86xpv/$ISADIR/unix -B $ZFS-BOOTFS,\
<replaceable>prop=value</replaceable> [,<replaceable>prop=value</replaceable>...]][-asrvxk] [-m <replaceable>smf-options</replaceable>] [-i altinit]</screen><para><emphasis role="strong">GRUB UFS Support:</emphasis></para><screen>grub edit&gt; kernel$ /platform/i86pc/kernel/$ISADIR/unix [-asrvxk]
            [-m <emphasis>smf-options</emphasis>] [-i altinit][-B <replaceable>prop=value</replaceable> [,<replaceable>prop=value</replaceable>...]]</screen>
</sect2><sect2 id="ghckl"><title>Boot Arguments You Can Specify When Editing the GRUB
Menu at Boot Time</title><para>The following list describes the boot arguments and options that can
be specified by editing the GRUB menu at boot time:</para><variablelist><varlistentry><term>unix</term><listitem><para>Specifies the kernel to boot.</para>
</listitem>
</varlistentry><varlistentry><term><option>a</option></term><listitem><para>Prompts the user for configuration information.</para>
</listitem>
</varlistentry><varlistentry><term><option>s</option></term><listitem><para>Boots the system in single-user mode.</para>
</listitem>
</varlistentry><varlistentry><term><option>r</option></term><listitem><para>Specifies a reconfiguration boot.</para><para> The  system probes all attached hardware devices and then assigns nodes
in the file system to represent only those devices that are actually found.</para>
</listitem>
</varlistentry><varlistentry><term><option>v</option></term><listitem><para>Boots the system with verbose messages enabled.</para>
</listitem>
</varlistentry><varlistentry><term><option>x</option></term><listitem><para>Does not boot in clustered mode.</para>
</listitem>
</varlistentry><varlistentry><term><option>k</option></term><listitem><para>Boots the system with the kernel debugger enabled.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>smf-options</replaceable></term><listitem><para>Controls  the boot behavior of the Service Management Facility
(SMF). Included are two categories of options, recovery options and messages
options.</para>
</listitem>
</varlistentry><varlistentry><term><option>i</option> <command>altinit</command></term><listitem><para>Specifies an alternative executable as the primordial process.
 <command>altinit</command> is a valid path to an executable.</para>
</listitem>
</varlistentry><varlistentry><term><option>B</option> <replaceable>prop=value [,prop=value]...</replaceable></term><listitem><para>Specifies kernel boot properties.</para>
</listitem>
</varlistentry>
</variablelist><para>The following are various ways you can modify boot behavior in the GRUB
menu by using the <option>B</option> <emphasis>prop=val</emphasis> option:</para><variablelist><varlistentry><term><option>B</option> <literal>console=ttya</literal></term><listitem><para>Redirects the console to <literal>ttya</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>B</option> <literal>acpi-enum=off</literal></term><listitem><para>Disables Advanced Configuration and Power Interface (ACPI)
enumeration of devices.</para>
</listitem>
</varlistentry><varlistentry><term><option>B</option> <literal>console=ttya,acpi-enum=off</literal></term><listitem><para>Redirects the console to <literal>ttya</literal> and disables
the ACPI enumeration of devices.</para>
</listitem>
</varlistentry><varlistentry><term><option>B</option> <literal>acpi-user-options=0x2</literal></term><listitem><para>Disables ACPI entirely.</para>
</listitem>
</varlistentry>
</variablelist><note><para>When properties are specified by using the <command>eeprom</command> command <emphasis>and</emphasis> on the GRUB command line, the GRUB command takes precedence.</para>
</note>
</sect2><task id="fwbme" arch="x86"><title>How to Modify Boot Behavior by Editing
the GRUB Menu at Boot Time</title><indexterm><primary>modifying kernel usage in the GRUB menu</primary>
</indexterm><indexterm><primary>boot behavior</primary><secondary>how to modify in GRUB menu</secondary>
</indexterm><indexterm><primary>GRUB based booting</primary><secondary>modifying the GRUB kernel behavior at boot time</secondary>
</indexterm><tasksummary><para>When you modify the GRUB kernel behavior by editing the GRUB menu at
boot time, the changes do not persist over a system reboot. Default boot behavior
is restored the next time you boot the system.</para>
</tasksummary><procedure><step id="fwbqq"><para>Reboot the system.</para><para>When the boot sequence
begins, the GRUB main menu is displayed.</para>
</step><step><para>Use the arrow keys to select the boot entry to edit, then type <command>e</command> to access the GRUB edit menu.</para>
</step><step><para>Use the arrow keys to select the <literal>kernel</literal> or <literal>kernel$</literal> line in this menu.</para>
</step><step><para>Type <command>e</command> to add boot arguments to the line.</para>
</step><step><para>Type any additional boot arguments that you want to specify.</para>
</step><step><para>Press Return to save your changes and return to the previous menu.</para><note><para>Pressing the Escape key returns you to the GRUB main menu without
saving your changes.</para>
</note>
</step><step><para>To boot the system, type <command>b</command>. </para><para>Changes
you make take affect when the system is booted.</para>
</step>
</procedure><example id="ggqax" arch="x86"><title>Booting a 32-Bit Kernel on a 64-Bit Enabled System</title><para>To boot a 32-bit kernel on a 64-bit capable system, add the <literal>kernel/unix</literal> argument.</para><screen>grub edit&gt; kernel /platform/i86pc/multiboot <userinput>kernel/unix</userinput><userinput></userinput></screen>
</example><example id="fwbtl" arch="x86"><title>Redirecting the Serial Console</title><para>To redirect the serial console to <literal>ttyb</literal>, add the <literal>-B console=ttyb</literal> argument.</para><screen>grub edit&gt; kernel /platform/i86pc/multiboot <userinput>-B console=ttyb</userinput></screen><para>Alternatively, you can use <literal>input-device/output-device</literal> property,
as shown in the following example:</para><screen width="100">grub edit&gt; kernel /platform/i86pc/multiboot <userinput>-B input-device=ttyb,output-device=ttyb</userinput></screen><para>This example shows how you would override the serial line speed:</para><screen>grub edit&gt; kernel /platform/i86pc/multiboot <userinput>-B ttyb-mode="115200,8,n,1,-"</userinput></screen><para><emphasis role="strong">Caution:</emphasis> In the preceding example,
the property value contains commas, which is also a property separator. To
avoid confusing the property parser, use double quotation marks around the
entire property value.</para>
</example>
</task><sect2 id="fvbsi" arch="x86"><title>Modifying Boot Behavior by Editing the <filename>menu.lst</filename> File</title><indexterm><primary>menu</primary><secondary>GRUB</secondary><tertiary>description of</tertiary>
</indexterm><indexterm><primary>GRUB menu</primary><secondary>description of</secondary>
</indexterm><indexterm><primary>boot-time interactions</primary><secondary>GRUB menu</secondary>
</indexterm><indexterm><primary><filename>menu.lst</filename> file</primary><secondary>and boot-time interactions</secondary><tertiary>description</tertiary>
</indexterm><para>The GRUB menu, which is based on the <filename>menu.lst</filename> configuration
file, can be customized. When you install or upgrade the Solaris release,
the <command>bootadm</command> command automatically updates the <filename>menu.lst</filename> file to reflect menu entries that are supported for that particular
GRUB implementation. Any newly installed OS that is listed in this file is
displayed as a boot entry in the GRUB menu when the system is rebooted. Note
that when installing an operating system other than the Solaris OS, you will
need to manually add the menu entry to the <filename>menu.lst</filename> file
afterwards.</para><para>The following is an example of a typical GRUB main menu, based on the
contents of the <filename>menu.lst</filename> file. The GRUB main menu consists
of boot entries that are available, plus a failsafe archive.</para><screen>GNU GRUB  version 0.95  (631K lower / 2095488K upper memory)
 +-------------------------------------------------------------------------+
 | Solaris 10.1 ... X86                                                    |
 | Solaris failsafe                                                        |
 |                                                                         |
 +-------------------------------------------------------------------------+</screen><para>A configurable timeout is available to boot the default OS entry. The
default OS boot entry that is booted is configurable through the <command>default</command> command. The Solaris installation software typically sets this
command to boot one of the valid Solaris boot entries. To boot a different
instance of the Solaris OS (if applicable), or to boot a different OS, use
the arrow keys to highlight a different boot entry. Then press Enter to boot
that entry. Note that if the <command>default</command> command is not set,
the first boot entry in the GRUB menu is booted.</para><para>Only the <emphasis>active</emphasis> <filename>menu.lst</filename> file
is used to boot the system.  To modify the GRUB menu that is displayed when
you boot the system, edit the active GRUB  <filename>menu.lst</filename> file.
Changing any other <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 <filename>menu.lst</filename> file, use the <command>list-menu</command> subcommand
of the <command>bootadm</command> command. For more information about using
the <command>bootadm</command> command, see <olink targetptr="gglaj" remap="internal">Using
the bootadm Command to Manage the Boot Archives</olink>.</para><para>For a complete description of the <filename>menu.lst</filename> file
in each of the GRUB implementations in the Solaris OS, see <olink targetptr="getnk" remap="internal">Supported GRUB Implementations</olink>.</para>
</sect2><task id="fvbbb" arch="x86"><title>How to Modify Boot Behavior by Editing
the <filename>menu.lst</filename> File</title><indexterm><primary>modifying boot behavior</primary><secondary>editing the GRUB <filename>menu.lst</filename> file</secondary><tertiary>how to</tertiary>
</indexterm><indexterm><primary>boot behavior</primary><secondary>editing the GRUB <filename>menu.lst</filename> file</secondary><tertiary>how to</tertiary>
</indexterm><indexterm><primary>editing the <filename>menu.lst</filename> file</primary><secondary>modifying boot behavior</secondary>
</indexterm><indexterm><primary>GRUB</primary><secondary>modifying boot behavior</secondary><tertiary>editing the <filename>menu.lst</filename> file</tertiary>
</indexterm><indexterm><primary><filename>menu.lst</filename> file</primary><secondary>modifying boot behavior</secondary>
</indexterm><tasksummary><itemizedlist><para>You might need to modify the <filename>menu.lst</filename> file for
one of the following reasons:</para><listitem><para>To add new OS entries</para>
</listitem><listitem><para>To add GRUB console redirection information</para>
</listitem>
</itemizedlist>
</tasksummary><taskprerequisites><para>Because only the <emphasis>active</emphasis> GRUB <filename>menu.lst</filename> file
is used to boot the system, make sure you edit the correct file. Changing
any other GRUB <filename>menu.lst</filename> file has no effect on the menu
that is displayed when you boot the system.</para><itemizedlist><para>The location of the active <filename>menu.lst</filename> file varies,
depending on whether you have a system with a UFS root or a ZFS root.</para><listitem><para>For a UFS root, the active <filename>menu.lst</filename> file
is <filename>/boot/grub/menu.lst</filename>.</para>
</listitem><listitem><para>For a ZFS root, the active <filename>menu.lst</filename> file
is /<replaceable>pool-name</replaceable><filename>/boot/grub/menu.lst</filename><indexterm><primary>location of active <filename>menu.lst</filename> file</primary></indexterm><indexterm><primary><filename>menu.lst</filename> file</primary><secondary>location</secondary></indexterm><indexterm><primary>active <filename>menu.lst</filename> file</primary><secondary>location of</secondary></indexterm></para>
</listitem>
</itemizedlist><para>You can determine the location of the active GRUB <filename>menu.lst</filename> file
by using the <command>bootadm</command> command with the <command>list-menu</command> subcommand.</para><screen># <userinput>bootadm list-menu</userinput></screen><para>For more information about the <command>bootadm</command> command, see
the <olink targetdoc="group-refman" targetptr="bootadm-1m" remap="external"><citerefentry><refentrytitle>bootadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</taskprerequisites><procedure><step><para>Become superuser or assume an equivalent role. </para>
</step><step><para>To add a new OS entry to the active <filename>menu.lst</filename> file,
use a text editor to modify the file.</para><para>The comments within the <filename>menu.lst</filename> file provide you with the necessary information for adding
a new OS entry.</para><para>The following is an example of a <filename>menu.lst</filename> file
on a system that is running a Solaris release with ZFS boot support.  Boot
entries in the <filename>menu.lst</filename> file vary, depending on the Solaris
release you are running.</para><screen>#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris 11 s10x_90 X86
findroot (pool_rpool,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------</screen><caution><para>Do not directly edit the original contents of the <filename>menu.lst</filename> file. To make changes to any of the OS entries in the file, edit
the file manually, duplicating the existing content. Then, make the modifications
to the duplicated content.</para><para>Also note when manually adding new
user entries to the file, do not include guard comments that are reserved
for use by the system, such as &ldquo;Added by bootadm&rdquo; or &ldquo;Added
by Live Upgrade&rdquo;. Not using these comments for manually-added entries
ensures that these entries remain intact during a software upgrade.</para>
</caution><stepalternatives><step><para>To specify a 32-bit Solaris kernel as the default kernel to boot,
remove all instances of the <literal>$ISADIR</literal> keyword from the <filename>menu.lst</filename> file.</para><screen>title Solaris Nevada snv_53 X86
kernel$ /platform/i86pc/kernel/unix [*]
module$ /platform/i86pc/boot_archive</screen><para>To specify a 32-bit kernel as the boot method, you must also change
the line that begins with the <literal>kernel</literal> keyword in the Solaris
failsafe entry:</para><screen>title Solaris failsafe
kernel /boot/platform/i86pc/kernel/unix [-B *] -s [*]
module /boot/x86.miniroot-safe</screen>
</step>
</stepalternatives><para>If you have added any additional entries,
beyond the default entries, make equivalent changes manually.</para><para>The [<option>B</option> *] and [*] flags must be preserved, if these
flags exist in the original <filename>menu.lst</filename> file. Also, the
failsafe entry should always have an <option>s</option> flag.</para>
</step><step><para>After adding the required information, save the file.</para><para>Note
that any changes you make to the file take effect at the next system reboot.</para><tip><para>If you are running the Linux OS, and install the Solaris OS, the
Linux OS entry is not displayed in the GRUB menu when the system is rebooted.
Before installing the Solaris software, save a copy of the <filename>menu.lst</filename> file
that contains the Linux information. After the installation, add the Linux
information back to the newly-created <filename>menu.lst</filename> file in
the Solaris partition.</para>
</tip><para>Because changes you make to the <filename>menu.lst</filename> file are
not directly related to the Solaris OS, you cannot make them by using the <command>eeprom</command> command. You must edit the file directly. Note that the Solaris
software upgrade process preserves any changes that you make to the <filename>menu.lst</filename> file.</para><caution><para>Solaris GRUB is capable of booting both the Linux OS and the
Solaris OS. However, Linux GRUB is not capable of booting the Solaris OS. </para><itemizedlist><para>Always ensure that one of the following conditions are met:</para><listitem><para>The Solaris <literal>fdisk</literal> partition is active,
that it has GRUB installed , and that the <filename>menu.lst</filename> file
is the <emphasis>active</emphasis> GRUB menu </para>
</listitem><listitem><para>That Solaris GRUB is installed to the Master Boot Record (MBR)
and that it refers to a <filename>menu.lst</filename> in the Solaris <literal>fdisk</literal> partition. </para>
</listitem>
</itemizedlist>
</caution><para>For a detailed description of the GRUB <filename>menu.lst</filename> that
pertains to each Solaris release, see <olink targetptr="getnk" remap="internal">Supported GRUB
Implementations</olink>.</para>
</step>
</procedure><example id="ggvmo"><title><filename>menu.lst</filename> File on a System With a ZFS Boot Loader</title><para>The following examples show what a <filename>menu.lst</filename> file
looks like on a system that has a ZFS boot loader. By default, this system
will boot from a ZFS root file system. Note that the contents of the file
varies, depending on the installation type.</para><para><emphasis role="strong">New installation or standard upgrade:</emphasis></para><screen>title Solaris 11 s10x_90 X86
findroot (pool_rpool,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title Solaris 11 failsafe
findroot (pool_rpool,0,a)
kernel /boot/platform/i86pc/kernel/unix -B console=ttyb
module /boot/x86.miniroot-safe</screen><para><emphasis role="strong">Solaris Live Upgrade:</emphasis></para><screen>title be1
findroot (BE_be1,0,a)
bootfs rpool/ROOT/szboot_0508
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb
module /boot/x86.miniroot-safe</screen>
</example><example id="ggvnh"><title><filename>menu.lst</filename> File on a System With a UFS Boot Loader</title><para>The following examples show what a <filename>menu.lst</filename> file
looks like on a system that has a UFS root file system installed. By default,
this system will boot from a UFS root file system.</para><para><emphasis role="strong">New installation or standard upgrade:</emphasis></para><screen>title Solaris 11 s10x_90 X86
findroot (rootfs0,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive

title Solaris 11 failsafe
findroot (rootfs0,0,a)
kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb
module /boot/x86.miniroot-safe</screen><para><emphasis role="strong">Solaris Live Upgrade:</emphasis></para><screen>title be1
findroot (BE_be1,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix
module$ /platform/i86pc/$ISADIR/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb
module /boot/x86.miniroot-safe</screen>
</example><example id="gfrge" arch="x86"><title><filename>menu.lst</filename> File With Hypervisor Support</title><para>The following examples are for a GRUB implementation that supports booting
the Solaris OS as a dom0, with hypervisor support.</para><para>In this example, the <filename>menu.lst</filename> file has been modified
to enable a 64-bit capable system to boot the Solaris OS as a dom0, in 32-bit
mode. This modification includes removing all instances of <literal>$ISADIR</literal> from
the file.</para><screen>title 32-bit Solaris on xVM
kernel$ /boot/xen.gz
module$ /platform/i86xpv/kernel/unix /platform/i86xpv/kernel/unix -B $ZFS-BOOTFS [*]
module$ /platform/i86pc/boot_archive</screen><para>In this example, the <filename>menu.lst</filename> file has been modified
to direct the hypervisor to use the serial console. Note that the serial console
is also shared by the Solaris OS dom0 console.</para><screen width="100">title Solaris on xVM
kernel$ /boot/$ISADIR/xen.gz console=com1 com1=9600,8n1
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix \
-B $ZFS-BOOTFS console=hypervisor
module$ /platform/i86pc/$ISADIR/boot_archive</screen>
</example>
</task><sect2 id="gguqf" arch="x86"><title>Locating the Active GRUB <filename>menu.lst</filename> File</title><para>On systems that have a ZFS root, the active <filename>menu.lst</filename> file
is typically located in <filename>/<replaceable>pool-name</replaceable>/boot/grub/menu.lst</filename>.</para><para>On systems that have a UFS root, the active <filename>menu.lst</filename> file
is typically located in <filename>/boot/grub/menu.lst</filename>.</para><para>To locate the active GRUB menu, use the <command>bootadm</command> command
with the <command>list-menu</command> subcommand:</para><screen># <userinput>bootadm list-menu</userinput></screen><para>This command also lists the contents of the active <filename>menu.lst</filename> file:</para><screen># <userinput>bootadm list-menu</userinput>
The location for the active GRUB menu is: /<replaceable>pool-name</replaceable>/boot/grub/menu.lst
default 0
timeout 10
0 be1
1 be1 failsafe
2 be3
3 be3 failsafe
4 be2
5 be2 failsafe</screen><para>For further instructions on using the <command>bootadm</command> command,
see <olink targetptr="gglaj" remap="internal">Using the bootadm Command to Manage the Boot
Archives</olink>.</para>
</sect2><sect2 id="ggumt" arch="x86"><title>Implementation of the <command>findroot</command> Command</title><indexterm><primary><command>findroot</command> command</primary><secondary>menu.lst entries</secondary>
</indexterm><para>All Solaris installation methods, including Solaris Live Upgrade, now
use the <command>findroot</command> command for specifying which disk slice
on an x86 based system to boot. This implementation supports booting systems
with ZFS roots, as well as UFS roots. This information is located in the <filename>menu.lst</filename> file that is used by GRUB. Previously, the <command>root</command> command, <command>root</command> (<literal>hd0.0.a</literal>), was used to explicitly specify
which disk slice to boot. </para><para>The installation methods include Solaris Live Upgrade, JumpStart, and
the installation GUI program.</para><para>In addition to the <command>findroot</command> command, is the additional of a
signature file on the slice, (<replaceable>mysign</replaceable>, <literal>0,
a</literal>), where <replaceable>mysign</replaceable> is the name of a signature
file that is located in the <filename>/boot/grub/bootsign</filename> directory.
When booting a system from a ZFS root, the ZFS GRUB plug-in looks for and
tries to mount a ZFS file system in slice <literal>a</literal> of <literal>fdisk</literal> partition <literal>0</literal>. </para><para>The name of the
signature file varies, depending on the type of installation that was used.
For more information about the naming convention that is used by the <command>findroot</command> command, see <olink targetptr="ghskt" remap="internal">Naming Conventions That Are
Used by the findroot Command</olink>.</para><para>Additional menu entries, which also use the <command>findroot</command> command, can be added to the GRUB
menu after an installation or upgrade. For instructions, see  <olink targetptr="ggvms" remap="internal">How to Add GRUB Menu Entries That Use the findroot Command</olink>.</para><caution><para>The boot signature must be unique. Do not use or remove system
generated signatures or user signatures that are duplicated across multiple
instances of the Solaris software. Doing so might result in booting an incorrect
OS instance or prevent the system from booting.</para>
</caution><para>Note that the <command>root</command> command can still be used in the <filename>menu.lst</filename> file in certain instances, for example to boot Windows.
However, use of the <command>root</command> command in cases where the <command>findroot</command> command is preferred is discouraged.</para><example id="ghcrj" arch="x86"><title>Default <filename>menu.lst</filename> file on a System That Uses the <command>findroot</command> Command</title><para>The following example shows the format of a <filename>menu.lst</filename> file
entry that implements the <command>findroot</command> command:</para><screen># title Solaris <replaceable>version</replaceable>
	findroot  (foosign<replaceable>partition-no</replaceable>,<replaceable>slice-no</replaceable>,x) --x = Solaris root slice
	kernel$ /platform/i86pc/kernel/$ISADIR/unix
	module$ /platform/i86pc/$ISADIR/boot_archive</screen>
</example><example id="ghcsp" arch="x86"><title>Default <filename>menu.lst</filename> file
That Supports ZFS Boot Loader</title><para>This is an example of a <filename>menu.lst</filename> file on system
that supports a ZFS boot loader. The information for booting from a ZFS root
file system is automatically added to the file when a Solaris Live Upgrade
is performed.</para><screen>title be1
findroot (BE_be1,0,a)
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive

title be1 failsafe
findroot (BE_be1,0,a)
bootfs rpool/ROOT/szboot_0508
kernel /boot/platform/i86pc/kernel/unix -s -B console=ttyb
module /boot/x86.miniroot-safe</screen>
</example>
</sect2><task id="ggvms" arch="x86"><title>How to Add GRUB Menu Entries That Use the <command>findroot</command> Command</title><indexterm><primary><command>findroot</command> command</primary><secondary>adding GRUB menu entries</secondary>
</indexterm><indexterm><primary>adding GRUB menu entries</primary><secondary><command>findroot</command> command</secondary>
</indexterm><indexterm><primary><filename>menu.lst</filename> file</primary><secondary>adding entries that use the <command>findroot</command> command</secondary>
</indexterm><tasksummary><para>This procedure shows how to manually update the <filename>menu.lst</filename> file
with user defined entries that use the <command>findroot</command> command.
Typically, these entries are added after an installation or an upgrade. For
guidelines on adding user&hyphen;defined
entries that use the <command>findroot</command> command, see <olink targetptr="ggumt" remap="internal">Implementation of the findroot Command</olink>.</para>
</tasksummary><procedure><step><para>Become superuser or assume an equivalent role.</para>
</step><step><para>Create a boot signature file on the root (<filename>/</filename>) file
system or root pool that is booted.</para><stepalternatives><step><para>For a ZFS pool, <replaceable>my-pool</replaceable>, create the
boot signature file in the <filename>/<replaceable>my-pool</replaceable>/boot/grub/bootsign</filename> directory.</para><screen>#  <userinput>touch   /<replaceable>my-pool</replaceable>/boot/grub/bootsign/<replaceable>user-sign</replaceable></userinput></screen>
</step><step><para>For a UFS file system, create the boot signature file in the <filename>/boot/grub/bootsign</filename> directory of the root file system to be booted.</para><screen>#  <userinput>touch   /boot/grub/bootsign/<replaceable>user-sign</replaceable></userinput></screen>
</step>
</stepalternatives><note><para>Make sure the file name that you choose for the boot signature is unique. Do not use system
generated signature names or user signature names that are duplicated across
multiple instances of the Solaris software. Doing so might prevent the system
from booting or cause the wrong Solaris instance to boot.</para>
</note>
</step><step><para>Add a menu entry that contains the <command>findroot</command> command.</para><substeps><step><para>Locate the active <filename>menu.lst</filename> file:</para><screen># <userinput>bootadm list-menu</userinput></screen>
</step><step><para>Using a text editor, edit the active <filename>menu.lst</filename> file,
adding the following entry:</para><screen>title    User Solaris boot entry
findroot  (<replaceable>user-sign</replaceable>, 3, c)
kernel$   /platform/i86pc/kernel/$ISADIR/unix
module$  /platform/i86pc/$ISADIR/boot_archive</screen><para>In the
preceding example, the <literal>3</literal> represents the 4th <literal>fdisk</literal> partition (partitions
start at 0). The <literal>c</literal> represents the slice within a Solaris <literal>fdisk</literal> partition (slices start with a).</para>
</step>
</substeps>
</step><step><para>Reboot the system.</para><para>The new entry appears in the GRUB
menu and can be selected to boot the specified Solaris OS instance.</para>
</step>
</procedure>
</task>
</sect1>
</chapter><?Pub *0000069878 0?>