Building a Redhat Enterprise Linux Serial Console boot DVD
We want to run Redhat Enterprise Linux (RHEL) on a couple of Sun v20z’s. I dont like having screens in the computer room so I wanted to do the install via a serial console (just like on a real Sun box).
There is a lot of info on the web about linux serial consoles, see here and here. However all these documents refer to making a boot floppy if you want to install over the serial console. Floppy drives are a bit legacy so I wanted to build a DVD that will boot on the serial console.
RHEL comes on 5 CD’s! Life is too short to keep walking over to the server to change CD’s so I also looked into building a DVD. Instructions for converting RHEL’s 5 CD’s into a DVD can be found here and here. All I had to do was combine the serial stuff with the DVD. Here are the steps I followed (I did this on a Mac - the hdiutil does what mount would do on other systems):
mkdir DVD
cd DVD
mkdir CD-disc{1,2,3,4,5}
hdiutil attach ../RHEL4-U1-x86_64-ES-disc1.iso -mountpoint CD-disc1
hdiutil attach ../RHEL4-U1-x86_64-ES-disc2.iso -mountpoint CD-disc2
hdiutil attach ../RHEL4-U1-x86_64-ES-disc3.iso -mountpoint CD-disc3
hdiutil attach ../RHEL4-U1-x86_64-ES-disc4.iso -mountpoint CD-disc4
hdiutil attach ../RHEL4-U1-x86_64-ES-disc5.iso -mountpoint CD-disc5
cp -rp CD-disc1/isolinux CD-disc1/.discinfo .
#See below for how this file should look
vi .discinfo
cd isolinux/
#See below for how this files should look
vi isolinux.cfg
rm boot.cat
chmod +w isolinux.bin
cd ..
mkisofs -o 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 CD-disc1/.discinfo
-x CD-disc1/isolinux
-x CD-disc2/RedHat/RPMS/rpmdb-redhat-4-0.20050525.x86_64.rpm
-graft-points CD-disc1 .discinfo=.discinfo isolinux/=isolinux
RedHat/=CD-disc2/RedHat RedHat/=CD-disc3/RedHat
RedHat/=CD-disc4/RedHat RedHat/=CD-disc5/RedHat
The .discinfo file
1117037693.576233 Red Hat Enterprise Linux 4 x86_64 1,2,3,4,5 RedHat/base RedHat/RPMS RedHat/pixmaps
The isolinux.cfg file
serial 0 9600 default serial prompt 1 timeout 600 display boot.msg F1 boot.msg F2 options.msg F3 general.msg F4 param.msg F5 rescue.msg F7 snake.msg label serial kernel vmlinuz append initrd=initrd.img ramdisk_size=9216 console=ttyS0 label linux kernel vmlinuz append initrd=initrd.img ramdisk_size=9216 label text kernel vmlinuz append initrd=initrd.img text ramdisk_size=9216 label expert kernel vmlinuz append expert initrd=initrd.img ramdisk_size=9216 label ks kernel vmlinuz append ks initrd=initrd.img ramdisk_size=9216 label lowres kernel vmlinuz append initrd=initrd.img lowres ramdisk_size=9216 label local localboot 1
Redhat is nice and auto configures inittab so that after the server has booted you will get a login prompt on the console that allows root logon.
On the v20z you need to set up console redirection in the BIOS to allow serial console access to the BIOS and boot messages.
Dont forget to set “Continue console redirection after POST” to off or it will cause problems when using grub.

(4 votes, average: 4.25 out of 5)
(2 votes, average: 4 out of 5)