Solaris 10 Bootenvironments
Beim Starten in ein neues Bootenvironment gibt es einen fiesen tückischen Fehler, in den ich immer wieder reinlaufe…
reboot anstatt einem sauberen shutdown
Nach meinem luactivate wird viel gerödelt und getan, danach meldet sich mein Solaris mit folgendem Output:
root@dbsupertoll:~> luactivate s10u8_24
**********************************************************************
The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.**********************************************************************
In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:1. Enter the PROM monitor (ok prompt).
2. Boot the machine to Single User mode using a different boot device
(like the Solaris Install CD or Network). Examples:At the PROM monitor (ok prompt):
For boot to Solaris CD: boot cdrom -s
For boot to network: boot net -s3. Mount the Current boot environment root slice to some directory (like
/mnt). You can use the following commands in sequence to mount the BE:zpool import rpool
zfs inherit -r mountpoint rpool/ROOT/s10u8_20
zfs set mountpoint=<mountpointName> rpool/ROOT/s10u8_20
zfs mount rpool/ROOT/s10u8_204. Run <luactivate> utility with out any arguments from the Parent boot
environment root slice, as shown below:<mountpointName>/sbin/luactivate
5. luactivate, activates the previous working boot environment and
indicates the result.
6. umount /mnt
7. zfs set mountpoint=/ rpool/ROOT/s10u8_20120829
8. Exit Single User mode and reboot the machine.**********************************************************************
Modifying boot archive service
Activation of boot environment <s10u8_24> successful.
root@dbsupertoll:~>
Jetzt ist auch im lustatus mein neues BE als Active on Reboot eingetragen:
root@dbsupertoll:~> lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
————————– ——– —— ——— —— ———-
s10u8 yes no no yes –
s10u8_20 yes yes no no –
s10u8_24 yes no yes no –
root@dbsupertoll:~>
Und jetzt kommt der Trick =)
Ein reboot übernimmt keine Änderungen im Bootenvironment.
Hier helfen nur die Freunde shutdown oder init 6.
Das kann allerdings einige Zeit dauern und während dieser gibt es auch keine Ausgabe, weder im xscf, noch in der immer noch aktiven SSH Session wie denn der aktuelle Status ist. Es bleibt im Endeffekt abzuwarten und nach laufenden stop Prozessen zu suchen…
Irgendwann bricht dann deine SSH Session weg und du siehst im XSCF den gewünschten Reboot =)