tags 1108745 + confirmed
thanks
Hi,
I did some basic testing, using the following vmdb spec:
steps:
- mkimg: "{{ output }}"
size: 4G
- mklabel: gpt
device: "{{ output }}"
- mkpart: primary
device: "{{ output }}"
start: 0%
end: 5%
tag: uefi
- mkpart: primary
device: "{{ output }}"
start: 5%
end: 100%
tag: root
- kpartx: "{{ output }}"
- mkfs: ext4
partition: root
- mkfs: vfat
partition: uefi
- mount: root
- debootstrap: bookworm
mirror: http://deb.debian.org/debian
target: root
- chroot: root
shell: |
mkdir /boot/efi
- mount: uefi
mount-on: root
dirname: '/boot/efi'
- apt: install
packages:
- linux-image-amd64
tag: root
- fstab: root
- grub: uefi
tag: root
efi: uefi
Effectively, on a VM, the image fails to boot. The command used to test it
is:
qemu-system-x86_64 -enable-kvm -m 1G -drive
file=/tmp/build.img,media=disk,format=raw
I built the same image for BIOS, that is, applying the following patch:
@@ -1,7 +1,7 @@
steps:
- mkimg: "{{ output }}"
size: 4G
- - mklabel: gpt
+ - mklabel: msdos
device: "{{ output }}"
- mkpart: primary
device: "{{ output }}"
@@ -33,6 +33,5 @@
- linux-image-amd64
tag: root
- fstab: root
- - grub: uefi
+ - grub: bios
tag: root
- efi: uefi
The EFI partition is correctly populated matching what I have on my system:
EFI/debian/shimx64.efi
EFI/debian/grubx64.efi
EFI/debian/mmx64.efi
EFI/debian/fbx64.efi
EFI/debian/BOOTX64.CSV
EFI/debian/grub.cfg
EFI/BOOT/BOOTX64.EFI
EFI/BOOT/grubx64.efi
EFI/BOOT/mmx64.efi
Just to discard it's some quirk I didn't specify to qemu, I'll find an USB
stick and will try to boot on real hardware. I don't know if I'm missing
anything (i.e. a partition flag?)
Greetings,