Mailing List Archive

Gentoo - Failed to boot with Xen
Hi, I am Fulgurance, and I use actually daily Gentoo. Recently I choose to
reinstall all of my system for a 64 bits only system with the Xen
hypervisor.

I have first one question. If I am running host in full 64 bits only, can I
run for example Windows with some 32 bits applications ?

I tried to install everything properly and follow as possible the gentoo
wiki, but when I try to boot gentoo with xen, it doesn't work, I have the
error:

VFS: Cannot open root device

*I will give you all of my settings:*

*My emerge info:*

zohran@alienware-m17-r3 ~ $ emerge --info
Portage 3.0.47 (python 3.11.3-final-0,
default/linux/amd64/17.1/no-multilib/hardened/selinux, gcc-13,
glibc-2.37-r2, 6.3.1-gentoo x86_64)
=================================================================
System uname: Linux-6.3.1-gentoo-x86_64-Intel-R-_Core-TM-_i9-10980HK_CPU_@_2.40GHz-with-glibc2.37
KiB Mem: 32469436 total, 28462716 free
KiB Swap: 50331644 total, 50331644 free
Timestamp of repository gentoo: Tue, 09 May 2023 08:30:01 +0000
Head commit of repository gentoo: ed1f36b65db2f31193609d8c6809bbe9428de5ab
sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.39 p6) 2.39.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p15-r2::gentoo
dev-lang/perl: 5.36.1-r1::gentoo
dev-lang/python: 3.11.3::gentoo
dev-lang/rust: 1.69.0-r1::gentoo
dev-util/cmake: 3.26.3::gentoo
dev-util/meson: 1.1.0::gentoo
sec-policy/selinux-base: 2.20221101-r4::gentoo
sys-apps/baselayout: 2.13-r1::gentoo
sys-apps/openrc: 0.47.1::gentoo
sys-apps/sandbox: 2.30-r1::gentoo
sys-devel/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake: 1.16.5-r1::gentoo
sys-devel/binutils: 2.39-r5::gentoo, 2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 15.0.7-r1::gentoo, 16.0.3::gentoo
sys-devel/gcc: 12.2.1_p20230428-r1::gentoo, 13.1.0-r1::gentoo
sys-devel/gcc-config: 2.10::gentoo
sys-devel/libtool: 2.4.7-r1::gentoo
sys-devel/lld: 15.0.7::gentoo
sys-devel/llvm: 15.0.7::gentoo, 16.0.3::gentoo
sys-devel/make: 4.4.1::gentoo
sys-kernel/linux-headers: 6.3::gentoo (virtual/os-headers)
sys-libs/glibc: 2.37-r2::gentoo
sys-libs/libselinux: 3.5::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 24
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O2 -pipe -mmovbe -mmmx -msse -msse2 -msse3
-mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2 -maes -mpclmul
-mfsgsbase -mrdrnd -mfma -mbmi -mbmi2 -mrdseed -madx -mprefetchwt1
-mclflushopt -mxsavec -mxsaves"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
/etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=skylake -O2 -pipe -mmovbe -mmmx -msse -msse2 -msse3
-mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2 -maes -mpclmul
-mfsgsbase -mrdrnd -mfma -mbmi -mbmi2 -mrdseed -madx -mprefetchwt1
-mclflushopt -mxsavec -mxsaves"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY
GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX
PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME
XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=skylake -O2 -pipe -mmovbe -mmmx -msse -msse2 -msse3
-mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2 -maes -mpclmul
-mfsgsbase -mrdrnd -mfma -mbmi -mbmi2 -mrdseed -madx -mprefetchwt1
-mclflushopt -mxsavec -mxsaves"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
binpkg-multi-instance buildpkg-live candy config-protect-if-modified
distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync
multilib-strict network-sandbox news parallel-fetch preserve-libs
protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox
sfperms strict unknown-features-warn unmerge-logs unmerge-orphans
userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake -O2 -pipe -mmovbe -mmmx -msse -msse2 -msse3
-mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx -mavx2 -maes -mpclmul
-mfsgsbase -mrdrnd -mfma -mbmi -mbmi2 -mrdseed -madx -mprefetchwt1
-mclflushopt -mxsavec -mxsaves"
GENTOO_MIRRORS="ftp://mirror.bytemark.co.uk/gentoo/
https://mirror.bytemark.co.uk/gentoo/
http://mirror.bytemark.co.uk/gentoo/
rsync://mirror.bytemark.co.uk/gentoo/
ftp://mirrors.gethosted.online/gentoo
https://mirrors.gethosted.online/gentoo
http://mirrors.gethosted.online/gentoo
https://www.mirrorservice.org/sites/distfiles.gentoo.org/
http://www.mirrorservice.org/sites/distfiles.gentoo.org/
ftp://ftp.mirrorservice.org/sites/distfiles.gentoo.org/
rsync://rsync.mirrorservice.org/distfiles.gentoo.org/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--omit-dir-times --compress --force --whole-file --delete --stats
--human-readable --timeout=180 --exclude=/distfiles --exclude=/local
--exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X aac acl acpi alsa amd64 audit bluetooth btrfs bzip2 caps cet
cli compat crypt cryptsetup custom-cflags custom-optimization dbus
device-mapper dhcpcd dri dri3 elogind experimental ffmpeg fortran gdbm
git glamor gstreamer hardened iconv ipv6 jpeg jumbo-build kde libglvnd
libtirpc lm-sensors lto lvm mp3 mp4 mtp ncurses networkmanager
nftables nls nptl nvenc ogg open_perms opengl openmp pam pcre
peer_perms phonon pie plasma png policykit pulseaudio readline seccomp
selinux split-usr ssl ssp svg test-rust tiff ubac udev udisks
unconfined unicode uvm v4l vorbis vulkan wayland wifi wireless x264
x265 xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2021"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions
alias auth_basic authn_alias authn_anon authn_dbm authn_default
authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock
deflate dir disk_cache env expires ext_filter file_cache filter
headers include info log_config logio mem_cache mime mime_magic
negotiation rewrite setenvif speling status unique_id userdir
usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand
sse sse2 sse3 ssse3 sse4_1 sse4_2" ELIBC="glibc"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt
gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver
oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing
tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 xen xen-pvh"
INPUT_DEVICES="libinput synaptics" KERNEL="linux" L10N="en en-GB"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb
ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console
presenter-minimizer" LLVM_TARGETS="NVPTX" LUA_SINGLE_TARGET="lua5-1"
LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice"
PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13"
PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11"
RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="intel i965 iris
nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options
ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal
rawnat logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL,
CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS,
EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD,
LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP,
PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF,
RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS



