A SORT OF MINI-MINI-HOWTO....

As I've written elsewhere in this document, I'm not an expert on the Red Hat boot floppy format or Red Hat's installation process. I've pieced together a working Joliet install floppy, but it's still half magic to me. So don't take what I write here as being written in stone; I'm guessing at half of it.

DISKETTE FORMAT

The Red Hat installation floppy is, oddly enough, a FAT-format item. You can read and even modify the files it contains from plain old DOS, if you need to. The various .msg files contain text that's displayed on the screen, vmlinuz is the Linux kernel, initrd.img is a gzipped ext2 RAMdisk image, and ldlinux.sys seems to be the boot loader program. To create my custom boot disk, I simply replaced vmlinuz with a custom-compiled one and replaced the driver modules in the initrd.img file with ones I compiled at the same time as the new kernel. It sounds easy, and, aside from time spent experimenting to figure things out, it was.

KERNEL COMPILATION

I used a stock 2.0.32 kernel, then patched it with the Joliet filesystem support patch. By itself, this patch gives Joliet filesystem support, but leaves several files on the CD that should have execute permission mounted without this. I therefore added a one-line hack (two lines, if you count a comment) to make all files on a non-Rock-Ridge CD come up with execute permission. You can get my modified linux/fs/isofs/inode.c file if you like. It's GPLed, of course.

Probably it would have been cleaner to modify the Red Hat install program to issue appropriate mount options to get everything mounted with execute permissions; but I thought of this approach first, and the appropriate change to the driver became obvious after about five minutes of thumbing through the code, so that's what I did.

I tried to set fairly conservative compile options, while including no networking drivers and all the SCSI and CD-ROM drivers available, as well as the EIDE drivers and various EIDE driver fixes. As I noted in the basic instructions section, I couldn't get the FPU emulation to compile, and so I omitted that. Likewise for the NCR 5380 (not the 53c8xx) SCSI driver, which doesn't seem to have been on Red Hat's disk, either.

After compilation, I simply copied linux/arch/i386/boot/zImage to the floppy as vmlinuz, overwriting the original vmlinuz.

THE INITRD.IMG FILE

Handling initrd.img wasn't tricky, either, once I realized it was a gzipped image file. I just gunzipped it and mounted it via a loopback device. I then wiped the contents of its modules directory and copied gzipped versions of all the modules I compiled to it. In order to reduce wasted disk space, I created a huge file taking up all remaining space in the image and filled it with "0"s, then deleted the file, unmounted the image file, gzipped it, and replaced the original with my modified file.

The boot floppy then worked. For good measure, though, I added some text to the boot.msg file to identify this as a modified boot floppy.

SPECULATIONS

In theory, it might be possible to do something similar to add support for installing Linux from other types of CDs, like a Mac HFS CD, OS/2 HPFS, etc. The Joliet support I created allowed me to not touch the installation programs, though, since Joliet CDs are mounted with the same options as ISO9660 CDs. HFS, HPFS, etc., are handled by different filesystem drivers, and might therefore require modifying the installation programs. It just might work, though. For HFS, there'd be a further complication in that the HFS filename length limit is less than that used on at least some of the Red Hat RPMs, so some RPMs wouldn't install. I don't know if any critical RPMs are among these problem filenames, though.


Copyright © 1997 Rod Smith, rodsmith@fast.net
Return to the Red Hat Joliet install page.