安装 RedHat Linux AS4.0 后花屏的解决方法

简介:

在虚拟机上安装 RedHat Linux AS4.0 后,由于视频配置时选择颜色深度太高,把 16 位色配置为 24 位色,导致打开图形界面时出现花屏,屏幕宽度非常大,严重变形,不能操作。

    既然是显卡配置部分出现问题,就必须修改该部分的配置信息。在这种情况下,这些应该进入单用户模式下完成:

    首先重新启动机器,在出现 grub 后,按字母“e”,然后会出现 grub 的配置文件,再按键盘移动光标到第二行“Kernal……”,再按“e”,然后在编辑界面输入 single,回车。然后按“b”重启,就进入了“单用户模式”。
    进入后在提示符 # 后敲入:vi /etc/X11/xorg.conf,然后会打开这个视频配置文件,再输入“/Screen”(注意S是大写)检索到 Screen 部分,会显示相关的配置的地方。

    然后您按“i”键进入Vi编辑器的插入模式,把光标移动到“24”的位置,把这里的 24 改为 16,然后按 ESC 键返回命令模式,按冒号“:”,输入 wq,回车,保存、退出。键入 reboot 命令,回车,重新启动,图形界面就出来了!

    以下是一个正确的 xorg.conf 文件的内容:

    # 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 the
    # 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 of
    # 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 customise the XKB settings to suit your keyboard, modify the
    # 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 with:
    # 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    “800×600″ “640×480″
     EndSubSection
     SubSection “Display”
      Viewport   0 0
      Depth    16
      Modes    “800×600″ “640×480″
     EndSubSection
    EndSection

    Section “DRI”
     Group        0
     Mode         0666
    EndSection

    注意以上的 Section “Screen”……EndSection 部分,正是我们需要关心的地方。在实际中笔者发现,DefaultDepth  16 莫名其妙的变为了 DefaultDepth  16161616161616161616。SubSection “Display” 部分的两个 16 都变为了 24,需要全部变回来。这里表明是有 2 个显示器的情况。

    笔者对照 Redhat Linux 9.0 的情况,发现视频配置文件不是 /etc/X11/xorg.conf,而是 /etc/X11/XF86Config(注意文件名的大小写),这个大家必须注意。XF86Config 的 Section “Screen”……EndSection部分也不同,如下所示,应该和机器的硬件配置有关系:

    Section “Screen”
     Identifier “Screen0″
     Device     “Videocard0″
     Monitor    “Monitor0″
     DefaultDepth     16
     SubSection “Display”
      Depth     16
      Modes    “800×600″ “640×480″
     EndSubSection
    EndSection

    *RedHat Linux AS4.0 即:RedHat Linux Enterprise Advanced Server 4.0 版。











本文转自网眼51CTO博客,原文链接:http://blog.51cto.com/itwatch/286436,如需转载请自行联系原作者

相关文章
|
6天前
|
存储 IDE Linux
零基础保姆级教程!手把手教你免费玩转Linux CentOS安装+学习环境搭建(附避坑指南)
本文详细介绍了在VMware虚拟机中安装CentOS 6.8的全过程。首先,需确保已安装VMware并开启V-CPU虚拟化功能,可通过BIOS设置或使用LeoMoon CPU-V工具检测。接着,下载CentOS镜像文件,并在VMware中新建虚拟机,配置CPU、内存、硬盘等参数。最后,加载ISO镜像启动虚拟机,按照提示完成CentOS的安装,包括语言、键盘、存储方式、地区、密码设置及硬盘分区等步骤。安装完成后,以root用户登录即可进入系统桌面,开始学习Linux命令和操作。
51 12
零基础保姆级教程!手把手教你免费玩转Linux CentOS安装+学习环境搭建(附避坑指南)
|
23天前
|
Linux 数据库
Red Hat Enterprise Linux(RHEL)
Red Hat(红帽)是一家美国的软件公司,专注于开发开源软件产品。公司成立于1993年,总部位于美国北卡罗来纳州的罗利市。目前,Red Hat已成为全球最大的开源解决方案提供商和商业Linux主要供应商。 Red Hat由Bob Young和Marc Ewing共同创立。Marc Ewing最初创建了自己的Linux发行版,并将其命名为红帽Linux。1995年,Bob Young收购了Marc Ewing的企业,两者合并成为红帽软件公司。此后,红帽Linux逐渐发展成为一款备受欢迎的Linux发行版。 特点
41 10
Red Hat Enterprise Linux(RHEL)
|
19天前
|
缓存 Ubuntu Linux
Linux中yum、rpm、apt-get、wget的区别,yum、rpm、apt-get常用命令,CentOS、Ubuntu中安装wget
通过本文,我们详细了解了 `yum`、`rpm`、`apt-get`和 `wget`的区别、常用命令以及在CentOS和Ubuntu中安装 `wget`的方法。`yum`和 `apt-get`是高层次的包管理器,分别用于RPM系和Debian系发行版,能够自动解决依赖问题;而 `rpm`是低层次的包管理工具,适合处理单个包;`wget`则是一个功能强大的下载工具,适用于各种下载任务。在实际使用中,根据系统类型和任务需求选择合适的工具,可以大大提高工作效率和系统管理的便利性。
107 25
|
1月前
|
Ubuntu Java Linux
Linux 安装 Qualcomm ® SnapdragonTM Profiler
通过本文的详细介绍,您应该已经成功在 Linux 系统上安装并配置了 Qualcomm® Snapdragon™ Profiler,并能够连接 Android 设备进行性能分析。Snapdragon Profiler 提供了丰富的工具和功能,可以帮助开发者深入了解应用程序的性能瓶颈,从而进行优化。希望本文能对您有所帮助,让您在开发过程中更高效地使用 Snapdragon Profiler 进行性能分析和优化。
78 10
|
1月前
|
Linux
Linux安装svn并启动
Linux安装svn并启动
60 10
|
2月前
|
弹性计算 运维 Ubuntu
os-copilot在Alibaba Cloud Linux镜像下的安装与功能测试
我顺利使用了OS Copilot的 -t -f 功能,我的疑惑是在换行的时候就直接进行提问了,每次只能写一个问题,没法连续换行更有逻辑的输入问题。 我认为 -t 管道 功能有用 ,能解决环境问题的连续性操作。 我认为 -f 管道 功能有用 ,可以单独创建可连续性提问的task问题。 我认为 | 对文件直接理解在新的服务器理解有很大的帮助。 此外,我还有建议 可以在非 co 的环境下也能进行连续性的提问。
87 7
|
9月前
|
NoSQL Java Linux
linux 安装 neo4j简介
Neo4j是高性能NoSQL图形数据库,利用图结构存储数据。推荐使用JDK 11配合Neo4j 3.x版本。下载3.5.9版,通过`curl`命令在Linux上获取tar.gz文件,然后解压。配置`neo4j.conf`,调整内存设置,开启远程访问。执行`./bin/neo4j start`启动,通过`http://服务器IP:7474`访问,默认凭据是username: neo4j, password: neo4j,登录后应更改密码。
688 1
|
存储 缓存 Ubuntu
【嵌入式开发】 Linux Kernel 下载 配置 编译 安装 及 驱动简介(二)
【嵌入式开发】 Linux Kernel 下载 配置 编译 安装 及 驱动简介(二)
260 0
|
Ubuntu 安全 Unix
【嵌入式开发】 Linux Kernel 下载 配置 编译 安装 及 驱动简介(一)
【嵌入式开发】 Linux Kernel 下载 配置 编译 安装 及 驱动简介(一)
296 0