]> git.ipfire.org Git - thirdparty/dracut-ng.git/commit
test(sysroot): run with --no-hostonly-cmdline
authorBenjamin Drung <benjamin.drung@canonical.com>
Mon, 15 Dec 2025 11:24:21 +0000 (12:24 +0100)
committerLaszlo <laszlo.gombos@gmail.com>
Tue, 16 Dec 2025 01:01:22 +0000 (20:01 -0500)
commit8c70c5bf99eaa5d978c7113552460f3965c1b3da
tree36dfa71f4a2d355c35d975e640e8325b079ccc82
parent864c1951e3b520ef7c8b36c3480cf256fdaeb43b
test(sysroot): run with --no-hostonly-cmdline

TEST-13-SYSROOT fails in a Ubuntu VM. This is the `lsblk -f` output in
the VM:

```
 NAME    FSTYPE FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
 fd0
 sr0
 vda
 ├─vda1  ext4   1.0   cloudimg-rootfs 606e50c2-c444-4c6c-86a1-a6e16ff87015     19G    12% /
 ├─vda13 ext4   1.0   BOOT            30a0e670-dd1c-4d4f-8489-02af8f2f9a18  844.4M     8% /boot
 ├─vda14
 └─vda15 vfat   FAT32 UEFI            5150-4E06                              98.1M     6% /boot/efi
```

TEST-13-SYSROOT calls dracut with `--hostonly` which leads to
`hostonly_cmdline` default to `yes`. This leads to the code path for
"save host_devs which we need bring up" in
`modules.d/80base/module-setup.sh` being executed. In this VM case the
variables are:

```
host_devs: /dev/vda1 /dev/vda13 /dev/vda15
user_devs:
root_devs: /dev/vda1
```

The code in `modules.d/80base/module-setup.sh` creates systemd units for
`/dev/vda13` and `/dev/vda15` which can be seen in the initrd file:

```
lrwxrwxrwx   1 root     root           78 Nov 24 13:35 etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-30a0e670\x2ddd1c\x2d4d4f\x2d8489\x2d02af8f2f9a18.device -> ../dev-disk-by\x2duuid-30a0e670\x2ddd1c\x2d4d4f\x2d8489\x2d02af8f2f9a18.device
lrwxrwxrwx   1 root     root           42 Nov 24 13:35 etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-5150\x2d4E06.device -> ../dev-disk-by\x2duuid-5150\x2d4E06.device
```

These two units hang forever in TEST-13-SYSROOT.

So run TEST-13-SYSROOT with `--no-hostonly-cmdline`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1871
test/TEST-13-SYSROOT/test.sh