CentOS Installation without VGA Console
By Phil on Tuesday, March 16 2010, 15:45 - Linux & Open Source - Permalink
So I've spent the last day and a half, plus around $20 worth of DVD's, trying to get the CentOS Installer to boot and install on a headless machine. Here's the end result...
The machine I'm trying to install to is a custom piece of hardware used by the company I work for. It has NO VGA console, NO keyboard and NO mouse. The only "out of band" access is via an RS232 serial console that the BIOS provides by redirecting the actual console to the serial console. This caused quite a few problems with the graphical nature of the CentOS installer -- even the isolinux boot menu by default has a graphical display.
The system runs the OS from a CF Flash card on the motherboard, with 4 x Hot-swap SATA drives for data storage. To "install" these systems normally, we simply have an image of our standard installation on our desktop PC's and just write the image to the flash using the Linux 'dd' command.
I went through several potential solutions to this problem in order to get CentOS on to this machine:
- Recreate the install ISO to redirect to the console; Fail.
- Recreate the install ISO to automatically load a kickstart file and install itself; Fail.
- Recreate the install ISO to boot the installer in text mode, with a remote VNC terminal; WIN.
I ended up following this article from the CentOS wiki, however I still had to adjust the configurations a bit: http://wiki.centos.org/TipsAndTricks/VncHeadlessInstall
Here is my working isolinux.cfg file:
default linux prompt 1 timeout 50 label linux kernel vmlinuz append initrd=initrd.img nmi_watchdog=0 nofb vnc vncconnect=192.168.1.1 headless ip=dhcp ksdevice=eth0 method=cdrom lang=en_US keymap=us console=tty0 console=ttyS0,115200n8 label text kernel vmlinuz append initrd=initrd.img text nmi_watchdog=0 nofb vnc vncconnect=192.168.1.1 headless ip=dhcp ksdevice=eth0 method=cdrom lang=en_US keymap=us console=tty0 console=ttyS0,115200n8 label ks kernel vmlinuz append ks nmi_watchdog=0 initrd=initrd.img label local localboot 1 label memtest86 kernel memtest append -
UPDATE: This is the console line I had to add to /etc/inittab to get a proper console via the serial port after boot.
vt:12345:respawn:/sbin/agetty ttyS0 115200 vt100
Comments
Nice hack. Just out of curiosity, how much are you paying for DVD's? At ~$.50 a shot, that's like 40 disks!!
Yeah, I went through quite a few... Maybe not quite that much. It was a throwaway value :P
Probably more like only $10, but much more in time waiting for them to burn, lol :P
Thanks for the tutorial.