NetBSD-Users archive

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

Re: In-place upgrade of NetBSD?



On Tue, Oct 12, 2010 at 01:22:56AM +0100, David Chanters wrote:
>  Hi -- the NetBSD manual makes use of the installer to perform
> upgrades; I'm wondering if there's a way of doing that in-place, akin
> to FreeBSD's freebsd-upgrade(1) program?   It seems odd to me that I
> would need to reboot to a pre-burnt ISO each time, why can't I upgrade
> NetBSD in-place each time?

I upgrade in-place all of the time.  Let s and k be environment
variables set to binary/sets/ and binary/kernel/ in a release directory:

0 Update boot blocks.  Usually I skip this step, so I don't have any
  particular command(s) to recommend.  See installboot(8).

1 Backup the old kernel,

  cp /netbsd /netbsd.old

2 Extract the new kernel at /netbsd,

  gunzip < $k/netbsd-GENERIC.gz > /netbsd

3 Extract the modules.tgz,

  cd /
  pax -pe -rzf $s/modules.tgz

4 Reboot

5 Extract all of the sets except for etc.tgz and xetc.tgz,

  cd /
  pax -pe -rzf $s/base.tgz
  pax -pe -rzf $s/comp.tgz
  .
  .
  .
  pax -pe -rzf $s/xbase.tgz
  pax -pe -rzf $s/xcomp.tgz
  .
  .
  .

6 Update /etc/,

  etcupdate -s $s/etc.tgz -s $s/xetc.tgz

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index