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

相关文章
|
9天前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
8天前
|
Ubuntu Linux Shell
Linux系统命令 安装和文件相关命令
本文档详细介绍了Linux系统中的常用命令,包括软件安装卸载命令如`dpkg`和`apt-get`,压缩与解压命令如`gzip`、`bzip2`和`xz`,以及`tar`命令用于打包和解包。此外还介绍了文件分割命令`split`,文件操作命令如`cat`、`head`、`tail`、`more`、`less`等,管道命令和`wc`、`grep`、`find`、`cut`、`sort`、`uniq`、`diff`等实用工具。最后,文档还讲解了文件属性相关的命令如`chmod`、`chown`、`chgrp`以及创建硬链接和软链接的`ln`命令。
|
14天前
|
Linux TensorFlow 算法框架/工具
在Linux上安装其他版本的cmake 或 升级cmake
在Linux上安装其他版本的cmake 或 升级cmake
23 2
|
14天前
|
人工智能 Linux 开发工具
Linux安装Taiyi stable-diffusion-webui
Linux安装Taiyi stable-diffusion-webui
|
15天前
|
Ubuntu Linux 虚拟化
安装Windows Linux 子系统的方法:适用于windows 11 版本
本文提供了在Windows 11系统上安装Linux子系统(WSL)的详细步骤,包括启用子系统和虚拟化功能、从Microsoft Store安装Linux发行版、设置WSL默认版本、安装WSL2补丁,以及完成Ubuntu的首次安装设置。
51 2
|
4月前
|
安全 Linux 网络安全
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
如何在 VM 虚拟机中安装 Red Hat Enterprise Linux 9.3 操作系统保姆级教程(附链接)
|
11月前
|
存储 关系型数据库 MySQL
Red Hat 安装MySQL 8.0与 Navicat
Red Hat 安装 MySQL 8.0 1、更新软件包列表 在添加 MySQL 存储库后,运行以下命令以更新软件包列表: sudo yum update 2、安装MySQL服务器和客户端 执行以下命令安装MySQL 8.0服务器和客户端软件包: sudo yum install -y mysql-server 3、启动MySQL服务 安装完成后,MySQL 服务器应该已经自动启动。如果没有启动,您可以运行以下命令手动启动服务: sudo systemctl start mysqld 启用 MySQL 服务的开机启动,可以运行以下命令: sudo systemctl enable mysqld
130 1
|
4月前
|
Linux Docker 容器
Red Hat系列Docker安装与移除
Docker 安装 添加 Docker 官方 YUM 源 sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo 安装 Docker Engine sudo yum install -y docker-ce docker-ce-cli containerd.io 启动 Docker 服务并设置开机自启 sudo systemctl start docker sudo systemctl enable docker 验证 Docker 安装 docker --versio
167 0
|
11月前
|
存储 Java Linux
Red Hat 安装JDK与IntelliJ IDEA
YUM是基于Red Hat的Linux发行版的一个强大而用户友好的包管理工具。轻松地管理软件包,无需手动配置环境变量,也不必担心解决依赖关系。它从远程存储库获取软件包,并处理安装过程,使其非常方便。YUM在维护系统稳定性和正常运行方面扮演着关键角色,通过有效地管理软件包更新和依赖关系。
109 5
|
11月前
|
网络协议 关系型数据库 MySQL
Red Hat enterprise linux 5 -mysql安装步骤
Red Hat enterprise linux 5 -mysql安装步骤