LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-01-2007, 11:54 PM   #1
AwW41
LQ Newbie
 
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8

Rep: Reputation: 0
Question Creating a hdd image with DD


Hi all Linux gurus,

I have a Windows machine that will soon be upgraded to Kubuntu 7. But before I proceed I decided to make an image of the harddrive (20 Gigabytes) and put it in an external drive (160 Gigabytes) using dd.

So I booted Helix LiveCD, mounted /dev/sda1, and typed the following:

dd if=/dev/hda1 of=/media/usbdrive/client_hdd.img conv=noerror

Everything started good and the copying began, however it ended with this: "File size limit exceeded". What gives?? The external drive has 145G of space available! The image file ended up at 4.0G, but should be 20G.

Could it be a single-file limitation of the file system? It is an off-the-shelf external hdd probably formatted with ntfs or fat32.

Any ideas will be GREATLY appreciated!

Thank you.

Last edited by AwW41; 05-01-2007 at 11:57 PM.
 
Old 05-02-2007, 12:49 AM   #2
AwW41
LQ Newbie
 
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
O.K.,

In a sudden flash of the obvious, I realized that this may work:

1. create a 20G partition in sda1
2. mount as sda2
3. dd if=hda of=sda2
4. presto, no image needed.

Any input will be greatly appreciated...
 
Old 05-02-2007, 01:16 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,821

Rep: Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924Reputation: 924
post #1: looks like a FAT32 limitation (4 Gig filesize) - NTFS doesn't (shouldn't) suffer from this.
post #2: that (concept) will copy the MBR - including partition table. I doubt that's what you want. Try "if=/dev/hda1 of=/dev/sda2" - make it a bit larger too, for safety.
 
Old 05-02-2007, 01:17 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I don't think using dd that way is going to work. dd does a literal copy from device to device. If you have the entire hard drive as the source device, then it will be copying the mbr and other stuff in the first 63 sectors into a partition---which of course makes no sense.

I think your issue could have been related to the target disk being formatted NTFS. Why not create an EXT3 partition on that disk and the dd to an image file per your original plan?

You can also use a really dumb, brute force solution and dd the whole drive to the external drive. This will wipe out whatever is on the drive, and it will require some fiddling to get the rest of the drive to be useable.
dd if=/dev/hda of=/dev/XXX, where XXX is the device name of the external drive
 
Old 05-02-2007, 09:25 AM   #5
AwW41
LQ Newbie
 
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you all for the replies,

Syg00: Yes, what I meant was hda1 and sda1, I just got lazy in my own reply.

Pixellany: The main idea is to have a perfect copy of the hdd in case my client decides to revert back to Windows, in which case I can restore the machine back to its original state. I doubt that this will happen, but I would like to have a perfec image of the hdd just in case.
 
Old 05-02-2007, 10:52 AM   #6
AwW41
LQ Newbie
 
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0
With regard to the 4G limitations of the file system, I found the following link diggin deep in LinuxQuestions:

http://www.williamaford.com/CloningaHDD.php

And here's the beaut...

<quote>

dd conv=noerror if=/dev/hda | split -b 100000000 - /mnt/space/LTRecover.img

So, this command ran for about 4 hours and moved 30 gigs to the partition space on DADSBOX.

I then swapped the hard drive, reloaded Knoppix, opened a console window, changed to root, created the mount point, mounted space on DADSBOX, and imaged the entire thing back to the new hard drive, reassembling the files as I went:

cat /mnt/space/LTRecover.img.* | dd of=/dev/hda

</quote>
 
  


Reply

Tags
dd, harddrive, image


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Creating a dd/dcfldd Image Using Automated Image & Restore (AIR) LXer Syndicated Linux News 0 03-07-2007 05:16 PM
Creating bootable image of FC-4 on external HDD quest.science Fedora 1 01-30-2007 05:02 AM
Creating a hdd image chadman Linux - Software 14 02-17-2005 07:51 PM
how to make mirror image of one hdd to 2 hdd raj_1 General 1 12-02-2004 06:19 PM
How to make mirror image of linux partion to one1 HDD TO 2 HDD raj_1 Linux - General 2 11-04-2004 01:45 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration