[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: disk cloning ?



On 11/11/2013 04:46 AM, hadi motamedi wrote:
I needed to clone my disk to another hard drive .
I did it as the following :
#dd if=/dev/sdb of=/dev/sdc
But after a while, the procedure ended with the "writing to /dev/sdc
input/output error" message.
Can you please let me know how can I overcome this as the fdisk now returns as "
#fdisk /dev/sdc
"I do not know how to handle files with mode 81a4
must set cylinders"
What can I do at know ?

It's helpful to start with a paragraph that explains "why", and follow that with paragraph(s) that explain "what".


It's best to cut and paste the relevant portions of the console session into the body of your post, rather than chopping it up and mixing the pieces with prose. For example:

    2013-11-11 12:19:59 dpchrist@p43200 ~
    $ grep PS1 .bash_profile
    export PS1='\n\D{%Y-%m-%d %H:%M:%S} \u@\h \w\n\$ '


Notes:

1. The console session is preceded by a blank line, indented, and followed by a blank line so that it stands out clearly.

2. I have set my shell prompt to show the date, time, username, hostname, and current working directory. This is useful information for me, and especially for people trying to help me.

3.  People can see the exact command I invoked.

4.  People can see the exact output of that command.


In the meantime, if I want to format the target hard disk to have a
fresh disk , can you please let me know how to do that ?

I use the 'dd' command and special device '/dev/zero' to fill drives with zeros:

    2013-11-11 12:23:29 dpchrist@p43200 ~/sandbox/debian
    $ dd if=/dev/zero of=zero.bin bs=1M count=1
    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB) copied, 0.00526288 s, 199 MB/s

    2013-11-11 12:23:46 dpchrist@p43200 ~/sandbox/debian
    $ ll zero.bin
    -rw-r--r-- 1 dpchrist dpchrist 1048576 2013/11/11 12:23:46 zero.bin


HTH,

David


Reply to: