Hello, OKUJI!
On Mon, 20 Sep 1999, OKUJI Yoshinori wrote:
> Pavel sent a patch, which made the argument ADDR for the command
> "install" optional, to me, but I didn't like the patch. Therefore,
> I've done the change in a different manner. Now you can install GRUB,
> like this:
>
> install /boot/grub/stage1 (hd0) /boot/grub/stage2 p
I don't know what you don't like in my patch.
Perhaps I'm guilty in not explaining you why I needed to modify
debug_fs_blocklist_func()
Your patch is wrong. It uses installaddr before assigning it a real value.
I have actually tested that GRUB doesn't boot after that.
grub> install /stage1 (fd0) /stage2
Breakpoint 1, debug_fs_blocklist_func (sector=33) at builtins.c:736
736 if (debug)
(gdb) n
739 if (*((unsigned long *) (installlist - 4))
(gdb)
743 installlist -= 8;
(gdb)
745 if (*((unsigned long *) (installlist - 8)))
(gdb)
749 *((unsigned short *) (installlist + 2)) =
(installaddr >> 4);
(gdb) up 4
#4 0x80549c1 in install_func (arg=0x40159c20 "/stage1 (fd0) /stage2",
flags=1)
at builtins.c:899
899 if (! grub_read ((char *) SCRATCHADDR, SECTOR_SIZE) ==
SECTOR_SIZE)
(gdb) p installaddr
$1 = 0
(gdb)
The problem is that debug_fs_blocklist_func uses installaddr, but it is
grub_read() that reads Stage2 and calls debug_fs_blocklist_func()
The modification of rawread() was intended to make the first sector
available to debug_fs_blocklist_func when it's called the first time.
Anyway, thanks for the changes in the documentation. It's a rare case
when not yet working features are already documented :-)
Pavel Roskin