[SunRescue] Hard drive upgrading

BSD Bob the old greybeard BSD freak rescue at sunhelp.org
Tue May 15 15:03:05 CDT 2001


> I recently successfully upgraded all but one hard drive on my SS2.  How can
> I upgrade the root drive, with all the .blah-blah hidden files and such?
> I tried cp -r -p .* /mnt
> and that didn't work.

The traditional (and best IMHO) approach is a dump/restore.
Cp, dd, tar, and other things don't always get all things right.

On most UNICES, including the BSD's I tend to run, it is something like:

   newfs /dev/rsdXa
   mount /dev/sdXa /mnt
   dump 0f - / | ( cd /mnt ; restore xf - )
   umount /mnt

repeat for each mounted and used fs except swap on the drive to be cloned.
X is the new drive ID number.

When done write boot blocks, shutdown, remove the old drive, re-ID the
new drive to what the old drive ID was, and boot the new drive.

The boot blocks should be in /usr/mdec, possibly.  They might be written
with something like a /usr/mdec/installboot /boot bootxx /dev/<device>.

You can usually write a script to do the cloning for you, to ease the
tedium.  Order pizza, some beer, chips, and that sort of thing.....
on big drives it takes a while on slow machines.

On Solaris, it would be a ufsdump/ufsrestore, and installboot.
The bits would be in /usr/platform/....., and below.
See the manpages for particulars.

That above is what I usually do..... including chips, beer, etc....(:+}}.

Bob




More information about the rescue mailing list