[CentOS] Rid me of this boot GUI

Wed Apr 20 13:40:27 UTC 2005
Aleksandar Milivojevic <amilivojevic at pbl.ca>

Alexander Dalloz wrote:
> Am Mi, den 20.04.2005 schrieb John Hinton um 0:27:
>>One of these days, RedHat might actually run me off!!!! AAAARGH!!!!
>>Can anyone tell me how to get CentOS 4 to simply boot to the console in 
>>text mode? If I wanted a stinkin' GUI I would have installed winders! 
>>John Hinton
> Remove "rhgb" from kernel boot parameter line in grub.conf.

If using kickstart to install, and grub to boot, add something like this 
to %postinst to avoid frustration in the future.

There are some long lines that might be wrapped around by my mail 
reader, or your mail reader, so use a bit of common sense on what should 
be single line ;-)

#! /bin/sh

if [ -f /boot/grub/grub.conf ]
    cp /boot/grub/grub.conf /boot/grub/grub.conf.dist
    sed -r 
< grub.conf.dist > grub.conf

if [ -f /etc/lilo.conf ]
    cp /etc/lilo.conf /etc/lilo.conf.dist
    sed -r -e 
's/^([[:space:]]*append[[:space:]]*=[[:space:]]*"?.*)rhgb/\1/' -e 
's/"[[:space:]]*/"/' -e 's/[[:space:]]*"/"/' < /etc/lilo.conf.dist > 
    # does this file exist prior to posinst script? it should. should it?
    if grep -q '^bootloader.*useLilo' /root/anaconda-ks.cfg

if grep -q '^id:5:initdefault:' /etc/inittab
    cp /etc/inittab /etc/inittab.dist
    sed 's/^id:5:initdefault:/id:3:initdefault:/' < /etc/inittab.dist > 

Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7