CD-ROM TIPS

Creating a Red Hat installation CD can be tricky; there are a number of pitfalls in addition to those listed in the Basic Instructions section. In order to help you understand them, I first give some background information, then the pitfalls, then some additional notes.

Before proceeding further, though, it bears mentioning again that CD-R image files for Red Hat Linux are available on the net. The Basic Instructions section includes a list of sites I know to have such images. If none of these sites works reliably for you, try doing a search at http://www.deja.com for messages about Red Hat image files. If you can reliably download a big image file, using a pre-made image file may help you avoid many potential pitfalls.


Filesystems

A filesystem is a way to store information on a random-access medium, such as a floppy disk, hard disk, or CD-ROM disc. The filesystem determines where files will be placed, what sorts of filenames are legal, and what other interesting features (such as links and permissions) will be supported.

ISO-9660 is the standard filesystem for CD-ROMs, but it's limited to "8.3" filenames in its Level 1 incarnation or longer but still single-case filenames in Level 3. It also doesn't support other useful features, like Unix-style permissions. Red Hat Linux cannot be installed from an ISO-9660 filesystem, as far as I know. Rock Ridge is a set of extensions to ISO-9660 which give it long filenames, permissions, links, and other features that are standard on Unix filesystems. If you buy a Red Hat Linux CD, it will almost certainly use Rock Ridge. Joliet is the name given to Microsoft's long filename-enabled CD-ROM filesystem. Unlike Rock Ridge, Joliet is a complete filesystem in and of itself; it does not rely upon an underlying ISO-9660 filesystem, though it can (and usually does) coexist with an ISO-9660 filesystem, so the same CD can be viewed with long filenames in Windows but with 8.3 filenames in DOS. Joliet does not support certain key features of Unix filesystems, though, such as ownership or links. Some third-party Red Hat CDs now come with both Rock Ridge and Joliet. The advantage of burning both filesystems is that you can insert the CD in a Windows machine and export the CD-ROM on a network, thus using it as a server for installing Linux on other computers. You cannot do this with a CD that only contains ISO-9660 and Rock Ridge, since Windows machines will then be unable to read the long filenames.

Permissions

One of the problems with installing Red Hat Linux from a Joliet CD is that of permissions. Linux (and Unix in general) relies on permissions to tell the OS who can access what file, whether the file is executable, etc. Joliet includes only limited permissions information, but the Linux Joliet driver "fakes it" in various ways depending upon the kernel version and the mount options. As it happens, this appears to be good enough for a fresh install of Red Hat Linux 5.1 through 6.0. My modified Red Hat 5.0 install floppy forces execute permission on all files. Note that this is important only to files executed from the install CD; files installed on your computer will have the correct permissions set by the install program, no matter the source medium of the install.

Tools for Creating a Rock Ridge CD

The best way to create an installation CD for Red Hat Linux is to create one in Rock Ridge format. If you already have Linux installed, or if you have access to another Unix-style OS with a CD-R drive (or some way to transfer a large file from it to a machine with a CD-R drive) it's best to use mkisofs in conjunction with some other CD-R writing software to create a Rock Ridge CD. The mkisofs program will create an "image file" (sometimes called an "ISO image") of a CD, the contents of which you specify. This image file can contain ISO-9660 with Rock Ridge extensions and/or with Joliet.

Few regular Windows CD-R packages support Rock Ridge, since Windows itself doesn't support these extensions. As described below, there is a Windows port of mkisofs available, which can be used in conjunction with other CD-R tools to create a Rock Ridge CD from Windows. There are also a handful of regular Windows CD-R packages that will do the entire job, from file selection to actual burning. One of these is HotBurn from AsimWare. The demo version of HotBurn won't actually create a CD or CD image file, though, so I don't know how it handles permissions; it may not be suitable for creating a Red Hat Linux install CD using Rock Ridge, though it may be OK when set to create a Joliet CD.

Note that it does not matter what label you give the Linux installation CD; Linux will ignore this.

Basic mkisofs Use

There is a Windows 9x/NT port of mkisofs available. This creates a CD from which Red Hat can install, provided you use it with the "-r" switch, which tells it to create a Rock Ridge CD with appropriate permissions. Note that there's also a "-R" switch, which also creates a Rock Ridge CD, but the permissions will be wrong for installing Linux with this. In brief, if the Red Hat install tree is in the \RHAT directory, you would specify:

    mkisofs -r -a -o /redhat.iso /RHAT

to create a file called redhat.iso with the appropriate image. Before you try this, though, be sure to read the Basic Instructions section, and the pitfalls listed below.

