On Apr 27, Pavel Roskin wrote:
> Hello!
>
> > > Has anyone had any success in getting GRUB to boot off 1.68 meg media?
> >
> > If your BIOS can be configured to recognize the geometry, that would
> > be possible. Otherwise, impossible.
>
> In fact, there are there way of finding the geometry:
> 1) Use values hardcoded in the bootsector (BPB)
> 2) Ask BIOS about the _drive_ geometry
> 3) Read sectors on the head 0, cylinder 0, until you get an error.
>
> GRUB used to try 3 before trying 2, but it caused problems with
> "simulated" floppies from CD's, so now GRUB tries 2 before 3. And BIOS
> knows nothing about the real media, it only knows about the drive.
>
> 1 in not used in stage1. Although GRUB preserves BPB (boot parameter
> block), it doesn't use those values. It can be bogus values, but it would
> be nice to have a separate version of stage1 with BPB support for
>
> 1) people playing dirty games with floppies.
> 2) 100% reliable geometry detection on bootable CD's
>
> I would not actually implement this, but other people may want to :-)
I have implemented that to allow booting from zip disks. My bios
plays dirty tricks for zip disks modifying the BPB on the fly, but
doesn't give the right geometry when using INT13 AH=8.
I have put a special field into the grub stage1 sector, that tells if
the BPB is valid. It is set by setup if called with a special flag.
The stage2 also honors this flag.
I don't have the patch at hand, but I can post it to the list next
week if anyone is interested. I had to rewrite bigger parts of
stage1, just to fit that change into the tiny boot sector.
Jochen