There are a few key things to keep in mind when you are doing this.
- You need two disks.
- Live Upgrade can auto magically break meta devices, etc.
- You will need the CD or ISO if you want to do a full install.
- You can use a flar for an install.
NOTE: I haven't played with ZFS roots yet but it is on my short list. Everything below is based on UFS.
Here are the steps I used to do a new install of 10u6 on the first disk {c5t0d0 } of an x4500 with no meta devices and 10u5 on the second disk { c5t4do }.
First, lets set up the disk partitions. You can either manually do them via format, or like in my case, I just want to copy the layout from the first disk:
$ prtvtoc /dev/rdsk/c5t4d0s2 | fmthard -s - /dev/rdsk/c5t0d0s2
Let's mount up the DVD ISO for 10u6 so we can install the Live Upgrade packages and use it for the flar install later:
$ mkdir /mnt/cdrom
$ lofiadm -a /export/home/sol-10-u6-ga1-x86-dvd.iso
$ mount -F hsfs -o ro /dev/lofi/1 /mnt/cdrom
Now we can install the Live Upgrade Packages:
$ cd /mnt/cdrom/Solaris_10/Product
$ pkgadd -d . SUNWlur SUNWluu
You have to tell Live Upgrade to set up the environment. Here I have told it that the name of my new environment is 10u6 ( you can name your original with the -c option ), I've told it to make a ufs / on c5t0d0s0, a swap partition on c5t0d0s1, a ufs /var on c5r0d0s3, and a ufs /export/home on c5t0d0s7. Take a look at the man page for lucreate for more options and settings.
$ lucreate -s - -n 10u6 -m /:/dev/dsk/c5t0d0s0:ufs -m -:/dev/dsk/c5t0d0s1:swap -m /var:/dev/dsk/c5t0d0s3:ufs -m /export/home:/dev/dsk/c5t0d0s7:ufs
Oops, the lucreate failed. What I realized was that I had an old 10u3 environment still in play.
lustatus showed it:
$ lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
10u3 yes no no yes -
10u5 yes yes yes no -
So now I want to delete the 10u3 since it is on the disk that I want to install 10u6 on.
$ ludelete 10u3
Well, that didn't work either. It is hung up on not being able to find the old metadevices which don't exist any more. Live Upgrade is rather picky about how things are working and if anything changes without it knowing about it things go bad fast.
So, now let's start cleaning things up manually:
Edit /etc/lutab
I deleted the 10u3 lines and then updated the 10u5 lines with a 1 at the beginning instead of a 2.
The ICF files show the disk partitions for an LU environment. I wanted to get rid of 10u3 and make 10u5 the first and only entry.
$ mv /etc/lu/ICF.2 /etc/lu/ICF.1
Edit /etc/lu/BRUB_backup_menu
Remove 10u3 section
Let's delete, or move, the Grub slice file
$ mv /etc/lu/GRUB_slice /etc/lu/GRUB_slice.bak
Now that all of the 10u3 things are cleared, try the lucreate again:
$ lucreate -s - -n 10u6 -m /:/dev/dsk/c5t0d0s0:ufs -m -:/dev/dsk/c5t0d0s1:swap -m /var:/dev/dsk/c5t0d0s3:ufs -m /export/home:/dev/dsk/c5t0d0s7:ufs
And all went well.
Sometimes it will complain and ask you to run lux86menu_propagate
Since you already have the ISO mounted, it is easy:
$ /usr/lib/lu/lux86menu_propagate /mnt/cdrom
And finally, run the luupgrade command to build your new environment.
Here I am building an empty shell and using my 10u6 flar to install. You can also tell it to make a copy of your existing environment which you can later patch with lupatch
$ luupgrade -f -n 10u6 -s /mnt/cdrom -a { path to flar }
Time to go get a drink, read a book, etc because it can take quite a while.
Here are a few things you can use when your new environment is built:
lustatus
lumount ( Mount up the new environment so you can make changes to it before you reboot. )
When you are ready to boot into your new environment, run luactivate:
$ luactivate 10u6
It will then tell you how to recover should you need it and some other info about rebooting, etc. Make sure you read it.
When you reboot, at least on the x86 platform, you will have the new entries in Grub and your new environment should be the default.
Enjoy!
No comments:
Post a Comment