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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-01-2007, 11:54 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8
Rep:
|
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.
|
|
|
|
05-02-2007, 12:49 AM
|
#2
|
|
LQ Newbie
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8
Original Poster
Rep:
|
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...
|
|
|
|
05-02-2007, 01:16 AM
|
#3
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,288
|
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.
|
|
|
|
05-02-2007, 01:17 AM
|
#4
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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
|
|
|
|
05-02-2007, 09:25 AM
|
#5
|
|
LQ Newbie
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
|
05-02-2007, 10:52 AM
|
#6
|
|
LQ Newbie
Registered: Oct 2006
Distribution: Kubuntu 8.04
Posts: 8
Original Poster
Rep:
|
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>
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|