Solaris Live Upgrade - the joys
By jmr on Nov 07, 2005
$ 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).
\* Upgrade and Activate \* Now that I have my boot environment and my iso all I had to do to upgrade the boot environment was:
$ 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 -
$ luupgrade ---u ---n solenv_s3 -s /cdrom/sol_11_x86/ $ luactivate solenv_s3 -> activates new upgraded boot environmentTo 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.