These days more and more people start to forget the g* / Linux old times when we used to copy CDs from console using dd in conjunction with mkisofs .
Therefore to bring some good memories back of the glorious console times I decided to come up with this little post.
To copy a CD or DVD the first thing one should do is to make an image copy of the present inserted CD into the CD-drive with dd :
1. Make copy of the CD/DVD image using dd
# dd if=/dev/cdrom of=/tmp/mycd.iso bs=2048 conv=notrunc
/dev/cdrom is the location of the cdrom device, on many Linuces including (Debian) /dev/cdrom is just a link to the /dev/ which corresponds to the CD drive. Note on FreeBSD the location for the CD Drive is /dev/acd0
/tmp/mycd.iso instructs dd CD image creation to be placed in /tmp/ directory.
bs argument instructs it about the byte size portions by which the content of the CD-Drive inserted CD will be read. bs value of 2048 is actually only 2KB per dd read, increasing this value will decrease the time required for the CD image to be extracted.
2. Prepare CD image file to be ready for burning
After dd completes the image copy operation, next to prepare the extracted image / ISO to be ready for burning mkisofs is used:
# mkisofs -J -L -r -V TITLE -o /tmp/imagefile.iso /tmp/mycd.iso
The -J option makes the CD compatible for Pcs running Microsoft Windows. The -V TITLE option should be changed to whatever title the new CD should have, -r will add up status bar for the mkisofs operation.
-r is passed to create specific file permissions on the newly created CD, -o specifies the location where mkisofs will produce its file based on the CD image /tmp/mycd.iso .
3. Burning the mkisofs image file to a CD/DVD on GNU / Linux
linux:~# cdrecord -scanbus
linux:~# cdrecord dev=1,0,0 /tmp/imagefile.iso
If all wents okay with cdrecord operation, after a while the CD should be ready.
4. Burning the mkisofs image file to CD on FreeBSD
freebsd# burncd -f /dev/acd0 data /tmp/imagefile.iso fixate
More helpful Articles
Tags: argument, byte, byte size, cd image, CD-drive, cdrom, conv, copy, dd cd, drive, file, file permissions, freeb, gnu linux, Image, image copy, image creation, image file, image iso, imagefile, ISO, isoIf, linux cdrecord, linux linux, location, Microsoft, mkisofs, mycd, new cd, notrunc, operation, option, size, size portions, status, terminal, time, title option, tmp, value
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:27.0) Gecko/20100101 Firefox/27.0
Great post. I love any solution that doesn't require X11! 🙂
note that -L is deprecated (at least in FreeBSD 10-RELEASE) but the following works as expected:
mkisofs -J –allow-leading-dots -r -V TITLE -o disc.iso prefile.iso
View CommentView Comment