CLASS="SECTION" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

C.9. Create boot disk for serial console

Once the upgrade has been sucessfully done create a boot floppy which has serial console support. This is most simply done by creating a boot disk, as done by the anaconda installer or as described in Section 2.1; modifying the configuration file \SYSLINUX.CFG to configure the boot loader to use the serial console, as described in Section 4.3; and finally configuring the kernel to use the serial console, as described in Section 5.3.

An alternative is to create your own mkbootdisk RPM package containing a modified copy of the shell script /sbin/mkbootdisk.

The \SYSLINUX.CFG file on the boot floppy is written by mkbootdisk using the code in Figure C-3. We alter this code to use the serial console; the result is shown in Figure C-4.

Figure C-3. Extract from Red Hat Linux 7.2 mkbootdisk which creates SYSLINUX.CFG

cat > $MOUNTDIR/syslinux.cfg <<EOF
default linux
prompt 1
display boot.msg
timeout 100
label linux
  kernel vmlinuz
  append $INITRDARG root=$rootdev
EOF

Figure C-4. Altered extract from mkbootdisk, which creates a SYSLINUX.CFG that uses a serial console

cat > $MOUNTDIR/syslinux.cfg <<EOF
serial 0 9600
default linux
prompt 1
display boot.msg
timeout 100
label linux
  kernel vmlinuz
  append $INITRDARG root=$rootdev console=tty0 console=ttyS0,9600n8
EOF

Created boot floppies will now use the serial console.

By far the best alternative would be the addition of parameters to mkbootdisk to allow the kernel parameters and serial port, speed and flow control to be given when the boot floppy is created. For this enhancement request see Red Hat Bugzilla entry 59351.