diff --git a/ChangeLog b/ChangeLog index d397f6f5a..6ea89ee5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-07-05 OKUJI Yoshinori + + * stage2/boot.c (load_initrd) [!NO_DECOMPRESSION]: Set + NO_DECOMPRESSION to one before opening INITRD, so that GRUB + doesn't decompress an initrd automatically. Reported by + Thierry Laronde. + 2001-07-04 OKUJI Yoshinori * config.guess: Updated from automake-1.4h. diff --git a/stage2/boot.c b/stage2/boot.c index 3563abcff..97a5bd740 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -707,14 +707,18 @@ load_initrd (char *initrd) unsigned long moveto; struct linux_kernel_header *lh; +#ifndef NO_DECOMPRESSION + no_decompression = 1; +#endif + if (! grub_open (initrd)) - return 0; + goto fail; len = grub_read ((char *) cur_addr, -1); if (! len) { grub_close (); - return 0; + goto fail; } moveto = ((mbi.mem_upper + 0x400) * 0x400 - len) & 0xfffff000; @@ -736,7 +740,14 @@ load_initrd (char *initrd) lh->ramdisk_size = len; grub_close (); - return 1; + + fail: + +#ifndef NO_DECOMPRESSION + no_decompression = 0; +#endif + + return ! errnum; }