Login

Newsletter

Subscribe to our monthly e-newsletter,
WOUGNET Update Newsletter.




WOUGNET on One Percent Club

WOUGNET Office

WOUGNET is located at Plot 55 Kenneth Dale, Off Kira Road, Kamwokya. Directions: After the Kamwokya market as you travel along Kira road, turn off to your left onto Kenneth Dale, (just before the football field and Kira Road Police Station). Once on Kenneth Dale, look out for the WOUGNET sign post on your left towards the end of the road. Click here for a map.

Go to:

Kubere Information Centre Website


Women In Business Website

WOUGNET Gallery

www.flickr.com
This is a badge showing public photos and videos of WOUGNET hosted on Flickr. Click the images to go to the gallery.

HOME arrow * Technical Support arrow Tech Tips arrow July 2009: How to Copy Your Linux Install to a Different Partition or Drive
July 2009: How to Copy Your Linux Install to a Different Partition or Drive PDF Print E-mail

You should find this helpful if you need to move your Linux installation to a different hard drive or partition (and keep it working) and your distro uses grub.

To start, get a live CD and boot into it then follow the steps outlined below.

Copying

    * Mount both your source and destination partitions.

    * Run this command from a terminal:

        $ sudo cp -afv /path/to/source/* /path/to/destination

      Don’t forget the asterisk after the source path.

    * After the command finishes copying, shut down, remove the source drive, and boot the live CD again.

Configuration

    * Mount your destination drive (or partition).

    * Run the command “gksu gedit” (or use nano or vi).

    * Edit the file /etc/fstab. Change the UUID or device entry with the mount point / (the root partition) to your new drive. You can find your new drive’s (or partition’s) UUID with this command:

        $ ls -l /dev/disk/by-uuid/

    * Edit the file /boot/grub/menu.lst. Change the UUID of the appropriate entries at the bottom of the file to the new one.

Install Grub

    * Run sudo grub.

    * At the Grub prompt, type:

        find /boot/grub/menu.lst

      This will tell you what your new drive and partition’s number is. (Something like hd(0,0))

    * Type:

        root hd(0,0)

      but replace "hd(0,0)" with your partition’s number from above.

    * Type:

        setup hd(0)

      but replace "hd(0)" with your drive's number from above. (Omit the comma and the number after it).

You should now have a bootable working copy of your source drive on your destination drive! You can use this to move to a different drive, partition or file system.

--
Techtip by Ningappa Koner published in the Linux Journal.

 
< Prev   Next >