After the RedHat Linux as4.0 is installed on the virtual machine, the 16-bit color is set to 24-bit because the color depth is too high during video configuration, which leads to a screen display when the graphic interface is opened, the screen width is very large, severely deformed, and cannot be operated.
You must modify the configuration information of the video card. In this case, these should be completed in single-user mode:
First restart the machine. After grub appears, press the letter "E", then the grub configuration file will appear, and then move the cursor to the second line "kernal…" by pressing the keyboard ......", Then press "E" and enter single on the editing page. Press enter. Then press "B" to restart and enter "single user mode ".
At the prompt #, enter VI/etc/X11/Xorg. conf, then open the video configuration file, and then enter "/screen" (note that S is capitalized) to retrieve the screen part. The related configuration is displayed.
Press the "I" key to enter the insertion mode of the VI Editor, move the cursor to the "24" position, change the 24 here to 16, and then press ESC to return to the command mode, press the colon ":", enter WQ, press enter, save, and exit. Enter the reboot command, press enter, and restart. The graphic interface is displayed!
The following is the content of a correct Xorg. conf file:
# Xfree86 4 configuration created by pyxf86config
Section "serverlayout"
Identifier "Default layout"
Screen 0 "screen0" 0 0
Inputdevice "mouse0" "corepointer"
Inputdevice "keyboard0" "corekeyboard"
Endsection
Section "Files"
# Rgbpath is the location of the RGB database. note, this is the name of
# File minus the extension (like ". txt" or ". DB"). There is normally
# No need to change the default.
# Multiple fontpath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent
# The X server to render fonts.
Rgbpath "/usr/x11r6/lib/X11/RGB"
Fontpath "UNIX/: 7100"
Endsection
Section "module"
Load "DBE"
Load "extmod"
Load "fbdevhw"
Load "Glx"
Load "record"
Load "FreeType"
Load "type1"
Load "dri"
Endsection
Section "inputdevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset (1 ))
# Option "xleds" "1 2 3"
# To disable the xkeyboard extension, uncomment xkbdisable.
# Option "xkbdisable"
# To mmise the XKB settings to suit your keyboard, modify
# Lines below (which are the defaults). For example, for a non-U.S.
# Keyboard, you will probably want to use:
# Option "xkbmodel" "pc102"
# If you have a US Microsoft natural keyboard, you can use:
# Option "xkbmodel" "Microsoft"
#
# Then to change the language, change the layout setting.
# For example, a German layout can be obtained:
# Option "xkblayout" "de"
# Or:
# Option "xkblayout" "de"
# Option "xkbvariant" "nodeadkeys"
#
# If you 'd like to switch the positions of your capslock and
# Control keys, use:
# Option "xkboptions" "Ctrl: swapcaps"
# Or if you just want both to be control, use:
# Option "xkboptions" "Ctrl: nocaps"
#
Identifier "keyboard0"
Driver "KBD"
Option "xkbmodel" "pc105"
Option "xkblayout" "us"
Endsection
Section "inputdevice"
Identifier "mouse0"
Driver "Mouse"
Option "protocol" "imps/2"
Option "device" "/dev/input/mice"
Option "zaxismapping" "4 5"
Option "emulate3buttons" "yes"
Endsection
Section "Monitor"
Identifier "monitor0"
Vendorname "monitor vendor"
Modelname "unknown monitor"
Horizsync 31.5-37.9
Vertrefresh 50.0-70.0
Option "dpms"
Endsection
Section "device"
Identifier "videocard0"
Driver "S3"
Vendorname "videocard vendor"
Boardname "S3 trio64 (generic )"
Endsection
Section "screen"
Identifier "screen0"
Device "videocard0"
Monitor "monitor0"
Defaultdepth 16
Subsection "display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
Endsubsection
Subsection "display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
Endsubsection
Endsection
Section "dri"
Group 0
Mode 0666
Endsection
Note that the preceding section "screen "...... The endsection is exactly what we need to care about. In practice, I found that ultdepth 16 was inexplicably changed to defaultdepth 16161616161616161616. In the subsection "display" section, both 16 are changed to 24, and all need to be changed back. It indicates that there are two monitors.
Based on Redhat Linux 9.0, I found that the video configuration file is not/etc/X11/Xorg. conf, but/etc/X11/xf86config (note the case sensitivity of the file name. Section "screen"…… of xf86config "...... The endsection Section is also different. As shown below, it should be related to the hardware configuration of the machine:
Section "screen"
Identifier "screen0"
Device "videocard0"
Monitor "monitor0"
Defaultdepth 16
Subsection "display"
Depth 16
Modes "800x600" "640x480"
Endsubsection
Endsection
* RedHat Linux as4.0: RedHat Linux Enterprise Advanced Server 4.0.
This article from "100,000 why" Computer Learning Network http://www.why100000.com
Author: Zhang Qing (mesh)