Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: August 2021
 
 

Invoking the Kernel Zone Boot Loader

The kernel zone boot loader manages booting operations on the kernel zone. To invoke the boot loader, the kernel zone must be in the ready or installed state.

    You can use the kernel zone boot loader to perform the following operations:

  • List available boot environments

  • Boot the zone to an alternate boot environment

Use the zoneadm boot command to invoke the kernel zone boot loader. You must also invoke the zone console when you invoke the kernel zone boot loader. The boot loader output will appear in the zone console.


Note -  The command sequence to exit from the zone console is the tilde followed by a dot, ~..

For information about creating and managing boot environments on the operating system level, see Chapter 1, Introduction to Managing Boot Environments in Creating and Administering Oracle Solaris 11.4 Boot Environments. Additional information for managing zones and boot environments is available in Chapter 2, beadm Zones Support in Creating and Administering Oracle Solaris 11.4 Boot Environments.

How to Specify Alternate Boot Environments in a Kernel Zone

  1. Become a zone administrator.

    For more information, see Using Rights Profiles to Install and Manage Zones in Creating and Using Oracle Solaris Zones.

  2. Log in to the kernel zone console.
    global$ pfbash zlogin -C kzone
  3. In a separate terminal window, list the available kernel zone boot environments.

    Output is similar to the following:

    global$ pfbash zoneadm -z kzone boot -- -L
    [Connected to zone 'kzone' console]
    1 kz-130118 (rpool/ROOT/kz-130118)
    2 kz-1 (rpool/ROOT/kz-1)
    3 solaris-5 (rpool/ROOT/solaris-5)
    4 solaris-7 (rpool/ROOT/solaris-7)
    Select environment to boot: [ 1 - 4 ]:
  4. Boot to a selected boot environment.
    global$ zoneadm -z kzone boot -- -Z boot-environment
Example 54  Selecting and Booting Alternate Boot Environments on a SPARC Based System

The following example shows the zone console output for alternate boot environments for the kernel zone kzone1. The kernel zone host hardware is a SPARC system.

[Connected to zone 'kzone1' console]
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.


SPARC T4-2, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.36.0.build_05, 2.0000 GB memory available, Serial #1845652596.
Ethernet address 0:0:0:0:0:0, Host ID: 6e026c74.

Boot device: disk0  File and args: -L
1 Oracle Solaris 11.2 SPARC
2 bootenv123
3 bootenv456
Select environment to boot: [ 1 - 3 ]: 2

To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/bootenv123

Program terminated
ok boot -Z rpool/ROOT/bootenv123

[NOTICE: Zone rebooting]
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.

SPARC T4-2, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.36.0.build_05, 2.0000 GB memory available, Serial #1845652596.
Ethernet address 0:0:0:0:0:0, Host ID: 6e026c74.

Hostname: kzone1
kzone1 console login: 
Example 55  Selecting and Booting Alternate Boot Environments on an x86 Based System

The following example shows the zone console output for alternate boot environments for the kernel zone kzone1. The kernel zone host hardware is an x86 system.

[Connected to zone 'kzone1' console]
1 boot-2 (rpool/ROOT/boot-2)
2 Oracle Solaris 11.2 x86 (rpool/ROOT/solaris)
3 boot-1 (rpool/ROOT/boot-1)
Select environment to boot: [ 1 - 3 ]:2
Boot device: disk0  File and args:
reading module /platform/i86pc/amd64/boot_archive...done.
reading kernel file /platform/i86pc/kernel/amd64/unix...done.
SunOS global 5.11 11.2 i86pc i386 i86pc
Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved.
Hostname: kzone1
-
kzone1 console login: