diff -urN 2.2.12/arch/alpha/kernel/setup.c 2.2.12-initrd/arch/alpha/kernel/setup.c --- 2.2.12/arch/alpha/kernel/setup.c Thu Aug 26 14:20:16 1999 +++ 2.2.12-initrd/arch/alpha/kernel/setup.c Sat Sep 18 16:13:45 1999 @@ -261,8 +261,18 @@ if (initrd_end > *memory_end_p) { printk("initrd extends beyond end of memory " "(0x%08lx > 0x%08lx)\ndisabling initrd\n", - initrd_end, (unsigned long) memory_end_p); + initrd_end, *memory_end_p); initrd_start = initrd_end = 0; + } else { + /* move initrd from the middle of the RAM to the + start of the RAM so we won't risk to rewrite + initrd while allocating the memory at boot time */ + memmove((char *) *memory_start_p, + (char *) initrd_start, INITRD_SIZE); + initrd_start = *memory_start_p; + initrd_end = initrd_start + INITRD_SIZE; + *memory_start_p = PAGE_ALIGN(initrd_end); + initrd_below_start_ok = 1; } } #endif