AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 516898
Accepted
Ben
Ben
Asked: 2019-05-03 22:44:06 +0800 CST2019-05-03 22:44:06 +0800 CST 2019-05-03 22:44:06 +0800 CST

无法在 virtualbox 中启动 X

  • 772

我已经开始创建自己的 archiso,因为安装 arch 很有趣,但自动化它更有趣 ;-)。

在我的计算机上实际使用它进行全新安装之前,我正在虚拟机上对其进行测试。

这显然是一项正在进行的工作,但可以在这里找到源文件:https ://gitlab.com/neopium/archlinux

这不应该是通用的,它只应该在我的电脑上工作。例如,我希望我的系统使用 GB 英语,但我使用的是 azerty 法语键盘,这是硬编码的,因为它可能不会在我的设置中改变。

所以,我主要有两个我定制的脚本。

第一个是https://gitlab.com/neopium/archlinux/blob/master/archlive/airootfs/root/customize_airootfs.sh。

它用于创建 ISO 本身。没有什么花哨的,真的。

第二个更有趣:它是我正在执行的脚本,用于在运行实时 ISO 时自动安装我的最小设置:https ://gitlab.com/neopium/archlinux/blob/master/archlive/airootfs/root/install -arch.sh

同样,这是一项正在进行的工作。有些东西仍然是硬编码的。例如,它假定分区已经创建,/boot 在 /dev/sda1 上,/ 在 /dev/sda2 上。

如果你想使用这个脚本要小心,它会格式化 /dev/sda1 和 /dev/sda2 分区!

我检索主机名、用户名和密码,格式化磁盘,安装一些基本包(列表尚未确定),安装 grub,设置语言环境和时区,创建用户并将其添加到 sudoers,最后激活互联网.

这是安装软件包的命令:

pacstrap -i /mnt base base-devel git curl wget openssh zsh zsh-completions networkmanager btrfs-progs ntfs-3g grub \
    os-prober xorg xorg-xinit xorg-apps xf86-video-fbdev mesa bspwm sxhkd xf86-video-intel xf86-input-synaptics nvidia \
    nvidia-utils lib32-nvidia-utils kitty rofi neovim alsa-utils pulseaudio dunst

我还有第三个脚本,它安装仅与虚拟盒相关的软件包:https ://gitlab.com/neopium/archlinux/blob/master/archlive/airootfs/root/additional-virtualbox.sh

arch-chroot /mnt pacman -S virtualbox-guest-modules-arch
arch-chroot /mnt pacman -S virtualbox-guest-utils

然后我重新启动我的 virtualbox,使用我的用户帐户登录。但是当我输入 startx 时,它不起作用。

这是 Xorg.0.log 文件:https ://pastebin.com/raw/4RmxbDN8

我想我错过了安装/配置 xorg 的一步,但我不知道是哪一步。

我有两条错误消息:

(EE) Failed to load module "vboxvideo" (module does not exist, 0)
(EE) modeset(0): glamor initialization failed

仅供参考,我已经在archlinux 论坛上交叉发布了这个问题,但是在考虑之后,我的问题可能不是特定于 arch 的问题,而更多的是与 virtual box / xorg 相关。如有必要,我将更新这两个帖子。

编辑:

我意识到我的 virtualbox 添加配置不正确,所以在主机上,我运行:

sudo systemctl enable vboxservice.service
sudo systemctl restart vboxservice.service

执行lsmod给出:

Module                  Size  Used by
vboxsf                 40960  0
intel_powerclamp       20480  0
vboxvideo              40960  1
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
ttm                   114688  1 vboxvideo
ghash_clmulni_intel    16384  0
aesni_intel           372736  0
drm_kms_helper        208896  1 vboxvideo
aes_x86_64             20480  1 aesni_intel
snd_intel8x0           49152  0
crypto_simd            16384  1 aesni_intel
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
glue_helper            16384  1 aesni_intel
drm                   499712  4 drm_kms_helper,vboxvideo,ttm
snd_ac97_codec        151552  1 snd_intel8x0
ac97_bus               16384  1 snd_ac97_codec
intel_rapl_perf        16384  0
snd_pcm               135168  2 snd_intel8x0,snd_ac97_codec
psmouse               172032  0
joydev                 28672  0
mousedev               24576  0
pcspkr                 16384  0
input_leds             16384  0
snd_timer              40960  1 snd_pcm
snd                   102400  4 snd_intel8x0,snd_timer,snd_ac97_codec,snd_pcm
intel_agp              24576  0
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
evdev                  24576  3
intel_gtt              24576  1 intel_agp
ac                     16384  0
mac_hid                16384  0
agpgart                53248  4 intel_agp,intel_gtt,ttm,drm
sysimgblt              16384  1 drm_kms_helper
soundcore              16384  1 snd
fb_sys_fops            16384  1 drm_kms_helper
vboxguest              45056  2 vboxsf
i2c_piix4              28672  0
ip_tables              32768  0
x_tables               49152  1 ip_tables
ext4                  749568  1
hid_generic            16384  0
crc32c_generic         16384  0
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  131072  1 ext4

同样在 xorg 方面,我在 /etc/X11 中没有 xorg.conf 文件。所以我创建了一个:

Xorg :1 -configure

X 仍然没有启动,但错误不一样:https ://pastebin.com/raw/e8FwRbVf

vbox% grep "(EE)" .local/share/xorg/Xorg.0.log 
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    41.117] (EE) modeset(0): glamor initialization failed


vbox% grep "(WW)" .local/share/xorg/Xorg.0.log 
[    40.566] (WW) Failed to open protocol names file lib/xorg/protocol.txt
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    40.591] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/misc".
[    40.591] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[    40.591] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    40.591] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    40.594] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/misc".
[    40.594] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[    40.594] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[    40.594] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    40.594] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[    40.594] (WW) Disabling Mouse0
[    40.594] (WW) Disabling Keyboard0
[    40.601] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    40.629] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
arch-linux xorg
  • 1 1 个回答
  • 2055 Views

1 个回答

  • Voted
  1. Best Answer
    Ben
    2019-05-04T02:17:18+08:002019-05-04T02:17:18+08:00

    我的错。

    实际上,X 有效。

    问题是:这无关紧要。所以它什么也不做并关闭。

    我安装了 lightdm,现在我按预期看到了登录屏幕。当我登录时,WM 启动。

    • 2

相关问题

  • archlinux efi netboot 内核“ip”不起作用?systemd "启动 Switch Root 失败。"

  • 如何在 Arch Linux 上设置音频,支持多个程序同时发出音频而不创建 asoundrc?

  • 为什么有时需要手动导入密钥?

  • 在启动时加载设备

  • base 和 evdev xkb 规则有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve