Well thought I should upgrade from Solaris 11 (nevada b22) to the latest (nevada b26) on my Ferrari 3400 x86 box, just to see what's new and wanted to install the new Gnome 2.12 tarballs on the latest build.
So had heard of Solaris Live Upgrade, the ability to upgrade your system on the fly and thought himm sounds like something to try. So checked out our friendly sun docs "Solaris 10 Installation Guide: Solaris Live Upgrade and Upgrade Planning":http://docsview.eng/app/docs/doc/817-5505/6mkv5m1l0?a=view and wished I hadn't
Very long winded, hey I'm an engineer attention span of a gnat when it comes to manuals
So in the best engineering tradition went and picked someone else's brain [thanks "Darren":http://blogs.sun.com/dar ].
* Where's Partition Magic when you need it?*
OK so first problem, when I setup Solaris on my dual boot box initially I went for 2 slices (partitions - why slices who knows?), one for root and another for my /export/home. Not so good. In order to use the Live Upgrade I needed another slice to setup my boot environment in
Now they tell me. So thankfully with a little housekeeping I reduced my home enough to be able to copy it all into the root slice (cpio is your friend). Once that's copied off then I was able to resize my /export/home and create a new slice to hold my boot environment. Once that was done I just copied my home back to the resized /export/home.
I checked that the lu* packages hadn't changed between b22 and b26, so thought I was safe enough skipping this step. But if they have changed you will get an error. So to be safe:
1. Install the Solaris lu packages from the ISO you have just grabbed above and install them in the current image you are running and want to upgrade from.
2. Use the new lu tools for the live upgrade.
Will just have to grab the ISO, and type the above luupgrade comand targeting my now old version of Solaris solenv_0. Follow this with an luactivate, reboot and we are good to go.
* Install suggestion *
Wouldn't it be nice if you where installing Solaris for the first time on an x86 Windows machine and the installer setup everything by default to make LiveUpgrade easy. So during install it could setup for dual boot, make Solaris the default (optionally), then create two root partitions (slices) and one /export/home. Explaining to the user as you go that this will allow users to upgrade their version of Solaris, whilst still maintaining their current version completely intact.
Very long winded, hey I'm an engineer attention span of a gnat when it comes to manuals
So in the best engineering tradition went and picked someone else's brain [thanks "Darren":http://blogs.sun.com/dar ].
* Where's Partition Magic when you need it?*
OK so first problem, when I setup Solaris on my dual boot box initially I went for 2 slices (partitions - why slices who knows?), one for root and another for my /export/home. Not so good. In order to use the Live Upgrade I needed another slice to setup my boot environment in
Now they tell me. So thankfully with a little housekeeping I reduced my home enough to be able to copy it all into the root slice (cpio is your friend). Once that's copied off then I was able to resize my /export/home and create a new slice to hold my boot environment. Once that was done I just copied my home back to the resized /export/home.
$ cd /export/home
$ find . --- depth ---print | cpio -pvd /export/home2
* Format *
Boy do I want a good partition manager on Solaris. Please if anyone is listening ... So off to format, then select partition, edit my home slice to change its size, setup one of the unassigned slices to 9 Gig as another root slice and I'm done. No don't forget to type label, himm obvious not.
$ format
> partition
> print - prints out partition table showing slices [partitions]
select partition to edit - change cylinder size as required
Slice 3 will be our new boot environment, so set it to be same size as current root partition,
adjusted slice 7 to give us enough room for new boot env slice:
0 root wm 3 - 5082 9.77GB (5080/0/0) 20482560
3 unassigned wm 5384 - 10463 9.77GB (5080/0/0) 20482560
7 home wm 10464 - 29613 36.82GB (19150/0/0) 77212800
> label
> quit
Need to create new file system on home slice 7 - will wipe this slice
$ newfs /dev/dsk/c0d0s7
* Grabbing the ISO *
Too painful to describe getting this remotely (/usr/sfw/bin/ncftp is your dearest friend, thank god for resume), but eventually got the nevada b26 iso and cut it to disc:
$ cdrw ---iv solarisdvd.iso [ create DVD of ISO image ]
* NOTE: Using the latest Live Upgrade tools *
[Comment from UVR] You need to make sure to be using the Live Upgrade tools from the release you are upgrading too
I checked that the lu* packages hadn't changed between b22 and b26, so thought I was safe enough skipping this step. But if they have changed you will get an error. So to be safe:
1. Install the Solaris lu packages from the ISO you have just grabbed above and install them in the current image you are running and want to upgrade from.
2. Use the new lu tools for the live upgrade.
* Create Boot Environment *
Now all ready to go. Create your new boot env from the command line (can do it from a curses app, xterm -e lu &, but command line simpler and faster).
$ lucreate ---c solenv_s0 ---m /:/dev/dsk/c1d0s3:ufs -n solenv_s3
Creation of boot environment successful.
$ lustatus solenv_s3
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
solenv_s3 yes no no yes -
* Upgrade and Activate *
Now that I have my boot environment and my iso all I had to do to upgrade the boot environment was:
$ luupgrade ---u ---n solenv_s3 -s /cdrom/sol_11_x86/
$ luactivate solenv_s3 -> activates new upgraded boot environment
To check it out the upgrade before running just put in -N as the first param and this will do a dry run to check out your params and so on. 2 hrs later, the upgrade completed, did the activate, rebooted and it was all done, hooray !!
Then I just went and downloaded the Gnome 2.12 tarball and installed it on my new nevada b26 boot environment and all was well with the world.
* Next Time *
This will be so much easier next time round, isn't it always
Will just have to grab the ISO, and type the above luupgrade comand targeting my now old version of Solaris solenv_0. Follow this with an luactivate, reboot and we are good to go.
* Install suggestion *
Wouldn't it be nice if you where installing Solaris for the first time on an x86 Windows machine and the installer setup everything by default to make LiveUpgrade easy. So during install it could setup for dual boot, make Solaris the default (optionally), then create two root partitions (slices) and one /export/home. Explaining to the user as you go that this will allow users to upgrade their version of Solaris, whilst still maintaining their current version completely intact.
Posted by Per Öberg on November 07, 2005 at 08:15 PM GMT #
I think qtparted will probably do the job. http://qtparted.sourceforge.net/
Posted by shaun on November 08, 2005 at 12:20 AM GMT #
One thing that's rather important to note while Live Upgrading from one BE (boot environment), say 'BE#1', to another, say 'BE#2', is that all the lu* tools used must come from BE#2, not BE#1.
Yes, that does mean, for example, that if you are Live Upgrading from a Solaris 9 BE to a Solaris 10 BE, you should first --
If you skip the first step, you'll usually be presented with an error message that tells you that you can't proceed with the live upgrade (and recommend the corrective action(s) you should take).
Posted by UVR on November 08, 2005 at 06:44 PM GMT #
http://docs.sun.com/app/docs/doc/817-5505/6mkv5m1im?a=view
Posted by Wes Williams on November 23, 2005 at 05:35 PM GMT #
Posted by william on January 23, 2006 at 06:37 PM GMT #