System Administration Guide: Basic Administration

ProcedureSPARC: How to Boot a Solaris Kernel Other Than the Default Kernel

  1. Become superuser or assume an equivalent role.

  2. Obtain a copy of an existing Solaris kernel and rename it.

  3. Add the kernel that you copied and renamed in Step 2 to the /etc/boot/solaris/filelist.ramdisk file.


    # echo "kernel.name" >> /boot/solaris/filelist.ramdisk
    
  4. Verify that the alternate kernel has been added the /etc/boot/solaris/filelist.ramdisk file.


    # cat > /etc/boot/solaris/filelist.ramdisk
    
  5. Update the boot archive by using the bootadm command.


    # bootadm update-archive
    
  6. Change to run level 0.


    # init 0
    

    The ok PROM prompt is displayed.

  7. Boot the alternate kernel.


    ok boot alternate-kernel
    

    For example:


    ok boot kernel.myname/sparcv9/unix
    
    • To boot the alternate kernel by default, follow these steps:

      1. Set the boot-file parameter to the new kernel.


        ok setenv boot-file kernel.name/sparc9/unix
        
      2. Verify that the boot-file property has been changed.


        ok printenv boot-file
        
      3. Reboot the system.


        ok boot
        
  8. After the system has booted, verify that the alternate kernel that was booted.


    # prtconf -vp | grep whoami
    

Example 12–4 Booting an Alternate Solaris Kernel by Changing the Default Boot File


# cp -r /platform/sun4v/kernel /platform/sun4vu/kernel.caiobella
# echo "kernel.caiobela" >> /boot/solaris/filelist.ramdisk

# cat > /etc/boot/solaris/filelist.ramdisk
/platform/sun4v/kernel.caiobella
^D (control D)

ok setenv boot-file kernel.caiobells/sparcv9/unix
ok printenv boot-file
boot-file = kernel.caiobella/sparcv9/unix

ok boot

SC Alert: Host System has Reset

SC Alert: Host system has shut down.


Sun Fire T200, No KeyboardCopyright 2006 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.25.0.build_01***PROTOTYPE BUILD***, 32760 MB memory available, Serial 
#69060038.
Ethernet address 0:x:4f:x:c5:c6, Host ID: 8xxc5c6.



Rebooting with command: boot
Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a  File and 
args: kernel.caiobella/sparcv9/unix
SunOS Release 5.10
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
DEBUG enabled
misc/forthdebug (176650 bytes) loaded
Hostname: seasonz
NIS domain name is lab.domain.sun.com
Reading ZFS config: done.

seasonz console login:
Password:
Last login: Mon Nov 12 18:02:00 on console
Sun Microsystems Inc.   SunOS 5.11
.
.
.
You have new mail.
#
#
# prtconf -vp | grep whoami
        whoami:  '/platform/sun4v/kernel.caiobella/sparcv9/unix'