Skip to contentSkip to conversation

hw/i386: Add remedy tip to initrd too large error

PATCH New Nir Lichtman 1 participant 1 message Oct 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386: Add remedy tip to initrd too large error

Problem: The current error is very confusing since the default x86 machine memory size is small and it gives a sense that there is no way to fix for slightly larger images.

Solution: Add a remediation tip to the error message.

---
 hw/i386/x86-common.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
hw/i386/x86-common.c +3 -2
index 7512be6..4e6c098 100644
@@ -874,8 +874,9 @@ void x86_load_linux(X86MachineState *x86ms,
         initrd_data = g_mapped_file_get_contents(mapped_file);
         initrd_size = g_mapped_file_get_length(mapped_file);
         if (initrd_size >= initrd_max) {
-            fprintf(stderr, "qemu: initrd is too large, cannot support."
-                    "(max: %"PRIu32", need %"PRId64")\n",
+            fprintf(stderr, "qemu: initrd is too large, try increasing"
+                    " the machine memory with -m."
+                    " (max: %"PRIu32", need %"PRId64")\n",
                     initrd_max, (uint64_t)initrd_size);
             exit(1);
         }
Signature · 1 line
2.49.1