Archive for the ‘Software’ category

Merging RHEL 5.3 CDs to DVD

April 19th, 2009

So you’ve got your five Redhat Enterprise Linux 5.3 CDs, but want the convenience of a single disc — how do you merge them into a DVD?

Merging RHEL 5.3 CDs into a DVD

Combining RHEL 5.3 CDs into a DVD. Not so hard, but clear instructions are hard to come by.

There are a few tuts and scripts on the web that do so, but all seem to be all too happy to put you at the mercy of dependency hell — whether Redhat unique dependencies (eliminating Ubuntu, my distro of choice), or ones that require downloading, compiling and setting execute permissions. In short, too much work.

After some heavy scouring, a link was discovered containing a script that achieves the task, but with Fedora Core. A little modding later, it worked perfectly fine with RHEL 5.3. Here’s how to do it.

First, we’re assuming you have ISOs available of the RHEL CDs. Dump them in a folder, open up a terminal and browse to their location.

Next, we need to create folders to mount your existing ISOs:

mkdir -p disk1
mkdir -p disk2
mkdir -p disk3
mkdir -p disk4
mkdir -p disk5

Now mount each of the CDs into their respective folders, replacing the file names with whatever your ISOs are called:

mount -o ro,loop RHEL1.iso disk1
mount -o ro,loop RHEL2.iso disk2
mount -o ro,loop RHEL3.iso disk3
mount -o ro,loop RHEL4.iso disk4
mount -o ro,loop RHEL5.iso disk5

Now we want to create a DVD folder, and copy the needed files across from the ISOs.

mkdir -p dvd
cp -av disk1/* dvd
cp -pv disk2/Server/*.rpm dvd/Server
cp -pv disk3/Server/*.rpm dvd/Server
cp -pv disk4/Server/*.rpm dvd/Server
cp -pv disk5/Server/*.rpm dvd/Server

A little bit of cleanup…

find dvd -name TRANS.TBL | xargs rm -f

Patch the .discinfo file, so it knows all CDs are represented on the one disc:

awk '{ if ( NR == 4 ) { print "1,2,3,4,5" } else { print; } }' disk1/.discinfo > dvd/.discinfo

Unmount your CD images, and remove the folders you created:

umount disk1
umount disk2
umount disk3
umount disk4
umount disk5
rm disk1
rm disk2
rm disk3
rm disk4
rm disk5

Create your bootable DVD ISO. The original script used mkisofs, but if you don’t want to waste time installing it on Ubuntu, you can also use genisofs, as the arguments are the same:

genisofs -J -R -v -T -V "RHEL53DVD" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 8 -boot-info-table -o RHEL53DVD.iso dvd

After a little bit of file generation, you’ll have your DVD ISO. Burn using your tool of choice, and test the installer on your target system. If all runs well, feel free to delete those pain in the arse CD images, and archive the DVD one instead.

Popularity: 51% [?]