LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2007, 11:23 AM   #1
Blennie
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Rep: Reputation: 0
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.
 
Old 07-01-2007, 03:31 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,893

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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
 
Old 07-01-2007, 06:06 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You must clone the whole partition if you want an operating system to read it.
 
Old 07-02-2007, 08:20 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.
 
Old 07-02-2007, 03:22 PM   #5
Blennie
LQ Newbie
 
Registered: Jun 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks pixellany,
I added a bs=1024 and kept count to 300000 which did the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Wells Grants in Part IBM's Motion to Limit SCO's Claims! In *Large* Part. LXer Syndicated Linux News 0 06-28-2006 09:33 PM
LXer: Cheat Knoppix -- Part 4. Computer on a Disc and a USB Key LXer Syndicated Linux News 0 01-23-2006 12:17 PM
k3b hangs when trying to burn dvd+rw disc but not cd rw disc laiboonh Slackware 0 11-06-2004 11:22 AM
Will converting my disc to dynamic disc in windows..... jasonmcneil0 Linux - General 2 03-15-2004 12:10 PM
Locating Disc 2,3,4,5 later after installing 1 Redhat disc lava Linux - General 1 03-22-2003 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration