These days, everyone seems to have a CD writer (CD-R). They are great pieces of hardware, and prices are going down all the time. CDs are great for keeping static data. Your favorite downloads contained on piles of floppies can now be transferred to one CD, lowering your risk of losing the data. With your own CD writer, you can make custom CDs of your favorite Linux distribution, crafted for your needs. You can also make CD archives of your favorite FTP site and pass it along to friends to avoid bandwidth problems.
If you are currently looking for a CD-R, get SCSI. SCSI CD-Rs have been around far longer than ATAPI (IDE) CD-Rs and, as a result, are better supported. However, if you do have an ATAPI CD-R or just can't afford SCSI, don't worry—you can still make CDs.
In order to write with a SCSI CD-R, you must have “SCSI support”, “SCSI CD-ROM support” and “SCSI generic support” compiled in the kernel. Also be sure you have “ISO9660 cdrom filesystem” support. Having “Loopback device support” compiled in the kernel is a good idea, but not required. For this article, I will assume you know how to build your own kernel; if not, refer to the Kernel-HOWTO (see Resources).
ATAPI CD-Rs require a bit more effort. You must have at least kernel version 2.0.35; anything below this requires patches. Recompile your kernel with “IDE/ATAPI CD-ROM support” disabled and “SCSI Emulation support” enabled. Along with these options, you must also enable those options mentioned above (yes, even the SCSI support). The result is your CD-R will look and act like a SCSI device, even though it is an ATAPI. Your CD-writing software also needs to support ATAPI writing; I will discuss this later. Note that when you use SCSI emulation, all IDE CD-ROMs change to a SCSI prefix, so your first CD-ROM would be /dev/scd0.
CD writing in Linux requires two utilities: mkisofs and cdrecord. The first, mkisofs, is required to make an image of the files you wish to burn. Most major distributions come with this utility, but in any case, getting the latest version would be wise. The latest version can be found at ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/. The second utility, cdrecord, is the software used to burn the image made with mkisofs to a blank CD. You can find cdrecord at metalab.unc.edu/pub/Linux/utils/disk-management, and again, I highly recommend getting the latest version (1.6.1 at the time of this writing). Another utility for burning CDs is cdwrite which can also be found at that URL.
Aside from these, some free and commercial GUI programs for making CDs are also available. X-CD-Roast (see “X-CD-Roast: CD Writer Software” by Thomas Niederreiter, LJ, January 1998) is probably the most famous and is freely available; however, it is based upon the cdwrite utility. There are also X applications which act as a shell and call upon the appropriate utilities to do the job.
Once you have the appropriate utilities installed, you can begin to write your own CDs. Before you begin, collect the files to be burned under one directory. I'm going to use the downloading and burning of a Linux distribution as an example throughout this article. First, let's say you anonymously log in to ftp.some_server.com and switch to the directory /pub/linux. This hypothetical directory contains three different distributions; the list output ls looks like Listing 1.
Assuming distribution_b is the one you want, proceed to download the entire distribution by typing get distribution_b.tar at the ftp prompt. Of course, this directory contains everything you need and nothing else. After all, you wouldn't want to download the distribution for several different architectures. Thus, when you download an entire distribution, make sure you go deep enough into the directory to get only what you need. For example, if you wanted to download the entire Red Hat distribution for the i386 architecture on ftp.cdrom.com, you would download everything in the /pub/linux/redhat/redhat-6.0/i386 directory and below.
Once the download is finished, create a directory for storing the files. In this example, I'll create a directory called cdimage, then place the contents of distribution_b.tar into that directory by executing the following commands:
mkdir cdimage tar vxf distribution_b.tar -C cdimage
Since the verbose (v) option is requested, the contents of distribution_b.tar will fly by on your screen and its contents will be located in cdimage. If everything went well, you can now delete distribution_b.tar to save space.
If you want to burn some collection of files other than a Linux distribution, just place them in the cdimage directory.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Working with Command Arguments
- CentOS 6.8 Released
- The Italian Army Switches to LibreOffice
- ServersCheck's Thermal Imaging Camera Sensor
- Linux Mint 18
- Petros Koutoupis' RapidDisk
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide