LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-02-2010, 03:37 AM   #1
Sawas
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Question Cloning a pc


I have a pc i want to clone and it has 2 partitions sda1 which is vfat and sda2 ntfs.When I had mounted my external hdd it was seen as sdc1 and my Knoppix boot as sdb1.I tried using the following command to copy the pc image to my external but when it gets to 26Gb it gives read error.
mkdir -p mybackup
mount -t ntfs -o rw /dev/sdc1 ./mybackup
dd if=/dev/sda of=./mybackup/780.iso bs=4096 conv=notrunc,noerror

Where am I going wrong?Is there anythging wrong with my above commands?

Last edited by Sawas; 11-02-2010 at 03:38 AM.
 
Old 11-02-2010, 04:52 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,582

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
You are relying on having mechanically identical disks, because dd copies over the directory structure as well, which you don't actually want.

check the external disk (unmount and run esfck -fvy /dev/sdc1)
Presuming you're not running off sda1 or sda2, and if you don't want some external backup copier, use
mount /dev/sdc1 /mnt/
mkdir sda1 sda2
cd /mnt/sda1
cp -a /sda1_mount_point/* . && sync

repeat for sda2
 
Old 11-02-2010, 06:59 AM   #3
rew
Member
 
Registered: May 2010
Posts: 35

Rep: Reputation: 3
Your "sda" disk may have a single bad block. The harddisk manufacturers will tell you "that's normal".

What you can do now is to format the external drive with the same filesystems that you had, and then copy over the files.

Despite what everybody else says, cloning a system as you're trying should in principle work just fine, provided that your destination drive is the same size or bigger than the original drive. If the destination drive is bigger than the original it may leave you with some hard-to-use diskspace, but that's what you get if you clone a PC like that....

Last edited by rew; 11-04-2010 at 06:55 AM.
 
Old 11-02-2010, 04:24 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,394

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
Might consider file based backup such as redobackup or clonezilla too or partimage.


Gddrescue may be a better choice if you think it is because of block issues.
 
  


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
hd cloning hectorDUQUE Fedora 2 05-15-2007 10:37 AM
Please, Please,Please help with HD Cloning... knichel Linux - Software 7 09-16-2006 11:19 PM
cloning cpvjagadeesh Linux - Software 1 04-11-2005 06:09 AM
Cloning OS madetheswitch Linux - Software 4 01-03-2005 04:09 PM
cloning with DD and NC scoob8000 Linux - Software 3 11-12-2004 12:34 PM


All times are GMT -5. The time now is 11:54 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