[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] grub-legacy: fix 256 char limitation on kernel command line leng
From: |
Paul Gortmaker |
Subject: |
[PATCH] grub-legacy: fix 256 char limitation on kernel command line length |
Date: |
Thu, 21 Nov 2013 14:40:08 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
The legacy grub only copies 0xff chars of cmdline, which means that
longer lines used with nfsroot and static network settings may get
truncated.
The code where this happens is in stage2/boot.c:
while (dest < linux_data_tmp_addr + LINUX_CL_END_OFFSET && *src)
*(dest++) = *(src++);
Bump everything up by 0x100 to give us 512 chars, or double what it
used to be. Current x86 kernels support up to 2048 chars, but this
will cover 99% of currently failing use cases.
Signed-off-by: Paul Gortmaker <address@hidden>
---
diff --git a/stage2/shared.h b/stage2/shared.h
index 818062c..8cf24da 100644
--- a/stage2/shared.h
+++ b/stage2/shared.h
@@ -160,8 +160,8 @@ extern char *grub_scratch_mem;
#define LINUX_VID_MODE_ASK 0xFFFD
#define LINUX_CL_OFFSET 0x9000
-#define LINUX_CL_END_OFFSET 0x90FF
-#define LINUX_SETUP_MOVE_SIZE 0x9100
+#define LINUX_CL_END_OFFSET 0x91FF
+#define LINUX_SETUP_MOVE_SIZE 0x9200
#define LINUX_CL_MAGIC 0xA33F
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] grub-legacy: fix 256 char limitation on kernel command line length,
Paul Gortmaker <=