LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cloning part of a Disc (https://www.linuxquestions.org/questions/linux-newbie-8/cloning-part-of-a-disc-565831/)

Blennie 07-01-2007 11:23 AM

Cloning part of a Disc
 
I want to use the `dd` command to clone just the first 300Mb of a hard drive.
Would the following work ?

dd if=/dev/hda count=300000 of=/path/to/file/ 300meg.img

Should I specify a `bs` value ?

Many thanks.

bigrigdriver 07-01-2007 03:31 PM

I don't know if you have seen this yet, but here's a link to LQs own DD HOWTO.
http://www.linuxquestions.org/questi...d.php?t=362506

saikee 07-01-2007 06:06 PM

You must clone the whole partition if you want an operating system to read it.

pixellany 07-02-2007 08:20 AM

There is a default block size in dd (512 bytes=1/2Kbyte on my machine)

So, for 300Mbytes, you need count=600000

for large files, I think dd goes faster if you set a larger block size.

Blennie 07-02-2007 03:22 PM

Thanks pixellany,
I added a bs=1024 and kept count to 300000 which did the trick.


All times are GMT -5. The time now is 11:34 AM.