LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-17-2012, 11:25 PM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
nothing on the external HD after running the command dd


Hi,

I was wondering if I could get some help with cloning hard disk.

I'd like to clone my old hard drive which is running on Ubuntu Server 10.04 so that I could set up an exact things on another machines.

I use the command "dd" to do the cloning.

example: $ dd if=/dev/sda6 of=/dev/sdb1

It finished the job with no errors but strangely there was nothing on the sdb1 (my external HD). And not only that, I could not un-mount the external hard disk. It said umount:/media/ExternalHD is not in the fstab (and you are not root).

I then went and run the command $ sudo chown user1:user1 /media/ExternalHD. This did not work either.

Any help would be greatly appreciated.

Thank you
 
Old 01-17-2012, 11:34 PM   #2
xylos
LQ Newbie
 
Registered: Oct 2011
Location: USA
Distribution: Backtrack 5, Ubuntu 11.10, Linux Mint 12, Cyanogen Mod 7, FreeBSD 9.0
Posts: 17

Rep: Reputation: Disabled
Are the partitions exactly identical? If not, you can have a size issue when trying to clone from larger to smaller. If the disks are identical, an easier option is to just do

dd if=/dev/sda of=/dev/sdb

Try dumping out the full partition information on each disk with the following:

sfdisk -d /dev/sda
sfdisk -d /dev/sdb

Then compare the output to verify that /dev/sdb1 and /dev/sda6 are, in fact, identical. If they're not, you're playing with a whole world of other problems.
 
Old 01-18-2012, 06:30 PM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thank you Xylos for your reply.

I think I might have cloned the wrong partition.

Here is the snapshot when I run the commands as instructed by you

# partition table of /dev/sda
unit: sectors

/dev/sda1 : start= 63, size=390636477, Id= 7, bootable
/dev/sda2 : start=390637566, size=234504194, Id= 5
/dev/sda3 : start= 0, size= 0, Id= 0
/dev/sda4 : start= 0, size= 0, Id= 0
/dev/sda5 : start=619139072, size= 6002688, Id=82
/dev/sda6 : start=390637568, size= 97654784, Id=83

# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start= 63, size=1953520002, Id= 7
/dev/sdb2 : start= 0, size= 0, Id= 0
/dev/sdb3 : start= 0, size= 0, Id= 0
/dev/sdb4 : start= 0, size= 0, Id= 0

What happens is I have two operating systems (Windows XP and Ubuntu) installed on this machine. And what I'd like to clone only is the Ubuntu OS partition.

I am just having a guess here - could it be /dev/sda1 for the ubuntu OS

The external HD (1TB) or sdb1 should be much bigger to accommodate the clone.

Thank you
 
  


Reply


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
[SOLVED] Running batch file does not produce same results as running command from Terminal nmuleski Linux - Newbie 9 12-30-2011 09:52 AM
running an external monitor on laptop andrew375 Ubuntu 3 04-17-2009 11:04 PM
Does Kornshell wait until one command completes before running the next command? ShaqDiesel Programming 4 09-10-2008 11:49 PM
Running openSUSE 10.2 on usb external drive linux_challenged SUSE / openSUSE 5 10-04-2007 09:29 PM
External hard drive running slow Tom Cumming Linux - Hardware 0 08-19-2004 07:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 AM.

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