Solved

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

Posted on 2006-07-16
8
448 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 100
How to update  and reset admin password for Linux 5 65
LINUX backups with VEEAM 8 122
awk to variable in bash 2 76
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

821 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