Open Erriez opened 2 years ago
I'll try looking into it in the next few days. Thanks for reporting the issue.
@eaksel. I could not find a solution in the meantime. Thanks!
@Erriez, Found multiple ways of fixing this issue, but the only one that I've been able to make work during the build sequence is copying "/boot/efi/EFI/debian/grubx64.efi" to "/boot/efi/EFI/boot/bootx64.efi" (ref: https://blog.wbcchsyn.net/1574439775.html).
The other solutions are to boot into Debian using this command in the uefi shell:
FS0:\EFI\debian\shimx64.efi
And once in Debian run one of these two commands:
efibootmgr -c -d /dev/sda -p 1 -l '\EFI\debian\shimx64.efi' -L 'Debian'
(My preferred option, ref: https://bugs.launchpad.net/ubuntu/+source/efibootmgr/+bug/1363719/comments/4)
echo 'FS0:\EFI\debian\shimx64.efi' > /boot/efi/startup.nsh
(Alternative option)
@eaksel Thanks for your investigation! I'll test it.
Good news it that it works for UEFI builds. However, the change in setup.yml
breaks build of debian10.json
:
https://github.com/eaksel/packer-Debian10/commit/13cc32e3bddb13f52d8d8623f885f409286ce3fe#r56149114
A suggestion is to set an environment variable in debian10_uefi.json
to ignore steps Configure automatic UEFI Boot for VirtualBox x
in setup.yml
.
Thanks for the feedback, I hadn't checked the bios build.
Added a check to only apply this to UEFI builds.
Based on lines 34-36 of this: https://github.com/openstack/ansible-hardening/blob/master/tasks/main.yml
@eaksel Thanks for creating this project. I've successfully built a Debian 10.10.0-amd64 VirtualBox VM, but after importing the OVF it starts the UEFI shell:
Latest VirtualBox version on Ubuntu 21.04: 6.1.26 r145957.
Do you have a suggestion how to automatically start the OS after power-on? Thanks!