Solved

How to create image of hard drive using dd directly to cd or dvd

Posted on 2006-07-16
8
447 Views
Last Modified: 2013-12-16
I am wanting to make a complete backup image using dd of my hard drive, however, since it is the only hard drive in my system, i can't write the image to itself.  I do, however, have a dvd burner on this system.  Is it possible to use dd to image the entire hard drive directly to a series of either cds or dvds (i know it would be a stack of them, but i think it's my only option).  Also, what compression options are available that might help reduce the size of the output?  Are there other utilities that would do the same, but in a better way than dd?

Thanks for your help!!

ps:  This is on Slackware Linux
0
Comment
Question by:sah18
8 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 300 total points
ID: 17117972
First, in order to carry out the backup, you need to mount the drive read only.....which is a problem if you are running from it!...Therefore, you need a live CD:

http://www.frozentech.com/content/livecd.php

Knoppix (or any of the other data recovery ones) will do the job nicely. Provided you can run the Live CD and burn to an optical media, or save to an external network system, or drive, then you can carry out the backup.

To make an exact copy using dd:

dd if=/dev/hda1 of=/mnt/externaldrive

A number of other ways of doing this to a remote server (over ssh), or a remote share are detailed here:

http://www.okmoore.com/imagedrive.html

(   (()
(`-' _\
 ''  ''

0
 
LVL 9

Author Comment

by:sah18
ID: 17118043
Thanks very much for your help.  Just a couple more questions... The command you gave will work to burn directly to a cd?  Also, don't I need something to tell it to breakup the image into pieces only as large as the media I'm writing to (or will this happen automatically)?  I do actually have two optical drives on this system -- a cd-rw drive and a dvd+rw drive, so I would be able to boot to a live cd first, then burn the image to the second drive.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17118122
>The command you gave will work to burn directly to a cd?

No - You need to use something like cdroast or cdtools to burn to the CD (once you've broken the image into suitable bits).

>Also, don't I need something to tell it to breakup the image into pieces only as large as the media I'm writing to (or will this happen automatically)?

You probably want to use tar to compress the file and use the k option to force it to break the file into specified sized bits.

man tar

for more details

>I do actually have two optical drives on this system -- a cd-rw drive and a dvd+rw drive, so I would be able to boot to a live cd first, then burn the image to the second drive.

Yes you could, but you'd need some space somewhere to store the image/break it up/create the burn image. Either on the network, or on a second drive installed especially for this.

(   (()
(`-' _\
 ''  ''
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 9

Author Comment

by:sah18
ID: 17118132
So, you're saying it's not possible to image directly to a cd or dvd on linux?  You can do this in windows, that why I was hoping linux could do it as well.
0
 
LVL 24

Assisted Solution

by:slyong
slyong earned 100 total points
ID: 17118174
> Are there other utilities that would do the same, but in a better way than dd?
Try Mondo Rescue.. http://www.mondorescue.org/.  It can do back up to CD/DVD too.

Novell also has a script to help you to write to a DVD-R/W: http://www.novell.com/coolsolutions/tools/15505.html simpler but not doing as much as Mondo Rescue
0
 
LVL 40

Assisted Solution

by:noci
noci earned 100 total points
ID: 17118221
dd will only write directly to a dvd-ram, all other need some filesystem that is cd/dvd aware.
but you can use a tool like growisofs, (commandline) or k3b (graphic version)
to burn data to a dvd-rw.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17118235
>So, you're saying it's not possible to image directly to a cd or dvd on linux?  You can do this in windows

AFAIK you can only do that in windows if you have enough space on the operating system drive to create the image prior to burning it to the CD. The same applies to Linux. If you'd like to do the copying 1 file at a time, then memory is probably sufficient to hold each file before it is burnt. Indeed you could do the same with an iso image if you had sufficient memory available, but very few systems have over 4GB of memory in order to enable them to do DVDs on the fly!

Even Mondo requires 800MB of disc space free for preparing the image for burning to CD. For 'streaming to tape, you don't need this because the stream of data is passed continuously to the tape.

(   (()
(`-' _\
 ''  ''
0
 
LVL 9

Author Comment

by:sah18
ID: 17118428
thanks to all for your suggestions!  they've been helpful!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS CLI - Issue with name display 2 73
High Available Storage based on linux 6 84
centos linux 65 127
Run Secure WMI query from CentOS 5 32
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question