Just curious if anyone has played around with switching boot environments on OpenSolaris DomUs. For example, in an OpenSolaris DomU, I can update the software with a "pkg image-update". This will create a new boot environment and schedule it to be the current BE on next reboot. This actually works well. What I haven''t played with is how I can switch to a previous BE, if for example the new BE fails. At least with a paravirtualized OpenSolaris guest, I don''t see the typical GRUB boot menu with all the different BEs listed. So I''m curious how one might boot from a different BE in this case. Thanks.. --joe
On a booted OpenSolaris DomU you can use beadm to list/activate boot environments. http://dlc.sun.com/osol/docs/content/IPS/gggyv.html -Andrew Chester Joseph Mocker wrote:> Just curious if anyone has played around with switching boot > environments on OpenSolaris DomUs. > > For example, in an OpenSolaris DomU, I can update the software with a > "pkg image-update". This will create a new boot environment and > schedule it to be the current BE on next reboot. This actually works > well. > > What I haven''t played with is how I can switch to a previous BE, if > for example the new BE fails. > > At least with a paravirtualized OpenSolaris guest, I don''t see the > typical GRUB boot menu with all the different BEs listed. So I''m > curious how one might boot from a different BE in this case. > > Thanks.. > > --joe > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
Sorry I just saw you mention if the new BE fails, should of read more carefully. -Andrew Chester Andrew Chester wrote:> On a booted OpenSolaris DomU you can use beadm to list/activate boot > environments. > http://dlc.sun.com/osol/docs/content/IPS/gggyv.html > > -Andrew Chester > > Joseph Mocker wrote: >> Just curious if anyone has played around with switching boot >> environments on OpenSolaris DomUs. >> >> For example, in an OpenSolaris DomU, I can update the software with a >> "pkg image-update". This will create a new boot environment and >> schedule it to be the current BE on next reboot. This actually works >> well. >> >> What I haven''t played with is how I can switch to a previous BE, if >> for example the new BE fails. >> >> At least with a paravirtualized OpenSolaris guest, I don''t see the >> typical GRUB boot menu with all the different BEs listed. So I''m >> curious how one might boot from a different BE in this case. >> >> Thanks.. >> >> --joe >> _______________________________________________ >> xen-discuss mailing list >> xen-discuss@opensolaris.org >
Are you sure the grub boot menu isn''t running -- or is it just that the timeout is low enough that you are not connecting to it in time? Malachi de Ælfweald http://www.google.com/profiles/malachid On Fri, May 1, 2009 at 3:04 PM, Joseph Mocker <mock@sun.com> wrote:> Just curious if anyone has played around with switching boot environments > on OpenSolaris DomUs. > > For example, in an OpenSolaris DomU, I can update the software with a "pkg > image-update". This will create a new boot environment and schedule it to be > the current BE on next reboot. This actually works well. > > What I haven''t played with is how I can switch to a previous BE, if for > example the new BE fails. > > At least with a paravirtualized OpenSolaris guest, I don''t see the typical > GRUB boot menu with all the different BEs listed. So I''m curious how one > might boot from a different BE in this case. > > Thanks.. > > --joe > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
During ''pkg image-update'' a zfs snapshot of the root filesystem was created and then a zfs clone was created from that snapshot. The clone is given a suffix of a ''-1'' or ''-2'', etc. Then the clone is promoted so it is now on the mainline of the filesystem. After a couple of ''pkg image-update''s you''ll see rpool/ROOT/opensolaris rpool/ROOT/opensolaris-1 rpool/ROOT/opensolaris-2 with -2 being the current boot filesystem. To boot one of the other clones, you''ll need to add a bootloader_args entry to your domain definition for the zfs filesystems that you want to boot. % virsh dumpxml <domU> > domain.xml Edit domain.xml adding this line after the <bootloader> line with the zfs clone filesystem to boot: <bootloader_args>--args="-B zfs-bootfs=rpool/ROOT/opensolaris"</bootloader_args> % virsh define domain.xml Then you''ll be able to boot that domU using that zfs filesystem clone. This is equivalent to running the grub command ''bootfs'' to select the current zfs boot filesystem to use. To revert back, just remove the bootloader_args line from the domain.xml file and run ''virsh define domain.xml''. Susan Joseph Mocker wrote:> Just curious if anyone has played around with switching boot > environments on OpenSolaris DomUs. > > For example, in an OpenSolaris DomU, I can update the software with a > "pkg image-update". This will create a new boot environment and schedule > it to be the current BE on next reboot. This actually works well. > > What I haven''t played with is how I can switch to a previous BE, if for > example the new BE fails. > > At least with a paravirtualized OpenSolaris guest, I don''t see the > typical GRUB boot menu with all the different BEs listed. So I''m curious > how one might boot from a different BE in this case. > > Thanks.. > > --joe > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org
Ah, this is the magic I was looking for. Thanks Susan and Jürgen. --joe Susan Kamm-Worrell wrote:> During ''pkg image-update'' a zfs snapshot of the root filesystem > was created and then a zfs clone was created from that snapshot. > The clone is given a suffix of a ''-1'' or ''-2'', etc. Then the > clone is promoted so it is now on the mainline of the filesystem. > > After a couple of ''pkg image-update''s you''ll see > rpool/ROOT/opensolaris > rpool/ROOT/opensolaris-1 > rpool/ROOT/opensolaris-2 > with -2 being the current boot filesystem. > > To boot one of the other clones, you''ll need to add > a bootloader_args entry to your domain definition for the > zfs filesystems that you want to boot. > > % virsh dumpxml <domU> > domain.xml > > Edit domain.xml adding this line after the <bootloader> line with the > zfs clone filesystem to boot: > <bootloader_args>--args="-B > zfs-bootfs=rpool/ROOT/opensolaris"</bootloader_args> > > % virsh define domain.xml > > Then you''ll be able to boot that domU using that zfs filesystem clone. > > This is equivalent to running the grub command ''bootfs'' to select > the current zfs boot filesystem to use. > > To revert back, just remove the bootloader_args line from the > domain.xml file and run ''virsh define domain.xml''. > > Susan > > > > Joseph Mocker wrote: >> Just curious if anyone has played around with switching boot >> environments on OpenSolaris DomUs. >> >> For example, in an OpenSolaris DomU, I can update the software with a >> "pkg image-update". This will create a new boot environment and >> schedule it to be the current BE on next reboot. This actually works >> well. >> >> What I haven''t played with is how I can switch to a previous BE, if >> for example the new BE fails. >> >> At least with a paravirtualized OpenSolaris guest, I don''t see the >> typical GRUB boot menu with all the different BEs listed. So I''m >> curious how one might boot from a different BE in this case. >> >> Thanks.. >> >> --joe >> _______________________________________________ >> xen-discuss mailing list >> xen-discuss@opensolaris.org