How to make your own RedHat 8.0 DVD 

http://www.linuxcompatible.org/article.php?sid=252

Date: 2002-10-03 12:37:52

Jay Berkenbilt has posted a guide on the Red Hat 8.0 mailinglist about making your own RedHat 8.0 DVD from the CD ISO images:

RedHat is not presently offering an ISO image of the DVD for download.

After reading some of the anaconda source code, I have figured out how you can make your own DVD from the CD ISO images. I've done this, written it to a DVD+RW disc, had it pass its Media check, and successfully installed from it.

The idea is simple, which is a testament to the flexibility of Red Hat's installation system. There's a file on the root of each CD called .discinfo that contains information including which discs' contents are represented. The CDs each contain only a single number here, but the installation software will accept a comma-separated list of numbers. The sequence of commands below will create an ISO image that consists of the combined contents of the five discs the documentation disc (in a docs subdirectory) and is bootable and suitable for being installed from. If you don't care about docs, omit the docs/=Psyche-docs argument, and don't bother with the docs ISO. If you don't care about sources, omit the SRPMS/= arguments and dispense with discs 4 and 5.

These instructions require you to have enough disk space for the resulting ISO image, but if you have a DVD burner and don't care about installing the media checksum so that you can test the media from install (not really that important if you have verified the checksums of the original images, unless you're concerned about errors resulting from the actual DVD creation process itself), you can pipe the output of mkisofs directly to your burning software and not worry about the intermediate disk space.

So here are the steps. These steps create a DVD image that is usable from a Unix system. Add the -J and -T flags to the mkisofs command if you want something that you can read from Windows as well. Add -V "Label" if you want to create a volume label.

  1. Go to a place on your drive with about 3.5 GB free. This is needed for the final ISO image only. You'll need a 2.4 kernel to create a file> 2 GB. If you're running Red Hat, This works on a 7.1 system or newer.
  2. Create directories on which to mount the ISO images using loop device mounts:

    mkdir Psyche-i386-disc{1,2,3,4,5} Psyche-docs
  3. Mount the ISO images using a loop device mount:

    mount -o ro,loop .../Psyche-i386-disc1.iso Psyche-i386-disc1
    mount -o ro,loop .../Psyche-i386-disc2.iso Psyche-i386-disc2
    # etc. -- repeat for the remaining discs that you want
    # Replace ... with the path to your ISO images.
  4. Copy the isolinux directory and the .discinfo from disc1 to the current directory:

cp -a Psyche-i386-disc1/isolinux Psyche-i386-disc1/.discinfo .

  1. Edit the .discinfo file, replacing the fourth line with 1,2,3,4,5 if you are creating an image with all five discs or with 1,2,3 if you are just using the three install discs.
  2. Create the iso image. I'm separating this mkisofs command into multiple lines ending with for clarity. You can type it that way or as a long command. I explain this command at the end.

    mkisofs -o Psyche-i386-dvd.iso
    -b isolinux/isolinux.bin -c isolinux/boot.cat
    -no-emul-boot -boot-load-size 4 -boot-info-table
    -R -m TRANS.TBL
    -x Psyche-i386-disc1/.discinfo -x Psyche-i386-disc1/isolinux
    -graft-points Psyche-i386-disc1 .discinfo=.discinfo isolinux/=isolinux
    RedHat/=Psyche-i386-disc2/RedHat RedHat/=Psyche-i386-disc3/RedHat
    SRPMS/=Psyche-i386-disc3/SRPMS SRPMS/=Psyche-i386-disc4/SRPMS
    SRPMS/=Psyche-i386-disc5/SRPMS docs/=Psyche-docs
  3. (Optional) If you want to create a media checksum for the installation software to look at when you do a media test during install, then following these additional steps:
  4. Install the anaconda source rpm located on disc5 and cd /usr/src/redhat
  5. Comment out the BuildPreReq line in SPECS/anaconda.spec
  6. Run rpmbuild -bp SPECS/anaconda.spec
  7. Go to BUILD/anaconda-8.0/isomd5sum
  8. Run "make"
  9. Run ./implantisomd5 …/Psyche-i386-dvd.iso (where … is replaced with the path to your new ISO image). This step will take several minutes and not provide any feedback while it runs.

Now burn the resulting ISO image to a DVD.

Here's the mkisofs command explained:

# Write the output to Psyche-i386-dvd.iso
mkisofs -o Psyche-i386-dvd.iso

# Set up the DVD to be bootable using an El Torito boot image.
# This comes from the RELEASE_NOTES file on disc 1.
-b isolinux/isolinux.bin -c isolinux/boot.cat
-no-emul-boot -boot-load-size 4 -boot-info-table

# Use Rock ridge extensions (to support long file names, etc.).
# Exclude all TRANS.TBL files on the original disc. If you want
# to access this disc from Windows, add -J to create Joliet
# extensions and -T to create new TRANS.TBL files in place of
# the ones you're omitting.
-R -m TRANS.TBL

# Omit the .discinfo and isolinux files from disc1
-x Psyche-i386-disc1/.discinfo -x Psyche-i386-disc1/isolinux

# Use Psyche-i386-disc1 (minus above exclusions) as the root.
# Graft the .discinfo and isolinux directories from the current
# directory to .discinfo and isolinux on the new disc. Also
# graft in the RedHat and SRPMS directories from the remaining
# discs. Include the entire contents of the docs disc in the
# docs subdirectory.
-graft-points Psyche-i386-disc1 .discinfo=.discinfo isolinux/=isolinux
RedHat/=Psyche-i386-disc2/RedHat RedHat/=Psyche-i386-disc3/RedHat
SRPMS/=Psyche-i386-disc3/SRPMS SRPMS/=Psyche-i386-disc4/SRPMS
SRPMS/=Psyche-i386-disc5/SRPMS docs/=Psyche-docs

I'd be interested to find out if someone who has a DVD-R or DVD+R can comment on the relative performance of this DVD with the CD. If I boot off of the CD, it takes 50 seconds between hitting enter the first time and being at the RedHat 8.0 graphical install screen. If I boot from the DVD+RW that I created, it takes over two minutes.

Jay Berkenbilt http://www.ql.org/q/