1.List out the current boot environments.In active column, NR stands for active Now(N) and active on Reboot(R).And also you can see there is no snapshot exist on the system
root@Unixarena-SOL11:~# date
Saturday, July 6, 2013 04:24:21 PM IST
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
solaris NR / 2.37G static 2013-06-11 06:27
root@Unixarena-SOL11:~# zfs list |grep @
root@Unixarena-SOL11:~#
2.Clone the current BE to new BE called UA-NEW.Here unlike solaris 10,snapshots are kept in the background. So you can see only new BE’s datasets. The datasets name with UA-NEW belongs to new boot environment.
root@Unixarena-SOL11:~# beadm create UA-NEW
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW - - 61.0K static 2013-07-06 16:28
solaris NR / 2.37G static 2013-06-11 06:27
root@Unixarena-SOL11:~# beadm list -a UA-NEW
BE/Dataset/Snapshot Active Mountpoint Space Policy Created
------------------- ------ ---------- ----- ------ -------
UA-NEW
rpool/ROOT/UA-NEW - - 87.0K static 2013-07-16 23:31
rpool/ROOT/UA-NEW/var - - 1.0K static 2013-07-16 23:31
root@Unixarena-SOL11:~#
3. Mount the boot environment.
root@Unixarena-SOL11:~# mkdir /UA-NEW
root@Unixarena-SOL11:~# beadm mount UA-NEW /UA-NEW
root@Unixarena-SOL11:~# df -h /UA-NEW
Filesystem Size Used Available Capacity Mounted on
rpool/ROOT/UA-NEW 15G 3.9G 8.8G 31% /UA-NEW
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW - /UA-NEW 88.0K static 2013-07-16 23:31
solaris NR / 5.24G static 2013-02-12 03:26
root@Unixarena-SOL11:~#
4.Now we will install new package on UA-NEW.
root@Unixarena-SOL11:~# pkg -R /UA-NEW verify -v diffstat
pkg verify: no packages matching 'diffstat' installed
root@Unixarena-SOL11:~# pkg -R /UA-NEW install diffstat
Packages to install: 1
Planning linked: 0/3 done; 1 working: zone:webunixarena1
Planning linked: 0/3 done; 1 working: zone:webunixarena1
Planning linked: 1/3 done; 1 working: zone:dbunixarena1
Planning linked: 2/3 done; 1 working: zone:newzone
Planning linked: 3/3 done
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 6/6 0.0/0.0 0B/s
Downloading linked: 0/3 done; 1 working: zone:webunixarena1
Downloading linked: 1/3 done; 1 working: zone:dbunixarena1
Downloading linked: 2/3 done; 1 working: zone:newzone
Downloading linked: 3/3 done
PHASE ITEMS
Installing new actions 24/24
Updating package state database Done
Updating image state Done
Creating fast lookup database Done
Executing linked: 0/3 done; 1 working: zone:webunixarena1
Executing linked: 1/3 done; 1 working: zone:dbunixarena1
Executing linked: 2/3 done; 1 working: zone:newzone
Executing linked: 3/3 done
root@Unixarena-SOL11:~#
Note:You need to configure IPS to install new packages.
5.Verify the package on UA-NEW.
root@Unixarena-SOL11:~# pkg -R /UA-NEW verify -v diffstat
PACKAGE STATUS
pkg://solaris/text/diffstat OK
root@Unixarena-SOL11:~# pkg -R /UA-NEW list diffstat
NAME (PUBLISHER) VERSION IFO
text/diffstat 1.51-0.175.1.0.0.9.0 i--
root@Unixarena-SOL11:~#
6.Activate the UA-NEW.
root@Unixarena-SOL11:~# beadm activate UA-NEW
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW R /UA-NEW 5.39G static 2013-07-16 23:31
solaris N / 2.08M static 2013-02-12 03:26
root@Unixarena-SOL11:~#
7.Reboot the system to boot the system from UA-NEW.
root@Unixarena-SOL11:~# init 6
while rebooting system,you can see the below screen on X86 systems.
8.Verify whether system is boot from UA-NEW.
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW NR / 5.79G static 2013-07-16 23:31
solaris - - 6.55M static 2013-02-12 03:26
root@Unixarena-SOL11:~#
Note:Look at the Active column to confirm BE state. N- Active Now; R- Active on Reboot;
9.Verify the installed packages are available in current boot environment.
root@Unixarena-SOL11:~# pkg list diffstat
NAME (PUBLISHER) VERSION IFO
text/diffstat 1.51-0.175.1.0.0.9.0 i--
root@Unixarena-SOL11:~#
10.You can also do the verification on OLD-BE, whether the package is available there are not.
root@Unixarena-SOL11:~# mkdir /old-be
root@Unixarena-SOL11:~# beadm mount solaris /old-be
root@Unixarena-SOL11:~# pkg -R /old-be list diffstat
pkg list: no packages matching 'diffstat' installed
root@Unixarena-SOL11:~#
1.Any time you can rollback the Solaris 11 to old boot environment using below command.
root@Unixarena-SOL11:~# beadm activate solaris
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW N / 341.97M static 2013-07-16 23:31
solaris R /old-be 5.26G static 2013-02-12 03:26
root@Unixarena-SOL11:~#
N- Active now
R- Active upon Reboot
2.Reboot the server using “init 6” .
root@Unixarena-SOL11:~# init 6
While rebooting the server,you can see the below screen on X86 machines.
3.Now you won;t see the new package on the system.
root@Unixarena-SOL11:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
UA-NEW - - 343.81M static 2013-07-16 23:31
solaris NR / 5.36G static 2013-02-12 03:26
root@Unixarena-SOL11:~# pkg list diffstat
pkg list: no packages matching 'diffstat' installed
root@Unixarena-SOL11:~#
The you can manage the boot environments for OS patch bundle installation.
Thank you for reading this article. Please leave a comment if you have any doubt.
dhanraj sharma says
1st we need configure IPS. then we will have to create BE with the help of beadm command. it is correct for Solaris 11?