* fix more
diff --git a/bootstub.c b/bootstub.c
index 79a3a2b..1b3adf7 100644
--- a/bootstub.c
+++ b/bootstub.c
@@ -52,15 +52,28 @@
         return s;
 }
 
+static size_t strnlen(const char *s, size_t maxlen)
+{
+        const char *es = s;
+        while (*es && maxlen) {
+                es++;
+                maxlen--;
+        }
+
+        return (es - s);
+}
+
+
 static void setup_boot_params(struct boot_params *bp, struct setup_header *sh)
 {
 	memset(bp, 0, sizeof (struct boot_params));
 	bp->screen_info.orig_video_mode = 1;
 	bp->screen_info.orig_video_lines = 25;
 	bp->screen_info.orig_video_cols = 80;
+	bp->alt_mem_k = 256*1024;
 	memcpy(&bp->hdr, sh, sizeof (struct setup_header));
 	bp->hdr.cmd_line_ptr = CMDLINE_OFFSET;
-	bp->hdr.cmdline_size = *(u32*)CMDLINE_SIZE;
+	bp->hdr.cmdline_size = strnlen((const char*)CMDLINE_OFFSET,256);
 	bp->hdr.ramdisk_size = *(u32*)INITRD_SIZE;
 	bp->hdr.ramdisk_image = *(u32*)INITRD_OFFSET + CMDLINE_OFFSET;
 }
diff --git a/bootstub.h b/bootstub.h
index 0354b4f..c6c7f90 100644
--- a/bootstub.h
+++ b/bootstub.h
@@ -5,9 +5,8 @@
 #define _BOOT_STUB_HEAD
 
 #define CMDLINE_OFFSET	0x100000
-#define CMDLINE_SIZE	0x100100
-#define INITRD_SIZE	0x100104
-#define INITRD_OFFSET	0x100108
+#define INITRD_SIZE	0x100100
+#define INITRD_OFFSET	0x100104
 #define BZIMAGE_OFFSET	0x102000
 #define STACK_OFFSET 	0x101000
 #define SETUP_HEADER_OFFSET (BZIMAGE_OFFSET + 0x1F1)
diff --git a/head.S b/head.S
index a66768c..4dec437 100644
--- a/head.S
+++ b/head.S
@@ -17,13 +17,11 @@
  *		|	boot stub	|
  * 0x101000	+-----------------------+
  *		|	free space	|
- *		|	used as stack   | MIC need to pad this to 0
- * 0x10010c	+-----------------------+
- *		|	initramfs offset| MIC need to fill it
+ *		|	used as stack   |
  * 0x100108	+-----------------------+
- *		|	initramfs size	| MIC need to fill it
+ *		|	initramfs offset| MIC need to fill it according to bzImage size
  * 0x100104	+-----------------------+
- *		|	cmdline size	| MIC need to fill it
+ *		|	initramfs size	| MIC need to fill it according to initrd  size
  * 0x100100	+-----------------------+
  *		|	kernel cmdline	| MIC need to fill it
  * 0x100000	+-----------------------+