LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dd stops at 1GB with input/output error (https://www.linuxquestions.org/questions/linux-newbie-8/dd-stops-at-1gb-with-input-output-error-4175426782/)

yukes 09-11-2012 08:33 PM

dd stops at 1GB with input/output error
 
Hello.
I was trying to create an image of hda with dd command but it always stops at 1GB. I tried dd to usb drive and also to a network share using smbfs with lfs option, both failed at exactly the same point(1,024,488KB) with input/output error.

The command which failed at 1GB was the following.
dd if=/dev/hda of=/mnt/NAS01/myimage.img bs=1024

I then used conv=notrunc,noerror option. After few hickups, it went a little further but ended with file size limit exceeded error.

I looked it up on google and did the followings.

1. run ulimit -a (file size was unlimited)
2. run cat /etc/security/limits.conf (nothing other than comments.)
3. run a test of creating empty file
dd if=/dev/zero of=myimage.img bs=1024 count=2000000 (I was able to create 2GB file successfully to the same network share.)

It is an old linux box with version 2.4.18.(Red Hat 8.0). The size of the hda is about 30GB.

My question is ...
1. Is there a setting for file size limit other than limits.conf?
2. When I make an image of hda with dd, am I suppose to boot from CD? I am running dd from the hda itself. Would it be a cause of this error?

I spent 2 days looking for solution myself but could not find the right one, unfotunately.
I would appreciate if anyone can lead me to the right direction.

Thank you very much for reading.

P.S.
I am creating the image of hda for P2V.

jefro 09-11-2012 08:44 PM

dd with the most simple of if= and of= should work. What I am thinking is that mnt is part of your current OS and it fails. Use a live cd to separate it from your OS or use dd over ftp or dd over nc to mount remote storage. If you want you can use g4u.

yukes 09-12-2012 11:09 AM

OK. I will try it with CD boot.

Thank you very much for your suggestion!


All times are GMT -5. The time now is 02:14 PM.