SUMMARY: Changing the root filesystem

From: Jason Youngquist (
Date: Tue Jun 30 1998 - 09:25:44 CDT

I wanted to change the root filesystem from one hardrive to another. It
proved more difficult than I thought it would be.

Steps to do this are:

1. Make sure the target drive is partitioned and a new filesystem is
    created on the drive.
2. Mount the target drive on /mnt
3. Copy the contents of the current root drive to the target drive using
    ufsdump and ufsrestore.
        (ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /mnt; ufsrestore xf -)

     Copying using the cp command doesn't work.

4. Run the program "installboot" (man installboot(1M)) on the target
5. Edit the /mnt/etc/vfstab to reflect the changes you want to make to
    the disk.
6. Write down the long name of the disk you want to boot up. Should look
    something like this:
7. Shutdown the system
8. Now you need to change the boot device and store it in the PROM.
9. To do this type "setenv boot-device (disk name) /kernel/unix"
    On a sun Ultra1 with the boot device being c1t2d0s0 the command would
    look like this:
        setenv boot-device /sbus@1f,0/SUNW,fas@0,8800000/sd@2,0:a
10. Type "reset" at the "OK" prompt to save the boot-device setting to
11. This will reboot the machine and if everything goes okay your machine
     should be able to boot up.

Note: There was some discussion about changing the boot drive slot from
       slot 0 to slot 1, so you may run into problems there, but I had no
       problems on a sun ultra 1 running solaris 2.6.

I received many responses from people in a very short amount of time.
Twenty five responses in less than 24 hours. I'd like to thank:

        Saurabh Jang, Peter L. Wargo, Virginia Coffindaffer, Chris Marble,
Casper Dik, and everyone else who sent me an email message.

Thanks again,
Jason Youngquist

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:42 CDT