Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 05-02-2007, 12:54 AM   #1
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-02-2007 at 12:57 AM.
Old 05-02-2007, 01:49 AM   #2
LQ Newbie
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8

Original Poster
Rep: Reputation: 0

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, 02:16 AM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,111

Rep: Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255Reputation: 2255
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, 02:17 AM   #4
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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, 10:25 AM   #5
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, 11:52 AM   #6
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:

And here's the beaut...


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



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

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 06:16 PM
Creating bootable image of FC-4 on external HDD Fedora 1 01-30-2007 06:02 AM
Creating a hdd image chadman Linux - Software 14 02-17-2005 08:51 PM
how to make mirror image of one hdd to 2 hdd raj_1 General 1 12-02-2004 07:19 PM
How to make mirror image of linux partion to one1 HDD TO 2 HDD raj_1 Linux - General 2 11-04-2004 02:45 AM > Forums > Linux Forums > Linux - General

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

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