When you run mkisofs, you will receive a large number of messages that look something like this:

   (XFree86-3.3.2.3-18.i386.rpm)
   Using XFREE86-.00I;1 for 
   d:\cd\redhat/update-5.0/XFree86-3.3.2.3-18.i386.rpm

These are not error messages. The Red Hat RPM filenames are quite long, and many of them truncate down to conflicting ISO-9660 8.3 filenames. Therefore, mkisofs assigns different ISO-9660 names for these conflicting files. In the example above, mkisofs is telling you that the file XFree86-3.3.2.3-18.i386.rpm will appear in DOS or some other OS that can't read Rock Ridge as XFREE86-.00I, rather than XFREE86-.RPM, which was assigned to some earlier file. Since Linux uses the Rock Ridge filename, this will have no consequences for Linux installation, or for subsequent use of the CD from Linux. Similar messages would appear, and comments would apply, if a Joliet CD were being created. Only if a "plain vanilla" ISO-9660 CD were being burned would these messages be of any interest, and such a CD would be useless for Linux installation anyway.

Creating a Bootable CD

The latest rage is to create bootable CDs. When inserted into a properly configured computer with a recent BIOS, these CDs will boot, much like a floppy, permitting a floppyless installation. Most recent commercial Linux CDs are bootable. It is possible to create a bootable Linux CD using mkisofs by using the -b and -c parameters; you use the -b parameter to point the program to a bootable floppy image (namely, the boot.img file from a Red Hat 5.1 distribution), and specify a "junk" filename with the -c parameter. Similar utility exists in many Windows CD-R programs capable of producing Joliet CDs. If you want to create a bootable CD, I strongly suggest you read the documentation for the program you plan to use to burn the CD. In most cases, if you make a mistake, your CD will still be useable with a boot floppy even if it is not itself bootable, so there's little to be lost for trying this.

On the other hand, my personal experience with such CDs has been mixed. Using the same CD and the same hardware, I've found that different BIOSes may react differently to bootable Linux CDs; sometimes they'll boot and sometimes they won't. Because bootable CDs really save very little time, I don't consider this a very important feature, unless you need to install Linux on many computers.

Burning a CD

Once you've created a CD image, you'll need to burn it to a CD with some other software package. Adaptec's Easy CD Creator 3.01 or above (but not version 3.00; a free update to 3.50a is available) and Easy CD Pro 95, and Ahead's Nero (for which a demo version is available) can all do this, as can most other CD-R programs for Windows. In Unix/Linux, cdrecord is the most commonly used tool to accomplish this task.

With Red Hat 6.0, both Rock Ridge and Joliet CDs install equally well, so there's little reason to favor one format over the other unless you plan to install using a network to a computer that lacks a CD-ROM drive, in which case a Joliet CD will let you use a Windows computer as the host for the CD. If you want to ensure that your Linux CD has execute permissions only on the files that need it, or if you're very pressed for space on the CD and want to use symbolic links wherever possible in the RedHat/instimage directory tree, Rock Ridge is preferable.

Verifying a CD

Once you've burned a CD (or even before you've done so, if you have a utility to "mount" a CD image file), you may want to check your CD to be sure it has the correct files in the correct places. If you do this from DOS, any variety of Windows, OS/2, or MacOS, and if you burned a Rock Ridge CD without Joliet extensions, you will not be able to see the long filenames. This is normal, and does not mean that your CD is bad. Most OSes can't read Rock Ridge extensions. So you can check that your directories exist where they should, and that the CD has roughly the right amount of data, but that's about it. The real test will come when you try to install Linux from the CD. If you try that and it fails, the most important thing you can do is to hit the < Alt-F3 > key and take note of the last few lines on the screen; there will likely be useful diagnostic information there, even if it looks like gibberish to you. Write it down and include it in any message you post on this problem.

If you create a Joliet CD, you will be able to see the long filenames from Windows or some other Joliet-enabled OS, so you'll be able to do a more thorough check that your CD is valid before trying to install Linux from it. Still, the real test will come when you try to install Linux, and again, if it fails, hit < Alt-F3 > and record the information from the last few lines on the screen.

CD Pitfalls

Obtaining the Files

First, a tip: Many ftp sites allow you to grab an entire directory tree as a tar file. For instance:

   ftp> cd /pub/redhat/redhat-6.0
   ftp> bin
   ftp> get i386.tar

