This discussion is archived
4 Replies Latest reply: Mar 25, 2010 4:08 AM by 807559 RSS

How do you re-apply a patch that failed in a zone but worked on a host

807559 Newbie
Currently Being Moderated
Hi,
As background I was applying patches in the global root which worked apart from one zone which had space problems. I've fixed the space problems but cannot apply the needed patches to the previously faulty zone

On the zone if I try and apply the missing patch:-
+"Patch 127127-11 is for global zone only - cannot be installed on non-global zone."+

Or on the global if I try and re-apply:-
+"Requested patch 127127-11 is already installed on the system."+

and if I try and remove the patch altogether:-
+"The following patches cannot be removed since they were installed without creating their backout data"+.

I can't see how to get out of this one

Thanks
Paul

Edited by: paul_xedos on Mar 22, 2010 8:45 AM
  • 1. Re: How do you re-apply a patch that failed in a zone but worked on a host
    807559 Newbie
    Currently Being Moderated
    try -f option with patchrm command
  • 2. Re: How do you re-apply a patch that failed in a zone but worked on a host
    807559 Newbie
    Currently Being Moderated
    Unfortunately it still complains with the -f option

    +"The following patches cannot be removed since they were installed without creating their backout data."+


    As its a kernel patch I need to go in I also tried this in the global zone only

    patchadd -G ./137137-09

    +0 Patch 137137-09 is for global zone only - cannot be installed on non-global zone.+

    Aaaagh - but I am in the global zone


    I have to say, having spent 4 days trying to figure this I am completely exasperated by Sun patching when it comes to zones. At least I am when it goes bad
  • 3. Re: How do you re-apply a patch that failed in a zone but worked on a host
    807559 Newbie
    Currently Being Moderated
    under /var/sadm/patch we have the list of all installed patches, try to remove the patch from there and install it again.
  • 4. Re: How do you re-apply a patch that failed in a zone but worked on a host
    807559 Newbie
    Currently Being Moderated
    Thanks for your response.

    I've managed to fix it but I wouldn't recommend the following as I'm sure its unsupported and I'll probably have problems down the line

    On the host
    * mv /etc/zones /etc/zones.bak
    * reboot single user
    * apply kernel patch (the one that ultimately I had to get on and which was giving pre-req dependency errors when running zones)
    * create a new zone now that host system is all up to date
    * Copy the operating system directories of the new zone (the one that's all patched) over the troublesome zone (the one that can't take the patch). Take backups first
    * cd /zones/new-zone/root
    * find sbin -print | cpio -pudm /zones/bad-zone/root
    * find usr -print | cpio -pudm /zones/bad-zone/root
    * find lib -print | cpio -pudm /zones/bad-zone/root
    * cd /zones/new-zone/root/var
    * find sadm -print | cpio -pudm /zones/bad-zone/root/sadm (this copies patches and pkgs directories and I'm sure a lot of other stuff that I didn't want)
    * mv /etc/zones.bak /etc/zones
    * reboot host
    * boot the old zone up. It should now have up to date patches

    I'm sure there are real no-no's in taking this approach but it seems to have worked for me. I'll update if I find there are some horrors down the line

    Edited by: paul_xedos on Mar 25, 2010 4:07 AM