NetBSD-Users archive

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

Re: How to change a disk? (Water NB) writes:

>I do:
>1) add the bigger disk to my system.
>2) power on, disklabel it, newfs it
>3) mount it to /newdisk
>4) copy all files
>cp -rp /usr /newdisk
>cp -rp /etc /newdisk
>5) power off and get rid of the old disk

>any more to do?

You need to use fdisk too, so that the BIOS understands the disk.
Also, you probably want to replicate the partition structure from
your old disk (and size them on the new disk differnetly).

cp does only copy regular files, you have to use 'dump' and 'restore'
to move the data.

It might be necessary to do this in single-user mode from the console
so that the running system won't change the disk contents.

Since this is the system disk you also need to install the bootloader
with fdisk and installboot.

If the new disk is a different type (say you replace a IDE with a SCSI disk)
you need to adjust /newdisk/etc/fstab.

                                Michael van Elst
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index