In this article, we showed how to build a serial port multiplexer that allows up to 16 different servers to be controlled from one serial port. We needed to upgrade our servers to 8.0, and, of course, we wanted to use the serial port to do it rather than lug a monitor and keyboard over. Although the serial port article has some of this material, including additional details about redirecting console output to the serial port, this article will specifically document the process of creating a serial boot disk for Red Hat 8.0. One note about Red Hat 8.0 vs. 7.1: If you install through a serial port, the default install will automatically configure the installation to use the serial port for the console. Even the GRUB bootloader comes up on the serial port.
First, let’s mount the Red Hat 8.0 CD1:
[root@srv-1 u-1]# mount -t iso9660 /dev/cdrom /mnt mount: block device /dev/cdrom is write-protected, mounting read-only |
Now, let’s copy the boot.img file to a temporary directory and mount the file using the loop option:
cp /mnt/images/boot.img /tmp mkdir /tmp/imagemount mount -t vfat -o loop /tmp/boot.img /tmp/imagemount cd /tmp/imagemount [root@srv-1 imagemount]# ls boot.msg initrd.img options.msg rescue.msg splash.lss syslinux.png general.msg ldlinux.sys param.msg snake.msg syslinux.cfg vmlinuz |
Edit syslinux.cfg so that the default is install, then add an entry:
label install kernel vmlinuz append initrd=initrd.img local console=ttyS0 (assuming serial port is ttyS0) |
Also, make the default install, instead of linux. Here is a copy of our modified syslinux.cfg file.
Copy the image off of the Red Hat CD to a floppy:
cat /mnt/images/boot.img > /dev/fd0 |
Copy the edited version of syslinux.cfg to the floppy:
[root@srv-1 imagemount]# ls boot.msg initrd.img options.msg rescue.msg splash.lss syslinux.png general.msg ldlinux.sys param.msg snake.msg syslinux.cfg vmlinuz [root@srv-1 imagemount]# head syslinux.cfg default install 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 [root@srv-1 imagemount]# mcopy syslinux.cfg a: Long file name "syslinux.cfg" already exists. a)utorename A)utorename-all r)ename R)ename-all o)verwrite O)verwrite-all s)kip S)kip-all q)uit (aArRoOsSq): o [root@srv-1 imagemount]# mdir Volume in drive A has no label Volume Serial Number is 3D7E-5686 Directory for A:/ LDLINUX SYS 7112 09-10-2002 16:31 SYSLINUX PNG 7164 09-10-2002 16:31 INITRD IMG 518862 09-10-2002 16:31 VMLINUZ 852324 09-10-2002 16:31 SPLASH LSS 12070 09-10-2002 16:31 BOOT MSG 342 09-10-2002 16:31 GENERAL MSG 957 09-10-2002 16:31 OPTIONS MSG 730 09-10-2002 16:31 PARAM MSG 869 09-10-2002 16:31 |
Unmount the image and the CD-ROM:
cd / umount /mnt umount /tmp/imagemount |
Now, if we remove the floppy, put it in our server and reboot, and monitor our serial port with minicom, we get:
Linux version 2.4.18-14BOOT (bhcompile@daffy.perf.redhat.com) (gcc version 3.2 2 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 00000000000a0000 (usable) BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000008000000 (usable) BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) 128MB LOWMEM available. On node 0 totalpages: 32768 zone(0): 4096 pages. zone(1): 28672 pages. . . Welcome to Red Hat Linux +-------------+ CD Found +--------------+ | | | To begin testing the CD media before | | installation press OK. | | | | Choose Skip to skip the media test | | and start the installation. | | | | +----+ +------+ | | | OK | | Skip | | | +----+ +------+ | | | | | +---------------------------------------+ |