NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Upgrading NetBSD in-place in a clean way



On Jun 6,  8:19am, Pierre-Philipp Braun wrote:
} Stefano Marinelli wrote:
} > Ok, let's suppose I want to upgrade a NetBSD machine without rebooting with 
sysinst and without having the possibility to use the build.sh script with the 
sources.
} > I'd do something like that:
} > 1) download the daily (stable, for example) binaries (for example from 
http://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-5-1/)
} > 2) Untar all the sets on the file system I want to update
} > 3) run etcupdate
} > 4) reboot
} 
} for a major upgrade you need to reboot just after you updated the 
} kernel, the[n] the userland.  I'm happy with etcupdate only (no 

     Correct.  If you don't do that, then the untarred userland may try
to use features of the new kernel which aren't in the old kernel.

} postinstall) and keeping a kind-of-system wide .profile and .kshrc on / 
} for users to link against it.
} 
} > Tried that in a test virtual machine and seems to work. But there's a 
problem: what if something has been removed? Untarring the sets doesn't remove 
the (stale) old files, while the etcupdate just deals with the config and 
startup files.
} > Is there a cleaner way to do it?
} 
} do you mean the old files of userland, not only /etc ?  I'm afraid 
} there's no solution for that yet.

     When a file is removed, the developer is supposed to flag that
file as obsolete in the set list.  When the system is built, these
lines are extracted and the filenames are added to files in
/var/db/obsolete.  postinstall will read the files in /var/db/obsolete
and delete any obsolete files that it finds.

     The exception to this rule is shared libraries.  These don't get
deleted because applications linked against them would then fail to
work.

}-- End of excerpt from Pierre-Philipp Braun


Home | Main Index | Thread Index | Old Index