LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple stupid question about the dd command (https://www.linuxquestions.org/questions/linux-newbie-8/simple-stupid-question-about-the-dd-command-584856/)

tommytomthms5 09-15-2007 08:51 AM

simple stupid question about the dd command
 
ok the deal is i have 2 computers involved in this a laptop and a desktop...

the desktops relevant specs are:

80 gig hard drive
P3 550 megahertz
256 mb ram
Debian linux
KDE desktop



the laptop:

40 gig hard drive
Celeron M 1.5 gigahertz(?)
1024 mb ram
DSL live CD
NO desktop



the command im running i read here on these forums posted by AwsomeMachine and others it is


Code:

dd if=/dev/hda of=/dev/hda
its supposed to be for debugging a hard drive and repairing in/out errors

i 1st tested it on my desktop to make sure it works it took 2 hours and worked as advertised


the reason i needed it for my laptop was because im getting a wrong reading on free space in winblows so i popped in a live CD and 1st ran fdisk -l to get the right hard drive then ran the dd command that was 10 hours ago its still running!!!!



to sum that up i ran the same command on 2 computers and the faster one is taking over 5 times as long and counting!!!!!

tommytomthms5 09-15-2007 10:03 AM

ok i rebooted and winblows started right up

saikee 09-15-2007 10:05 AM

I don't know anything about your dd command.

It appears you read from one disk and write it back to the same disk. Seems to be doing nothing if it works at all.

The laptop and desktop PC are also confusing because a Linux can't see one from the other unless it is networked but dd got nothing to do with it.

Can't answer you question because can't understand what you want to achieve. Perhaps you should post the "fdisk -l" output here.

vikaschauhan 09-15-2007 10:48 AM

THe speed of read/write access doesn't only depend only on processors and memory.It also depends on other features, like speed of u'r hard drive,The availaibility of DMA,u'r motherboard model ,I guess.If u have 2 hard drives,and they r not synchronised,the also read/write performance goes down. The dd command is also doing a peculiar job(Reading from a drive,and writing back to the same drive).Although,I have not tried the command before.

jlliagre 09-15-2007 11:13 AM

Quote:

Originally Posted by tommytomthms5 (Post 2892648)
the command im running i read here on these forums posted by AwsomeMachine and others it is

Code:

dd if=/dev/hda of=/dev/hda
its supposed to be for debugging a hard drive and repairing in/out errors

Blindling executing commands without knowing what they do is a dangerous game.

You are lucky not having run another command AwesomeMachine suggested in the same post which would have totally erased your disk (dd if=/dev/zero of=/dev/hda ... <-- DON'T RUN THAT).

The former command doesn't repair bad disk, it just can help you detecting if bad blocks are present on you disk. It shouldn't be run on a disk with mounted partitions as there is a very slight but non-null risk to loose data because of it.


All times are GMT -5. The time now is 01:36 PM.