[Nottingham] [Talk] Wednesday 07/04/2010 Install-fest & fix-it evening (Change of event!)
TJ
linux at tjworld.net
Mon Apr 5 17:00:48 UTC 2010
I've been following the list recently and considering coming along to
the meetings. My main motivation would be to meet like-minded people
that love a bit of intense hacking on challenging bugs and code.
Seeing mention of the install/fix-it topic made me wonder if there's any
interest in group examination/playing in the interests of enlightenment,
with a bug [1] I'm currently working on.
It's very simple: GRUB2 [2] boot-strap code in the MBR is reporting
"Geom Error" because the BIOS of the PC in question, an Acer Travelmate
C100, is passing incorrect boot-device values. GRUB1 never had this
problem. Affected users are replacing GRUB2 with Lilo to work around it,
which is rather extreme.
The fix is simple: over-ride BIOS and force drive 0x80 (first hard disk)
in the boot-strap code.
Achieving that fix is intense since:
1) it is machine code/assembly language
2) there are less than 300 bytes for the complete boot-strap code
3) GRUB2 dynamically changes the boot-strap sector written to disk when
grub-setup runs for each device that it is installed to
4) finding ways to adjust the code/data in the boot-sector to make room
for over-ride code is challenging
5) determining the handful of bytes to achieve the over-ride
6) any fix should be universal and not machine-specific
I've previously written a patch and diagnostic MBR [3] for the syslinux
project to cope with a similar issue for USB boot devices and am using
that as the basis for the GRUB2 fix, of which there are two options to
fixing it of which the best one will be determined from more
investigation of the GRUB2 code.
On top of the basics of understanding the GRUB2 code for boot.S and
grub-setup.c is allowing for the patches applied by Debian/Ubuntu to the
boot sector generation code.
TJ.
[1] https://bugs.launchpad.net/bugs/555500
[2] http://www.gnu.org/software/grub/grub-2.en.html
[3] http://syslinux.zytor.com/archives/2009-March/011931.html
More information about the Nottingham
mailing list