From: Anthony PERARD Date: Sat, 2 Mar 2024 15:08:15 +0000 (+0000) Subject: ts-debian-hvm-install: Allow udev failure in install media X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2775abe6035e1632844f0b57bb2275307861b7ba;p=osstest.git ts-debian-hvm-install: Allow udev failure in install media Kernel in "debian-12.1.0-amd64-netinst.iso" prevent debian installer from booting. Early on, it does `udevadm trigger --action=add`, which fails, the same way as the following runes fails: $ cat /sys/devices/virtual/input/input2/name Xen Virtual Keyboard $ echo add > /sys/devices/virtual/input/input2/uevent [ 25.884403] synth uevent: /devices/virtual/input/input2: failed to send uevent [ 25.916498] input input2: uevent: failed to send synthetic uevent: -12 sh: write error: Cannot allocate memory $ uname -a Linux (none) 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-1 (2023-07-14) x86_64 GNU/Linux This doesn't looks like a new issue, Debian Buster ISO seems to do the same thing (early boot command, and error in Linux logs), so it's probable that now `udevadm trigger --action=add` return an error when there's a failure. Bug report in the kernel and in Debian: https://bugzilla.kernel.org/show_bug.cgi?id=207695 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983357 One way to workaround the issue is to remove the vkb device, with xl's "vkb_device=0", but libvirt doesn't have support for this config option. The second option is to edit the installation media, and allow the failure. Once installed, the guest boot fine. Signed-off-by: Anthony PERARD Acked-by: Roger Pau Monné --- diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install index 4deb443..44eb3ab 100755 --- a/ts-debian-hvm-install +++ b/ts-debian-hvm-install @@ -174,13 +174,14 @@ sub isolinux_cfg () { END } -sub prepare_initrd ($$$) { - my ($initrddir,$newiso,$preseed_file_path) = @_; +sub prepare_initrd ($$$$) { + my ($initrddir,$newiso,$preseed_file_path,$extra_rune) = @_; return <<"END"; rm -rf $initrddir mkdir $initrddir cd $initrddir gzip -d < $newiso$ramdisk | cpio --extract --make-directories --no-absolute-filename + $extra_rune cp $preseed_file_path preseed.cfg find . | cpio -H newc --create | gzip -9 > $newiso$ramdisk cd - @@ -268,7 +269,17 @@ sub prep () { target_putfilecontents_root_stash($ho, 10, preseed(), $preseed_file_path); - $cmds = prepare_initrd($initrddir,$newiso,$preseed_file_path); + my $extra_preseed_rune = ''; + if ($gsuite =~ m/bookworm/) { + # Xen Virtual Keyboard initialisation fails and return ENOMEM + # https://bugzilla.kernel.org/show_bug.cgi?id=207695 + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983357 + $extra_preseed_rune .= <