[OLUG] dd

Dave Burchell burchell at inetnebr.com
Tue Apr 18 21:27:58 UTC 2000


mesc says:

> I think when I try dd it tries to copy the whole /dev/hda1(2.0 GB
> instead of just it's contents,the win dir(672 MB)I've tried the size
> option (ibs&obs)in the dd man page but I must be doing something
> wrong.How can I use dd to copy just my win dir on /dev/hda1 not the
> whole partition?

I'm glad we are talking about this because I need to put this to use
right away.

I've got an NT machine I want to back up.  I understand that NT is
inherently unstable and will someday destroy itself (and even if it
wasn't the disk could fail at any time).  I could just reinstall NT
4.0, the service pack, and the server software I need, but I could save
valuable time if I have a quick-to-recover backup.

Let's say I have installed Linux on another partition of this NT
machine and I have set it up for dual booting.  I see two obvious
options for doing a backup.

1) Boot Linux and use "dd" on the (unmounted) windows partition.  Copy
an image of that partition to the Linux partition or tape drive.  The
drawbacks here are that I can't restore individual files and the image
of the partition will be the size of the partition, not the size of the
amount of space all of the files take up on the disk.  If my 2.0 GB
partition is only half full I still need to create a 2.0 GB backup
(although this could be brought down with compression).

2) Boot Linux and use "tar" to copy all of the files from the (mounted)
windows partition to the Linux partition or a tape drive.

But I don't know if (2) will work, because how will I make the Windows
partition bootable when I restore it?  Say I install a new, blank HD in
the machine and partition it as the old HD was.  Next I install Linux
on its partition, boot Linux, and create an MS DOS/Windows filesystem
on the partition.  I copy my Windows NT files to the DOS filesystem
using "tar".

Now how do I make it bootable?  I know how I could do it if I was
restoring Linux: I could just run "lilo" after editing lilo.conf to
point to the right kernel file.

(By the way, if you are going to use "dd" to make a backup of the raw
partition, be it a dos/windows filesystem, a Linux filesystem, or any
other kind, you most likely want that partition to be unmounted.)

>                 Thank you,Gary Martin.

-- 
Dave Burchell                                          40.49'N, 96.41'W
Free your mind and your software will follow.              402-467-1619
http://incolor.inetnebr.com/burchell/                  burchell at acm.org     

-------------------------------------------------------------------------
Sent by OLUG Mailing list Manager, run by ezmlm.  http://olug.bstc.net/ 
To unsubscribe: `echo unsubsribe | mail olug-unsubscribe at bstc.net` 



More information about the OLUG mailing list