Create a CentOS DVD from CDROM iso images
I'm learning VMWare ESX server, and one of the best ways to install a virtual machine is by using an ISO image for the base OS installation. Today, CentOS 4.2 does not work in a VM session; a SCSI driver issue causes an unrecoverable crash at boot time.
To get around this, I wanted to use CentOS 4.1, the previous release. However, CentOS mirrors routinely remove old releases, including the DVD image, after a new release is shipped. I did manage, however, to download the four CDROM's that makeup the image in the CentoOS vault.
After downloading, I realized that unless I wanted to keep manually telling the VM to swap CD's at install time, I needed to build them into a DVD ISO image that could run unattended. Here's how I did it:
1) Mount each CD ISO image.
# mount -o loop CentOS-4.1-i386-bin1of4.iso /mnt
2) Copy the isolinux directory and the .discinfo from disc1 to the current directory.
#cp .discinfo /rootcp -Rp isolinux/ /root
3) Edit the .discinfo file so that the fourth line changes from "1" to "1,2,3,4"
4) Create a directory to hold the DVD image.
#mkdir /CENTDVD
5) Copy the files from the first CD to the DVD image directory.
# cp -a * /CENTDVD
6) Unmount the CD.
# cd /rootumount /mnt
7) Mount the second CD.
# mount -o loop CentOS-4.1-i386-bin2of4.iso /mnt
8) Copy only the RPMS directory to the proper place in the /CENTDVD directory.
#cp -a /mnt/CentOS/RPMS/* /CENTDVD/CentOS/RPMS/
9) Repeat steps 6-9 for the second, third, and fourth CDROM's.
10) Copy the edited .discinfo file to the /CENTDVD directory.
# cp .discinfo /CENTDVD/
11) Change to the root directory (where you copied the isolinux folder earlier)
# cd /root
12) Create the iso image.
# mkisofs -o /root/CentOS41_DVD.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T /CENTDVD/
13) Burn to a DVD
# cdrecord -v dev=ATA:1,0,0 driveropts=burnfree -eject -data /root/DVD.iso
<< Home