Have you ever run the Red Hat Linux graphical installer only to find that X won't start when the install is complete? How did X run during the graphical install and fail later?


The Anaconda installer detects the hardware during the installation and writes a temporary XF86Config file which it uses to provide the install GUI. You can find this temporary file during the second stage of the install and copy it to a place that you can find it when the installer completes. Then just move that copy to the final destination and X will run with the same parameters as it did during the install process.

A tale of two roots: During the installation, the new file system is mounted under /mnt/sysimage while its being built. This means that the typical root partition "/" is at /mnt/sysimage/, and the typical "/etc" is at /mnt/sysimage/etc. The installer has its own file system and the root "/" is just /. The temporary X config file can be found at /tmp/XF86Config.tmp, and you'll need to copy this to /mnt/sysimage/tmp/ to be found later. When the installer completes and you reboot, you'll find that the file system is mounted at the top as normal rather than under /mnt/sysimage.


What's behind the GUI curtain? Typically, X runs in virtual console 7, and you'll want to know that even during an X Window session you can still access other virtual consoles in order to access a commandline. While the graphical installation is in the second stage of installing all the packages, hit [CTRL]-[ALT]-[F2] to bring up virtual console 2. The GUI will disappear and the screen will go to a black and white console, and here you'll have a command line available while the graphical install continues to run in the other virtual console. Use this virtual console to find and copy the XF86Config.tmp file to /mnt/sysimage/tmp. When this is done change back to virtual console 7 with [ALT]-[F7] to get the GUI back. Note that if you're in X and want to get to a virtual console you need to also use the [CTRL] key in addition to [ALT]-[Fn], but if already in a lower virtual console you don't need to use the CTRL.


Now, assuming that you've configured the system to start in run level 3 which does not automatically start X, you can log in to the console and copy the file from /tmp/XF86Config.tmp to /usr/X11R6/lib/X11/XF86Config. Note that /etc/X11/XF86Config is a soft link to /usr/X11R6/lib/X11/XF86Config. While still in run level 3 you can issue the command "startx" to enter runlevel 5 which starts X. You can also edit /etc/inittab to change your default runlevel to level 5 so that a GUI greets you with a login challenge rather than a commandline as you find in runlevel 3.


At this point you are running X with settings as was automatically detected during the install. If you're comfortable at the structure of XF86Config then you can edit the sections as you wish, or you can run redhat-config-xfree86 which brings up a blue/red ncurses type gui to configure X from there. You can try different color depths or screen resolutions, but you'll probably want to leave the video card and monitor settings alone.