This will grab the entire contents of the i386 directory as a single tar file. When using compatible versions of tar and mkisofs (you'll need mkisofs 1.12b4 or later, available from ftp://ftp.ge.ucl.ac.uk/pub/mkhfs/new-win32; the other links to mkisofs on this web page are to version 1.11), this will even preserve permissions and links, even when done from Windows; however, this may well fail (see CD Pitfall #2, below), so I don't recommend doing this from Windows.

CD Pitfall #1: Losing links. A few files in the \RedHat\instimage\ hierarchy are actually symbolic links to other files. As far as I know, Joliet doesn't support these. Neither does FAT, so even when using mkisofs from Win95, you must apply a workaround. The workaround is to include multiple copies of the same file under different names. There's more than enough space on a 650MB disc to handle this duplication. Just be sure you've got the actual files for each and every link. One way to check this is to use a text-mode ftp tool and list the files. Most text-mode ftp tools will show links with arrows pointing to the "original" files, so you can open one window with a text-mode ftp and do a "dir" of the source directory, and compare that against what you've got locally. You may need to do this one letter at a time -- e.g., "dir a*", then "dir b*", etc., to be able to check all the files.

CD Pitfall #2: Losing permissions. When creating a CD from Windows, you're relying upon either mkisofs or (when using Joliet) the Linux drivers to produce a CD with suitable permissions. As mentioned above, mkisofs's "-R" switch does not produce correct permissions, though "-r" does. If you're relying on the preservation of permissions via a tarred copy from an ftp mirror, however, or are preparing a Linux CD image on a Unix box, be aware that the permissions on the mirror site itself may not be correct; I've seen reports of execute permissions being omitted on the mirror sites. Therefore, I suggest that Windows users not use the "tar" grab from an ftp site method of download, and that Unix users check that the files in the RedHat/instimage directory tree do indeed have execute permissions before creating a CD image.

CD-ROM Creation

The next step is to burn a CD. I'll assume that you know how to burn a CD with your Windows (or whatever) software. If not, try reading the documentation, or check the CD-R FAQ at http://www.fadden.com/cdrfaq/. As to the rest, it's just a matter of firing up your favorite CD creation program and having at it, right? Well, maybe. A few pitfalls still lurk for the unwary:

CD Pitfall #3: Filenames (again?!? Yes!) If your filenames are correct on the hard disk, you should be set. Sadly, this isn't always the case. Specifically, I've created disk-based Joliet images with five programs: Adaptec's Easy CD Creator 3.01 and their Easy CD Pro 95, Ahead's Nero 3.0.1.2, and the Linux versions of mkhybrid 0.48a and mkisofs 1.12b4. My final test Red Hat 5.0 Joliet CD was created with Nero, and it worked fine. So did my test Joliet CD for Red Hat 5.1, created with Easy CD Pro 95. My 5.2 Joliet CD was created with mkisofs in Linux, and it worked fine. mkhybrid also produced an image that looked like it would work, though I haven't verified that. Easy CD Creator 3.01, though, insisted on planting periods (".") after every short filename when creating a Joliet CD. Most 2.0.x Linux kernels (used in Red Hat 5.x distributions) either include such periods or give the files no execute permissions, which makes Easy CD Creator unsuitable for burning a Joliet Red Hat 5.x install CD. More recent Linux kernels include code to eliminate these stray periods, however, and in fact I used Easy CD Creator 3.50a to burn a Red Hat 6.0 install CD that worked (but not with an install floppy from Initio for their SCSI host adapters; presumably their kernel omitted Joliet support, or altered the standard options). Other programs may have similar limitations. The Windows port of mkisofs creates an image with the correct filenames in both Rock Ridge and Joliet modes, provided the filenames are correct on the disc and the correct parameters are passed to the program.

CD Pitfall #4: CD-ROM type mis-match. On one of my "dry runs" in creating a disk image of a test CD, I found that Linux and its Joliet support did not mount a CD image that was created with the CD-ROM XA specification, as implemented by Adaptec's Easy CD Creator 3.01. I changed the setting to "CD-ROM Type 1" and it worked better (but not well enough for Red Hat 5.x; see CD Pitfall #3).

CD Pitfall #5: Other (unknown) settings. I've by no means done extensive testing with the dozens of CD-R burning programs available, so there are probably other options or settings than the ones I've tried that would create problems. I recommend being a bit on the conservative side, when in doubt. If you must use Joliet, it is of course necessary, and it would be good to have a "plain" ISO-9660 filesystem in addition to this, but I'd recommend shunning other more exotic options.


Copyright © 1997, 1998, 1999 by Rod Smith, rodsmith@rodsbooks.com
Return to my home page