*My fstab file:*# <fs> <mountpoint> <type>
<opts> <dump/pass>

/dev/nvme0n1p2 /boot btrfs relatime
0 2
/dev/mapper/System-Root / btrfs relatime
0 1
/dev/mapper/System-Swap none swap sw
0 0
tmpfs /tmp tmpfs
rw,nosuid,noatime,nodev,mode=1777 0 0
tmpfs /var/tmp tmpfs
rw,nosuid,noatime,nodev,mode=1777 0 0
#/dev/sda1 /xen btrfs relative

Just to explain, my laptop have a 500G SSD drive, partitioned in 3:
nvme0n1p1 for /boot/efi, nvme0n1p2 for /boot and nvme0n1p3 encrypted with
inside LVM, itself split in two logical partitions, 48G of Swap and the
left space for root.

Without Xen, my system boot properly (just to let you know)

This is my grub config (I think maybe it's where the problem start, because
I am not sure about my grub config:

GRUB_DISTRIBUTOR="Gentoo"
GRUB_ENABLE_CRYPTODISK=y

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
#GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
GRUB_CMDLINE_LINUX_DEFAULT="dolvm dobtrfs crypt_root=/dev/nvme0n1p3
root=/dev/mapper/System-Root root_trim=yes selinux=0 enforcing=0
quiet"
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M"
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="softlevel=xen dolvm dobtrfs
crypt_root=/dev/nvme0n1p3 root=/dev/mapper/System-Root root_trim=yes
selinux=0 enforcing=0"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
GRUB_GFXMODE=3840x2160

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
GRUB_GFXPAYLOAD_LINUX=keep

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

GRUB_FONT="/boot/grub/fonts/terminus32b.pf2"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
#GRUB_DISABLE_LINUX_UUID=true

# Comment if you don't want GRUB to pass "root=PARTUUID=xxx" parameter to kernel
GRUB_DISABLE_LINUX_PARTUUID=false

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true

# Uncomment to disable generation of the submenu and put all choices on
# the top-level menu.
# Besides the visual affect of no sub menu, this makes navigation of the
# menu easier for a user who can't see the screen.
#GRUB_DISABLE_SUBMENU=y

# Uncomment to play a tone when the main menu is displayed.
# This is useful, for example, to allow users who can't see the screen
# to know when they can make a choice on the menu.
#GRUB_INIT_TUNE="60 800 1"



*My /boot content:*zohran@alienware-m17-r3 ~ $ ls /boot/
config-6.3.1-gentoo initramfs-6.3.1-gentoo.img vmlinuz-6.3.1-gentoo
xen-4.17.gz xenpolicy-4.17.1-pre
efi intel-uc.img xen-4.17.1-pre.config xen-4.gz
grub System.map-6.3.1-gentoo xen-4.17.1-pre.gz xen.gz

Last word, just to let you know, if I am able to boot with Xen properly, I
wish to install all dom in my external SSD /dev/sda (I commented it
actually under my /etc/fstab)

So what is my error in my configuration ?