Forum Stats

  • 3,873,311 Users
  • 2,266,534 Discussions
  • 7,911,502 Comments

Discussions

solaris 10x86: luactivate not updating /rpool/boot/grub/menu.lst

spackard
spackard Member Posts: 4
edited Mar 8, 2018 6:56PM in Solaris on x86

Reproducible with:

# lustatus

Boot Environment           Is       Active Active    Can    Copy

Name                       Complete Now    On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

s10_1-13                   yes      no     no        yes    -

20170914                   yes      yes    yes       no     -

# lucreate -n 20170914-another

Checking GRUB menu...

System has findroot enabled GRUB

Analyzing system configuration.

Updating boot environment description database on all BEs.

Updating system configuration files.

Creating configuration for boot environment <20170914-another>.

Source boot environment is <20170914>.

Creating file systems on boot environment <20170914-another>.

Populating file systems on boot environment <20170914-another>.

Analyzing zones.

Duplicating ZFS datasets from PBE to ABE.

Creating snapshot for <rpool/ROOT/20170914> on <rpool/ROOT/[email protected]>.

Creating clone for <rpool/ROOT/[email protected]> on <rpool/ROOT/20170914-another>.

Mounting ABE <20170914-another>.

Generating file list.

Finalizing ABE.

Fixing zonepaths in ABE.

Unmounting ABE <20170914-another>.

Fixing properties on ZFS datasets in ABE.

Reverting state of zones in PBE <20170914>.

Making boot environment <20170914-another> bootable.

Updating bootenv.rc on ABE <20170914-another>.

Saving existing file </boot/grub/menu.lst> in top level dataset for BE <s10_1-13> as <mount-point>//boot/grub/menu.lst.prev.

Saving existing file </boot/grub/menu.lst> in top level dataset for BE <20170914-another> as <mount-point>//boot/grub/menu.lst.prev.

File </boot/grub/menu.lst> propagation successful

Copied GRUB menu from PBE to ABE

No entry for BE <20170914-another> in GRUB menu

Population of boot environment <20170914-another> successful.

Creation of boot environment <20170914-another> successful.

# luactivate 20170914-another

System has findroot enabled GRUB

Generating boot-sign, partition and slice information for PBE <20170914>

A Live Upgrade Sync operation will be performed on startup of boot environment <20170914-another>.

Generating boot-sign for ABE <20170914-another>

Saving existing file </etc/bootsign> in top level dataset for BE <20170914-another> as <mount-point>//etc/bootsign.prev.

Generating partition and slice information for ABE <20170914-another>

Copied boot menu from top level dataset.

Generating multiboot menu entries for PBE.

Generating multiboot menu entries for ABE.

Disabling splashimage

Re-enabling splashimage

No more bootadm entries. Deletion of bootadm entries is complete.

GRUB menu default setting is unaffected

Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you

reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You

MUST USE either the init or the shutdown command when you reboot. If you

do not use either init or shutdown, the system will not boot using the

target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process

needs to be followed to fallback to the currently working boot environment:

1. Boot from the Solaris failsafe or boot in Single User mode from Solaris

Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like

/mnt). You can use the following commands in sequence to mount the BE:

     zpool import rpool

     zfs inherit -r mountpoint rpool/ROOT/20170914

     zfs set mountpoint=<mountpointName> rpool/ROOT/20170914

     zfs mount rpool/ROOT/20170914

3. Run <luactivate> utility with out any arguments from the Parent boot

environment root slice, as shown below:

     <mountpointName>/sbin/luactivate

4. luactivate, activates the previous working boot environment and

indicates the result.

5. umount /mnt

6. zfs set mountpoint=/ rpool/ROOT/20170914

7. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service

Propagating findroot GRUB for menu conversion.

File </etc/lu/installgrub.findroot> propagation successful

File </etc/lu/stage1.findroot> propagation successful

File </etc/lu/stage2.findroot> propagation successful

File </etc/lu/GRUB_capability> propagation successful

Deleting stale GRUB loader from all BEs.

File </etc/lu/installgrub.latest> deletion successful

File </etc/lu/stage1.latest> deletion successful

File </etc/lu/stage2.latest> deletion successful

Activation of boot environment <20170914-another> successful.

# cat /rpool/boot/grub/menu.lst

default 2

splashimage /boot/grub/splash.xpm.gz

#pragma ident   "@(#)menu.lst   1.2     10/06/11 SMI"

#

# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.

#

# With zfs root the active menu.lst file is /<pool>/boot/grub/menu.lst

# This reference copy of the file is not used.

#

# default menu entry to boot

#

# menu timeout in second before default OS is booted

# set to -1 to wait for user input

timeout 10

