安装 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,如需转载请自行联系原作者

相关文章
|
Ubuntu Linux
任何Ubuntu用户都应安装的四大Linux应用程序
当然,这款程序不需要太多介绍。我们面对的是网上最庞大最完整的多媒体中心,由于丰富的插件,我们能够高度细化地定制其每一项功能。这是我们的Linux发行版不可或缺的必备软件。 我们可以通过运行以下命令来轻松安装Kodi:sudo apt install kodi。
|
Ubuntu Linux
计算机基础知识:linux系统怎么安装?
在虚拟机软件中创建一个新的虚拟机,并选择相应操作系统类型和硬盘空间大小等参数。将下载的 ISO 镜像文件加载到虚拟机中。启动虚拟机,进入安装界面,并按照步骤进行安装。安装完成后,可以在虚拟机中使用 Linux 系统。
|
Ubuntu 物联网 Linux
从零安装一个Linux操作系统几种方法,以Ubuntu18.04为例
一切就绪后,我们就可以安装操作系统了。当系统通过优盘引导起来之后,我们就可以看到跟虚拟机中一样的安装向导了。之后,大家按照虚拟机中的顺序安装即可。 好了,今天主要介绍了Ubuntu Server版操作系统的安装过程,关于如何使用该操作系统,及操作系统更深层的原理,还请关注本号及相关圈子。
|
Ubuntu Linux 网络安全
Linux服务器之Ubuntu的安装与配置
Ubuntu Desktop是目前最成功、最流行的图形界面的Linux发行版;而Ubuntu Server也在服务器端市场占据了较大的份额。今天为大家详细介绍了Ubuntu Server的安装与配置,希望对你能有所帮助。关于VMware、VirtualBox等虚拟化软件的使用,朱哥还会在后续的文章中为大家详细介绍,敬请关注!
|
Linux 网络安全 Apache
针对在Centos/Linux安装Apache过程中出现的常见问题集锦
以上每个问题的解决方案应深入分析错误日志、系统消息和各种配置文件,以找到根本原因并加以解决。务必保持系统和Apache软件包更新到最新版本,以修复已知的bugs和安全漏洞。安装和管理Web服务器是一项需要细致关注和不断学习的任务。随着技术的发展,推荐定期查看官方文档和社区论坛,以保持知识的更新。
603 80
|
安全 Linux iOS开发
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
1049 6
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
682 5
|
Ubuntu 安全 Linux
Linux Docker & Docker Compose 一键安装
该脚本由轩辕镜像官方维护,支持多种Linux发行版,可一键安装Docker与docker-compose,并自动配置镜像加速源。脚本开源、安全、高效,适用于Ubuntu、CentOS等系统,内置国内镜像源,提升下载速度,同时提供一键回滚功能,保障安装稳定性。
5090 1
|
消息中间件 Kafka Linux
Linux下安装Kafka 3.9.1
本文介绍Kafka 3.9.1版本的安装与配置,包括通过ZooKeeper或KRaft模式启动Kafka。涵盖环境变量设置、日志路径修改、集群UUID生成、存储格式化及服务启停操作,适用于Linux环境下的部署实践。
1610 0
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。