[pve-devel] [PATCH installer] auto: add some error context when loading the first-boot executable

Christoph Heiss c.heiss at proxmox.com
Tue Apr 8 11:29:35 CEST 2025


On Tue Apr 8, 2025 at 11:23 AM CEST, Thomas Lamprecht wrote:
> Am 08.04.25 um 11:06 schrieb Christoph Heiss:
>
>> @@ -47,7 +47,9 @@ fn setup_first_boot_executable(first_boot: &FirstBootHookInfo) -> Result<()> {
>>              }
>>          }
>>          FirstBootHookSourceMode::FromIso => {
>> -            Some(fs::read(format!("/cdrom/{FIRST_BOOT_EXEC_NAME}"))?)
>> +            Some(fs::read(format!("/cdrom/{FIRST_BOOT_EXEC_NAME}")).context(
>> +                "failed loading first-boot executable from ISO (was --on-first-boot specified?)",
> Definitively better than the status quo, but as user I would then ask
> myself how I can pass that flag to the installer, so maybe word it
> something like:
>
> "failed loading first-boot executable from ISO (was ISO prepared with --on-first-boot specified?"

Definitively sounds better, especially when seeing it from that
perspective!

I tried to keep the message rather short at first, since it is printed
on one line currently. But we could also use "{err:#?}" as format
specifier below, to let anyhow break up the error message over multiple
lines.

I'll send a v2 shortly!

>
> Or is this caught already earlier?

No, currently not. But I already talked with Michael about more
extensive validation in the future, in both the auto-installer and
auto-install-assistant.




More information about the pve-devel mailing list