On Jul 24, OKUJI Yoshinori wrote:
> From: "Jochen Hoenicke" <[EMAIL PROTECTED]>
> Subject: Re: Problems booting with LS-120 drive
> Date: Mon, 24 Jul 2000 11:20:20 +0200 (MET DST)
>
> > It is possible to change grub to honor the fields in the DOS boot
> > sector. I wrote a patch some time ago, but it doesn't apply cleanly
> > anymore, since the boot sector changed for the --force-lba option.
> > The main problem is to add this feature, without getting beyond the
> > 512 byte boot sector limit.
>
> There are three ways to add it:
>
> 1) Shrink the size of stage1. I know it can be some bytes smaller,
> since I talked with Andrew Clausen about this issue rather keenly. I
> don't know if that is enough for your purpose, though.
This is the way I choosed.
Attached is a patch for grub, to get the geometry from the BPB if a
special flag "--force-bpb" was set on installation. The BPB is a part
of the FAT bootsector and the only place where my bios reports the
correct geometry.
This patch enables me to boot from zip, but it should work for LS-120,
too. To make a bootable zip copy grub's stage1 and stage2 files into
a /boot/grub/ directory on the zip, start the grub shell and issue the
following commands:
grub> device (fd0) /dev/hdd4
% This maps the fat partition of the zip to fd0. This is the same
% mapping the bios does when booting from zip. Replace /dev/hdd4
% with the device you mount when accessing your zip.
grub> geometry (fd0) 96 64 32
% The geometry command is only necessary, since my zip incorrectly
% reports 32/64/96 instead of 96/64/32, and grub doesn't work with
% more than 64 sectors. DON'T USE THIS COMMAND FOR ANYTHING OTHER
% THAN A ZIP-100.
grub> setup --force-bpb (fd0) (fd0)
% The option --force-bpb makes grub honoring the BPB. This is the
% only place where my bios tells the geometry it uses for the zip.
I'm very eager to know if this also works for a LS-120.
NOTE: Grub doesn't check if the bpb is valid. You must only use
--force-bpb when installing to the boot sector of a FAT partition.
This means that this currently only works with FAT.
I haven't updated the documentation, yet.
Honor BPB patch