[pve-devel] [PATCH installer 1/2] raid setup: btrfs: do not allow legacy BIOS boot on 4Kn disks
Christoph Heiss
c.heiss at proxmox.com
Thu Aug 10 12:31:56 CEST 2023
This is already checked for LVM and ZFS setups, but not for Btrfs. Add
it there too, as it doesn't work anyway.
Tested by creating a block device with 4K sectorsize using
the following QEMU args:
-device virtio-blk,drive=testdrive4k,logical_block_size=4096,physical_block_size=4096
-drive file=/path/to/4k-testdisk.img,if=none,id=testdrive4k
The 4k-testdisk.img was created with:
qemu-img create -f qcow2 /path/to/4k-testdisk.img 16G
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
Proxmox/Install.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 1c4811d..1117fc4 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -299,6 +299,10 @@ sub get_btrfs_raid_setup {
my $diskcount = scalar(@$devlist);
die "$filesys needs at least one device\n" if $diskcount < 1;
+ foreach my $hd (@$devlist) {
+ legacy_bios_4k_check(@$hd[4]);
+ }
+
my $mode;
if ($diskcount == 1) {
--
2.41.0
More information about the pve-devel
mailing list