From 3c563344e98c9ac187d56d2600de0a37b3967373 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 26 Jan 2023 14:57:47 +0000 Subject: setup-disk: accept any bootfs with BOOTLOADER=none Dont be picky if we don't install any bootloader. This is useful for rootfs on virtiofs for example. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10499 --- setup-disk.in | 2 +- tests/setup_disk_test | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup-disk.in b/setup-disk.in index 90c9c2d..9258df2 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -539,7 +539,7 @@ install_mounted_root() { mnt_boot="$mnt"/boot fi boot_fs=$(find_mount_fs "$mnt_boot") - if ! supported_boot_fs "$boot_fs"; then + if [ "$BOOTLOADER" != none ] && ! supported_boot_fs "$boot_fs"; then [ -z "$FORCE_BOOTFS" ] && return 1 echo "Continuing at your own risk." fi diff --git a/tests/setup_disk_test b/tests/setup_disk_test index 0331700..7418c89 100755 --- a/tests/setup_disk_test +++ b/tests/setup_disk_test @@ -292,8 +292,7 @@ setup_disk_install_mounted_root_bootloader_none_body() { mkdir -p target/boot \ sys/firmware/efi - fake_mount "/dev/vda2 $PWD/target ext4 rw,noatime,data=ordered 0 0" - fake_mount "/dev/vda1 $PWD/target/boot vfat rw,relatime,fmask=0022 0 0" + fake_mount "/dev/vda2 $PWD/target virtiofs rw,noatime,data=ordered 0 0" BOOTLOADER=none atf_check -s exit:0 \ -o not-match:"grub" \ -- cgit v1.2.3