[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problems with savedefault
From: |
Jochen Hoenicke |
Subject: |
Re: problems with savedefault |
Date: |
Wed, 31 Jan 2001 18:57:51 +0100 (MET) |
On Jan 31, Thierry Laronde wrote:
> On Wed, Jan 31, 2001 at 02:52:58PM +0100, Thierry Laronde wrote:
> >
> > Is grub able to write sectors ordinarily ? In at least one case, the
> > answer is yes : with the install command. So this succeeds with
> > install and fails with a function using the previous functions. So
> > the question : what is the differences between the use of these
> > functions in `savedefault' and `install' ?
>
> There is in fact another difference between floppy and hard disk : in
> floppy, generaly speaking, there is no *stage1_5.
>
> I have tried to suppress *stage1_5 for the grub on the MBR of an IDE drive :
> savedefault works...
>
> So the problem is --- I guess... --- with the location of the first sector
> of stage2 when a *stage1_5 is used.
>
> And I am afraid of one thing : if this location is wrong where by hell is
> writing `savedefault' ?
I looked over the code, and I'm quite certain, that the savedefault
mechanism can't work for stage1_5, since neither the saved_entry
variable, nor the install_second_sector is copied from stage1_5 to
stage2.
What's worse, is that AFAICS save_default writes the saved_entry into
A RANDOM SECTOR, without any sanity checks if the sector could be
right. This is because "install_second_sector", the sector where the
saved_entry is written to, is initialized from %ebp which is not set
in chain_stage2.
IMHO there should be a sanity check in savedefault_func, comparing
some magic bytes in the sector that it changes and giving an error
message if they are not present.
Jochen
- problems with savedefault, Torvald Riegel, 2001/01/30
- Re: problems with savedefault, Treutwein; Bernhard, 2001/01/31
- Re: problems with savedefault, Thierry Laronde, 2001/01/31
- Re: problems with savedefault, OKUJI Yoshinori, 2001/01/31
- Re: problems with savedefault, Treutwein; Bernhard, 2001/01/31
- Re: problems with savedefault, Thierry Laronde, 2001/01/31
- Re: problems with savedefault, Thierry Laronde, 2001/01/31
- Re: problems with savedefault,
Jochen Hoenicke <=
- Re: problems with savedefault, OKUJI Yoshinori, 2001/01/31
problems with savedefault, Torvald Riegel, 2001/01/31