Wednesday, August 19th, 2009 ~ 10:10 pm by Mauriat Miranda
When I built my server, I only used a CD-RW/DVD-ROM combination drive. Whenever I remotely downloaded a ISO using wget or bittorrent, I would have to copy the 2-4GB file(s) from my server to either my desktop or laptop. I finally caved, and bought a DVD-RW drive for my server (even though it will get minimal usage).
(This was all on my CentOS 5 server, I executed these commands entirely remotely. )
After I installed the new drive, I ran dmesg to check how it was detected:
[mirandam@atlas ~]$ dmesg | grep DVD hda: HP DVD Writer 1140d, ATAPI CD/DVD-ROM drive hda: ATAPI 12X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(66)
The device is /dev/hda, which will be linked to the DVD device in /dev:
[mirandam@atlas ~]$ ls -l /dev | grep dvd lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvd -> hda lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvd-hda -> hda lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvdrw -> hda lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvdrw-hda -> hda lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvdwriter -> hda lrwxrwxrwx 1 root root 3 Aug 19 19:44 dvdwriter-hda -> hda
In order to work with DVD writing, you should have the dvd+rw-tools package installed. This will most likely be installed if you have Gnome or a CD/DVD app such as K3b. If not install via yum:
# yum install dvd+rw-tools
I wanted to erase a DVD+RW.
I had a junk DVD+RW (Memorex) laying around that I wanted quickly deleted. I used the dvd+rw-format command (it took less than 30 seconds):
[mirandam@atlas ~]$ sudo dvd+rw-format -force /dev/dvd * BD/DVD+RW/-RAM format utility by <appro @fy.chalmers.se>, version 7.0. * 4.7GB DVD+RW media detected. * formatting 92.3\
I wanted to burn a downloaded ISO file onto the DVD+RW.
I used the growisofs command. I tried using sudo but it refused, so logged in directly as root.
[mirandam@atlas ISO]$ su - Password: [root@atlas ~]# cd ~mirandam/ISO/ [root@atlas ISO]# growisofs -dvd-compat -Z /dev/dvd=DVD_Image.iso -speed 2 Executing ‘builtin_dd if=DVD_Image.iso of=/dev/dvd obs=32k seek=0′ /dev/dvd: restarting DVD+RW format… /dev/dvd: “Current Write Speed” is 4.1×1352KBps. 31490048/2530975744 ( 1.2%) @4.0x, remaining 7:56 RBU 100.0% UBU 2.4% … … 2512584704/2530975744 (99.3%) @4.0x, remaining 0:03 RBU 100.0% UBU 99.8% builtin_dd: 1235840*2KB out @ average 4.0×1352KBps /dev/dvd: flushing cache /dev/dvd: writing lead-out
As you can see, it took about 8 minutes (fast!) for this to finish. After it finished, I mounted the new DVD to test it (my image was udf, most linux CD/DVD images are iso9660):
[mirandam@atlas ~]$ sudo mount /dev/dvd /mnt/dvd -t udf
When I got back to the server, my DVD+RW was ready for me.
I plan to always leave a DVD+RW media in the drive so it can serve as an means for backup. Automating the process may also be a good idea.