This script works for Solaris machines only, but does support multiple Sun architectures. It duplicates the root disk to another disk using newfs, fsck, and dump. It then sets the EEPROM settings to automatically boot off that disk the next time the system is rebooted. Copying the OSTo copy the OS, it performs the following steps:
Setting the alternate bootduplicate.sh uses the disk aliases (e.g. disk0 disk3) already available. It looks at the disk we are currently booted from (e.g. disk0), and then sets the boot argument to the other disk (e.g. boot disk3). That way, the next time the system reboots, it boots from this disk. This continually tests the process and the other disk. A neat feature of this is that if the system panics for any reason, it automatically boots from the other disk when it comes back up.Don't ForgetRemember to disable the duplication process for a few days any time you are planning an upgrade of any kind. When you install patches or applications that require a reboot, make sure you set the boot alias to boot off the drive that you just modified. Otherwise, you will boot off the alternate disk that was not modified. Of course, you could also immediately run duplicate.sh, but I wouldn't advise that. I would make sure that the change didn't negatively affect your system. |