diff --git a/src/backend_win/asb_core.c b/src/backend_win/asb_core.c index dc7e0f5..d69fc86 100644 --- a/src/backend_win/asb_core.c +++ b/src/backend_win/asb_core.c @@ -2119,11 +2119,19 @@ static HRESULT run_iso_patch_ubuntu(const wchar_t *iso_path, if (g_progress_cb && pvm) g_progress_cb(vm_handle(pvm), pct, is_staging, g_progress_ud); } else if (strncmp(line, "ERROR:", 6) == 0) { + asb_log(L"iso-patch: ERROR: %S", line + 6); if (error_msg && error_msg[0] == L'\0') MultiByteToWideChar(CP_ACP, 0, line + 6, -1, error_msg, (int)error_msg_cap); result = E_FAIL; } else if (strncmp(line, "DONE:", 5) == 0) { result = S_OK; + } else if (strncmp(line, "STATUS:", 7) == 0) { + /* Unlike the Windows --to-vhdx path there is no + in-guest installer log to fall back on, so the + iso-patch status lines (source squashfs, detected + kernel, ingest totals, ...) are the only host-side + record of how the Linux disk was built. */ + asb_log(L"iso-patch: %S", line + 7); } } start = ci + 1; diff --git a/tools/iso-patch/ubuntu_vhdx.c b/tools/iso-patch/ubuntu_vhdx.c index 696650f..929e66d 100644 --- a/tools/iso-patch/ubuntu_vhdx.c +++ b/tools/iso-patch/ubuntu_vhdx.c @@ -2081,6 +2081,22 @@ int do_ubuntu_to_vhdx(const wchar_t *iso_path_arg, goto cleanup; } strncpy(kernel_ver, pl.kernel_version, sizeof(kernel_ver) - 1); + if (kernel_ver[0] == 0) { + /* No /boot/vmlinuz-* was seen during the walk. minimal.squashfs + carries the kernel on the 26.04 desktop ISO, but on 24.04 it + lives only in the minimal.standard.live overlay, so the rootfs + built here has nothing to boot. Writing the bootstrap + grub.cfg with an empty version produces a disk that hangs at + the GRUB prompt while the UI shows "Installing Linux" forever + (jamesstringer90/appsandbox#66). Fail loudly instead; + exit_code stays 1 so cleanup deletes the VHDX. */ + log_err(L"no kernel (/boot/vmlinuz-*) found in %s - the disk would not boot. " + L"Only Ubuntu Desktop 26.04 LTS ISOs are supported.", sqfs_path); + sqfs_close(sq); + ext4_writer_close(ew); + goto cleanup; + } + log_msg(L"kernel: %hs", kernel_ver); sqfs_close(sq); }