Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Is it possible to dd an image of your hard disk to a dvd cdrom?
dd if=/dev/hdc of=/dev/cdrom
Dd will not write directly to optical type drives, like CD/DVD. It is possible to put hard drive contents on a DVD, but it doesn't work the way you think it would. People think if you just booted the DVD of a hard drive image of their linux installation they will have a whole linux install on a DVD. It doesn't work that way. DVD media is not writable by the kernel, so all the writing that needs to be done has to be done to system memory when using a boot DVD. It is a little more complicated than just making an image of an HDD and using cdrecord to burn it. There are instructions all over the internet on how to make a linux live CD. It actually isn't that hard to even make Knoppix.
If you were thinking of using a DVD for backup, there are programs to write a system to one or more DVD's, and restore them from a bootable CD if the system fails.
What steps do I need to follow to make a perfect copy of a DVD with an unknown filesystem, with the hopeful purpose of being able to put the raw data back onto another DVD?
I've already done this:
dd if=/dev/hdc of=image.raw
Would I have needed to use bs or count? How would I get these values in the first place?
Now how would I get this back onto a blank DVD? Would there be any concerns about the difference in size of the original and blank DVDs?
You have your DVD image file. I'm assuming you run a graphical desktop environment such as KDE or Gnome. When you say exact I take that to mean the data and any boot information. To make an absolutely identical DVD is a little more tricky because there are several places where information about the author, the date, organization, copyright, etc can be stored. The DVD burning program will burn the image back to the DVD, and it will work exactly the same as the DVD it was made from, but it won't be bit for bit identical in the first few sectors. That is really unimportant for functional copying. The most trouble free program for burning images to a DVD is k3b. You probably already have it on your system. You want to burn a DVD image - Tools > DVD > Burn DVD ISO Image. It should just work.
I failed to say that I know my stuff about Linux, as I've been using it for 5 years now and am currently using Gentoo.
Apart from being a perfectly exact copy of the DVD with all the minor details, the method I used should get me the boot+data areas? (i.e. `dd if=/dev/dvd of=image.raw`)
There's no need for bs/count to be set?
I'll try out a burn with k3b to see if it works on the weekend, but will have to wait til Monday to try it out.
If sector size is divisible, or a multiple of 512 bytes, you can just use the default block size of 512 bytes by not specifying "bs" at all. DVD sectors are 2048 bytes, or exactly 4 * 512 bytes. For faster copying you might try bs=4096, so you don't have so many I/O's. Dd is a buffer intensive program. All the data has to be buffered 4 times. Once in the source drive internal buffer, once in the dd read buffer, once in the dd write buffer, and once in the destination drive buffer. That's four I/O's for every block. You can see where picking a proper block size can really improve performance. If "count" is not used, dd stops when it gets to the end of the media, and marks the file it created with an EOF.
If sector size is divisible, or a multiple of 512 bytes [...]
This isn't a typical audio / video / data disc, so I can't be sure of the value without checking first.
How would I get this value? (considering I can't mount the DVD)
If it is a bootable DVD, with programs on it, it is a data DVD. I can't imagine any DVD that wouldn't be a typical audio, video, or data disk; except perhaps a game DVD. Dd won't work with anything but data. Audio has no format, it is just a continuous track demarkated into smaller tracks. Video is mpeg, so you can dd video disks, but games are special. Games require special software to copy because the format on the disk changes, and there are unformatted parts of a game disk which dd cannot deal with.
Is it possible to create an exact duplicate from a hard disk protected by Safeguard Easy (a hard disk encryption tool)?
Safeguard Easy (from Utimaco) creates two partitions, one for the boot protector and another partition which is encrypted. I believe my problem lies in the unmountability of the second partition as Linux doesn't recognize the (encrypted) file system.
FYI, I'm pretty new to linux and trying to get a better understanding in forensics using Linux tools.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.