一段时间以来,我一直试图让无人值守的 linux 安装(在这种情况下为 fedora 28)在 KVM 下工作。我已经解决了大部分问题,但它仍然询问我是否要使用文本模式或启动 VNC。这是一个片段来说明:
(snip)
[ OK ] Listening on Open-iSCSI iscsid Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ OK ] Started Hardware RNG Entropy Gatherer Daemon.
Starting pre-anaconda logging service...
Starting OpenSSH ed25519 Server Key Generation...
Starting OpenSSH ecdsa Server Key Generation...
Starting Login Service...
Starting Hold until boot process finishes up...
Starting OpenSSH rsa Server Key Generation...
[ OK ] Started Hold until boot process finishes up.
[ OK ] Started Terminate Plymouth Boot Screen.
Starting installer, one moment...
anaconda 28.22.10-1.fc28 for Fedora 28 started.
* installation log files are stored in /tmp during the installation
* shell is available on TTY2
* when reporting a bug add logs from /tmp as separate text/plain attachments
15:12:21 X startup failed, falling back to text mode
15:12:21 X startup failed, falling back to text mode
================================================================================
================================================================================
1) Start VNC
2) Use text mode
Please make a selection from the above ['c' to continue, 'q' to quit, 'r' to
refresh]: 2
Starting automated install...
Generating updated storage configuration
Checking storage configuration...
================================================================================
================================================================================
Installation
1) [x] Language settings 2) [x] Time settings
(English (United States)) (America/Denver timezone)
3) [x] Installation source 4) [x] Software selection
(https://mirror.chpc.utah.edu/pu (Custom software selected)
b/fedora/linux/releases/28/Serve
r/x86_64/os/)
5) [x] Installation Destination 6) [x] Network configuration
(Automatic partitioning (Wired (ens3) connected)
selected)
================================================================================
================================================================================
Progress
.
Setting up the installation environment
.
Configuring storage
..
Creating disklabel on /dev/sda
Creating ext4 on /dev/sda1
Creating lvmpv on /dev/sda2
(snip)
我将其用作我的 virt-install 行:
virt-install \
--name fedoratest2 \
--ram 2048 \
--disk path=/vm-images/fedoratest2.qcow2,size=15 \
--vcpus 2 \
--network bridge=br0 \
--mac=<insert unicast mac here> \
--graphics none \
--location https://mirror.chpc.utah.edu/pub/fedora/linux/releases/28/Server/x86_64/os/ \
--os-type linux \
--extra-args "console=ttyS0 inst.ks=http://http.mydomain.com/kickstart_fedora_testing.cfg hostname=fedoratest2.mydomain.com"
(mydomain.com 当然不是我的真实域名)
以及以下内容的启动:
#ptform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --plaintext thisisnotmyrootpassword
# user is needed for fedora? --disabled isn't an option
user --name="joe" --password="thisisnotmyuserpassword"
# System language
lang en_US
# System timezone
timezone America/Denver
# Use graphical install
graphical
# System authorization information
auth --useshadow --passalgo=sha512
# Firewall configuration
firewall --disabled
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all
# Disk partitioning information
autopart --type lvm
# these are what were produced in anaconda_ks.cfg after I selected what I wanted during a non-kickstart install
%packages
@^server-product-environment
@headless-management
%end
# this was in default anaconda_ks.cfg file after non-kickstart install, figure I'll keep it just in case
%addon com_redhat_kdump --disable --reserve-mb='128'
%end
让我烦恼的是启动/设置期间出现的行:
15:12:21 X startup failed, falling back to text mode
15:12:21 X startup failed, falling back to text mode
我想知道 - 为什么它甚至试图首先启动 X?我认识到我--extra-args
上面的引导参数没有指定是否应该使用文本模式,据我了解,fedora/anaconda 希望默认为图形安装模式。没关系。我也使用了以下两个参数--extra-args
来尝试强制它进入文本模式而不问我任何东西:
inst.text
inst.cmdline
但这些似乎都没有任何效果。它仍然抱怨,X startup failed
然后问我是否要使用 VNC 或文本模式...
我正在根据官方 f28 安装指南尝试这些设置:https ://docs.fedoraproject.org/en-US/fedora/f28/install-guide/advanced/Boot_Options/
此外,这里的 anaconda 文档:https ://anaconda-installer.readthedocs.io/en/latest/boot-options.html
这console=
意味着inst.txt
......我很困惑。
概括:
无论我尝试指定只安装文本或 cmdline(无图形),安装程序仍会尝试运行图形,惨遭失败,并提示我指定 VNC 或文本模式。我试图找出我做错了什么,或者是否有可能让它在安装过程中不提示我做任何事情,而只是摆脱 kickstart 文件。