Subject: Re: Upgrading (replacing) hard drive
To: None <netbsd-help@netbsd.org>
From: Claude Marinier <claude.marinier@dreo.dnd.ca>
List: netbsd-help
Date: 09/26/2001 10:09:32
Actually, what Phil suggests might work since he first creates mount
points and mounts all the partitions. Will cp preserve the ownership
and permissions?

On Wed, 26 Sep 2001, Claude Marinier wrote:
> Note that it is important to use dump/restore when you have more that one
> partition. With cp, everything will be copied to one partition.
>
> On Wed, 26 Sep 2001, Matthias Pretzer wrote:
> > * Anthony Lieuallen [26.09.2001]:
> > > Hi, my internet router/server is running on a tiny little 428 meg hard
> > > drive, and an otherwise unsed 6gb drive has just fallen into my hands,
> > > so I've decided to give it some room for other files.
> > >
> > > What might be the right procedure to correctly copy the existing NetBSD
> > > (1.5.1) system to the new drive and then boot from it as if nothing
> > > happend (besides the drive growing many times in size :) )?
> >
> > Hi,
> >
> > I just did the exactly same thing to my router.
> >
> > Connect the new hdd as wd1 (in my case), boot into single user mode.
> > Create the necessary filesystems on the new disk.
> > If you have /tmp on your root partition, you have to mount it rw
> > now. Then do (assuming wd1a shall become your new root partition and
> > wd1e your new /usr, and wd0e ist you existing /usr, wd0a your / ):
> >
> > # mount /dev/wd0e /usr
> > # mount /dev/wd1a /mnt
> > # dump 0f - / | ( cd /mnt ; restore rf - )
> > # mount /dev/wd1e /mnt/usr
> > # dump 0f - /usr | ( cd /mnt/usr ; restore rf - )
> > # rm /mnt/restoresymtable /mnt/usr/restoresymtable
> >
> > To make your new disk bootable, do:
> >
> > cd /usr/mdec/
> > ./installboot biosboot.sym /dev/rwd1a
> >
> > See dump(8), restore(8), installboot(8) for details
>
>

-- 
Claude Marinier, Information Technology Group    claude.marinier@dreo.dnd.ca
Defence Research Establishment Ottawa (DREO)    (613) 998-4901  FAX 998-2675
3701 Carling Avenue, Ottawa, Ontario  K1A 0Z4         http://www.dreo.dnd.ca