random technical thoughts from the Nominet technical team

Building a Redhat Enterprise Linux Serial Console boot DVD

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.25 out of 5)
Loading ... Loading ...
Posted by jad on Sep 19th, 2005

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.

9 Responses

  1. Stefan Morrell Says:

    Given:
    “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.”

    Comparison:
    Effort involved in swapping a few disks
    vs
    Effort involved in working out and applying method to convert distro into bootable DVD.

    Conclusion:
    This has nothing to do with legacy hw or walking to the server.
    This is about.. “I’m an intrigued engineer in need of side project stimulus.”
    :)

  2. jad Says:

    True, I am an intrigued engineer in need of side project stimulus. However, there are real reasons for doing this as well.

    1. A lot of new servers come with no floppy drive
    2. If you have a lot of servers then changing CD’s becomes a much bigger issue.
    3. The servers might be remote. having the DVD in the machine help if you ever need to do recovery or a reinstall.

  3. Enrico Scotoni Says:

    nice howto. I face a similar situation. I want to install/upgrade a v20z with centos 5 (RHEL clone bult from RH’s sources). I do console redirection over the SP. Normal booting of the ondisk OS works fine, but I cannot get the isolinux bootloader on a CD to work with this setup (already wasted 5 CD’s).

    When booting I can see the isolinux message quickly and then nothing more happens. No boot prompt nothing.

    My syslinux.cfg (startof):

    serial 0 38400
    console 0

    Do I need something else (more) ? Note everything is setup for 38400 (set console, BIOS, etc) and this works fine with on disk GRUB

    regards
    Enrico

  4. jad Says:

    Hi,
    Glad you found it helpful. It is a long time since I did this but I seem to remember that console redirection through the SP was very flakey. I think I used the regular serial port and connected it to a Cyclades Alterpath to get network access.

    I do remember that it was worth making sure you have the latest firmware for the SP, BIOS etc.

    HTH
    John

  5. Enrico Scotoni Says:

    Hi John

    probably I try another bootloader (such as GRUB, which works fine when booting from disk and needs no “serial settings” at all in it’s config), keeping on wasting CD’s.

    Enrico

  6. Enrico Scotoni Says:

    just wanted to report success using GRUB instead of isolinux. easy and strait forward

  7. Jagi Sarcilla Says:

    this is great, i just build my DVD RHEL-4.5

    Any info on how to build RHEL-5 DVD from CD installer.

  8. jad Says:

    Sorry, I never tried with RHEL 5. I notice that CentOS 5 is available as a DVD iso, so someone somewhere has solved this problem.

  9. Creare un unico dvd dai cd di Red Hat « Weblog di Luca Raciti Says:

    […] Risorse on-line http://www.linuxcompatible.org/How_to_make_your_own_RedHat_8.0_DVD_s14425.html http://blog.nominet.org.uk/tech/2005/09/19/building-a-redhat-enterprise-linux-serial-console-boot-dv… […]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: