Subject: Re: Upgrading (replacing) hard drive
To: None <netbsd-help@netbsd.org>
From: Matthias Pretzer <arador@gmx.net>
List: netbsd-help
Date: 09/26/2001 11:58:19
* 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

hth, Matthias
-- 
"There are a thousand hacking at the branches of evil to one|
 who is striking at the root."          -Henry David Thoreau|
------------------------------------------------------------+