#

# To enable grub serial console to ttya uncomment the following lines

# and comment out the splashimage line below

# WARNING: do not enable grub serial console when BIOS console serial

#       redirection is active.

#   serial --unit=0 --speed=9600

#   terminal serial

#

# Uncomment the following line to enable GRUB splashimage on console

#

# To chainload another OS

#

# title Another OS

#       root (hd<disk no>,<partition no>)

#       chainloader +1

#

# To chainload a Solaris release not based on grub

#

# title Solaris 9

#       root (hd<disk no>,<partition no>)

#       chainloader +1

#       makeactive

#

# To load a Solaris instance based on grub

#

# title Solaris <version>

#       root (hd<disk no>,<partition no>,x)     --x = Solaris root slice

#       kernel /platform/i86pc/multiboot

#       module /platform/i86pc/boot_archive

#

# To override Solaris boot args (see kernel(1M)), console device and

# properties set via eeprom(1M) edit the "kernel" line to:

#

#   kernel /platform/i86pc/multiboot <boot-args> -B prop1=val1,prop2=val2,...

#

#----- s10_1-13 - ADDED BY LIVE UPGRADE - DO NOT EDIT  -----

title s10_1-13

findroot (BE_s10_1-13,0,a)

bootfs rpool/ROOT/s10_1-13

kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS

module /platform/i86pc/boot_archive

title s10_1-13 failsafe

findroot (BE_s10_1-13,0,a)

bootfs rpool/ROOT/s10_1-13

kernel /boot/multiboot -s

module /boot/amd64/x86.miniroot-safe

#----- s10_1-13 -------------- END LIVE UPGRADE ------------

#----- 20170914 - ADDED BY LIVE UPGRADE - DO NOT EDIT  -----

title 20170914

findroot (BE_20170914,0,a)

bootfs rpool/ROOT/20170914

kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS

module /platform/i86pc/boot_archive

title 20170914 failsafe

findroot (BE_20170914,0,a)

bootfs rpool/ROOT/20170914

kernel /boot/multiboot -s

module /boot/amd64/x86.miniroot-safe

#----- 20170914 -------------- END LIVE UPGRADE ------------

# lustatus

Boot Environment           Is       Active Active    Can    Copy

Name                       Complete Now    On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

s10_1-13                   yes      no     no        yes    -

20170914                   yes      yes    no        no     -

20170914-another           yes      no     yes       no     -

# lustatus

Boot Environment           Is       Active Active    Can    Copy

Name                       Complete Now    On Reboot Delete Status

-------------------------- -------- ------ --------- ------ ----------

s10_1-13                   yes      no     no        yes    -

20170914                   yes      yes    no        no     -

20170914-another           yes      no     yes       no     -

[email protected]# luactivate 20170914

System has findroot enabled GRUB

Generating boot-sign, partition and slice information for PBE <20170914>

Activating the current boot environment <20170914> for next reboot.

The current boot environment <20170914> has been activated for the next reboot.

[email protected]# ludelete 20170914-another

System has findroot enabled GRUB

Checking if last BE on any disk...

BE <20170914-another> is not the last BE on any disk.

No entry for BE <20170914-another> in GRUB menu

Updating boot environment configuration database.

Updating boot environment description database on all BEs.

Updating all boot environment configuration databases.

spackardsleepyweasel

Best Answer

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Oct 25, 2017 3:26PM Answer ✓

    Hi.

    Read all that system say:

    =============================

    The target boot environment has been activated. It will be used when you

    reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You

    MUST USE either the init or the shutdown command when you reboot. If you

    do not use either init or shutdown, the system will not boot using the

    target BE.

    ==================

    Final activation will be done at shutdown  step.

    Regards,

    Nik.

    spackardspackardsleepyweasel

Answers

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Oct 25, 2017 3:26PM Answer ✓

    Hi.

    Read all that system say:

    =============================

    The target boot environment has been activated. It will be used when you

    reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You

    MUST USE either the init or the shutdown command when you reboot. If you

    do not use either init or shutdown, the system will not boot using the

    target BE.

    ==================

    Final activation will be done at shutdown  step.

    Regards,

    Nik.

    spackardspackardsleepyweasel
  • spackard
    spackard Member Posts: 4
    edited Oct 26, 2017 10:55AM

    Thank you for the very quick response.  Yes, shutdown... updates the /rpool/boot/grub/menu.lst file.

    Fixed it for me (my bad).

    Regards, Scott

  • Nik
    Nik Blocked Member Posts: 2,879 Bronze Crown
    edited Oct 26, 2017 11:16AM

    Hi.

    Please mark questions as answered.

    Regards,

    Nik.

This discussion has been closed.