Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-11-2009, 04:08 PM   #1
LQ Newbie
Registered: Mar 2009
Location: Philadelphia, PA
Distribution: Fedora 10
Posts: 3

Rep: Reputation: 0
Cloning partition on same machine different disk

I have 2 disks on a Gateway laptop. I'm trying to clone partitions from /hda to /hdb but found that I need to change files such as:
/etc/hosts <- change hostname
/etc/hosts/sysconfig/network ditto
/etc/fstab <-- change UUID after generating new ID

HOWEVER, I know I'm missing other configuration files that need to be changed. Can anyone help?

These partitions must be "standalone" and have different hostnames, etc. even though the OS is FEDORA 10.

Thanks in advance!
Old 04-11-2009, 09:02 PM   #2
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Are you looking to clone the complete hd, or just the partitions? I guess I'm asking if you want the cloned hd to be bootable. You can clone a complete hard drive using the dd command. You need a live-cd that has gparted or a live-cd and parted magic on another cd.
To clone a HD.
Boot to the live cd make sure none of your hd's are mounted, then look to see how your hd's are list in linux. Open a terminal window and type the command.

fdisk -l
Write down how linux lists the hd's,

Lets say your primary master with your OS is listed as /dev/sda1
and your spare drive is listed as /dev/sdb1

to clone sda to sdb the command would be
dd if=/dev/sda of=/dev/sdb bs=32256
After it is done you can either boot to your primary OS and if it has gparted or some other partition editor you can resize the new cloned hd to expand the partition if you have free space you want to use. Or boot to the Parted Magic cd and expand the partition.

I just cloned my Debian system last night that was on a 80Gb sata drive to a 320Gb sata drive.

Note: If you are going to expand the / partition of the cloned drive, make sure it is not mounted. You will need to delete the swap partition then expand the / partition, leave enough free space to create the swap partition again. It will take awhile to expand the partition, after it is done shut down connect the new cloned hd in the place your old hd is. Boot up and all should be well.
Old 04-12-2009, 05:22 PM   #3
LQ Newbie
Registered: Mar 2009
Location: Philadelphia, PA
Distribution: Fedora 10
Posts: 3

Original Poster
Rep: Reputation: 0
answers to your questions

Here's being very specific....I've got /hda/sda1 loaded with Fedora 10. I want to clone it on /hdb/sdb1. However, I want it to be unique in all aspects in case I go to VMware at some point in the future. Exactly what files / names / parameters need to be changed when "cloning" a partition on the first hard drive to the second hard drive on the same machine. See my previous post to the files I "think" I should change.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk cloning Diggy Linux - Software 12 01-28-2009 03:44 PM
cloning a debian system from one machine to another kushalkoolwal Debian 6 08-15-2007 07:35 PM
dd cloning to a larger disk partition question ciarlatano Linux - General 1 04-23-2007 03:23 AM
cloning disk using cp - no special devices for target disk vulture99 Linux - General 6 05-08-2005 05:36 PM
Disk Cloning sts_cat Linux - General 1 03-24-2003 11:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration