Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-21-2006, 05:58 PM   #1
Registered: Apr 2004
Posts: 49

Rep: Reputation: 15
Question DD backup of whole drive

Ok, I just made a backup of a small drive (a little less than 2 gigs) to another drive. I did
dd if=hda of=hdb
where hda is the small drive, and hdb is the large drive i backed it up to (its ~20 gigs). What I want to do is make a disk image of the 20 gig drive (i no longer have the 2 gig drive), as in...i want to do something like
dd if=hdb of=/location/on/another/drive/hdbimage.img
(hdb is the 20 gig drive). The problem is that I want just the 2 gig backup, instead of the whole 20 gig drive (mostly empty space). Doing a dd like the one above would make a 20gig image file. How do I get just the 2gig file? here is a fdisk -l of hdb (the 20 gig drive)
Disk /dev/hdb: 240 heads, 63 sectors, 2910 cylinders
Units = cylinders of 15120 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1       273   2060320+   6  FAT16
Partition 1 does not end on cylinder boundary:
     phys=(1021, 63, 63) should be (1021, 239, 63)

Last edited by jobless_joe; 04-21-2006 at 06:00 PM.
Old 04-21-2006, 06:18 PM   #2
Bruce Hill
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
dd if=/dev/hda of=hda.iso
might work...
Old 04-21-2006, 08:07 PM   #3
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Since you are using FAT16 you can reliably assume there is no data beyond the 2 GB. So you could use:

dd if=/dev/hda of=/dev/hdc bs=1M count=2k

Adapt /dev/hda and /dev/hdc to what you really need.

Have you seen this thread?




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
backup the whole drive zamri Mandriva 6 03-27-2006 12:17 PM
How should I format my backup drive? oskar Linux - Hardware 7 03-21-2006 06:22 AM
Backup to tape drive kwtan Linux - Software 1 01-11-2006 11:11 PM
using linux cd to backup xp drive babag Linux - General 2 12-23-2005 09:26 PM
Hard Drive Backup Boffy Linux - Software 4 10-19-2004 02:38 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:37 AM.

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