BIOS vs Linux created Partition Table

While trying to introduce Linux at the SOS Hermann Gmeiner International College in Tema, Ghana, I encounted a very strange problem. Here are the results, I spare you the list of things I tried to find out:

The BIOS on the Gateway PCs they use here, with the id bf86510A.15A.0066.P13, will freeze when it encounters a disk with a linux created partition table. It will do so before even deciding what to boot, so you can't boot from CD then. It does not matter if the orignal MBR is on it, or the one created by Window's fixmbr, or lilo -M, or install-mbr, or grub. Changing the partition table using Windows XP (diskpart in the recovery console) will make the BIOS boot nicely. This only happens with the hard model drive that came with the PCs, after replacing it with a different model any partition table is ok.

The only way to keep working with the hard drive is to power the computer without the hard drive attached, wait until it is done detecting it (for example wait until the BIOS complais about the lack of harddrives), then plug it in while the computer is running. Of course, the hardware is not meant to be used this way, and it might destroy everything, so don't try this at home (unless you have to). For me it was the only way, since when I know boot from a CD (Windows Installation Disk, Knoppix, FAI-Installation CD, anything that does not rely on BIOS information regarding the hard disks), the hard drive can be used just fine...

So how did I get Linux on it in the end? One can say I tricked the BIOS: I made the automatic Linux installation add another, unused and small partition at the end. After the installation is done and I can't boot regulary any more, I use the mentioned power trick to boot the Recovery Console of a Windows XP installation CD, to delete the unused partition with diskpart. This makes Windows write the table, and thus make the BIOS happy. Unfortunately, this kills grub, so I have to boot any Linux boot CD, chroot into my installed system and run grub-install...

If anyone has encountered similar problems before and maybe found a nicer solution, which maybe could bring me back the "A" in "Fully Automatic Installation", or at least frees me from the need to make IDE hot-pluggable, I'd be grateful.



* if your bios has a 'virus protection' option, turn it off
* get a bios update from gateway
* if it still doesn't work, complain to them
* doesn't changing the active flag on a partition cause windows to re-write the partition table?
* use lilo instead of grub and install it to your primary linux partition, instead of the mbr
* try a different partition-table-creating program: gpart (more windows-compatible) or sfdisk (more powerful)
* if all fails, use hexdump + visual diff + binary editor
#1 Anonymous am 2006-09-12T02:41:57+00:00
Hi Duh,

Updates are not available (first thing I checked). The active flag idea is good. I like grub for it's nice background image, but I'll see if lilo helps me here. sfdisk is used to create the partition, but I get the problem with both sfdisk and cfdisk. Not sure if I want to start debugging the MBR. Maybe when I have too much time here.

Thanks for you suggestions, anyways!
#2 Joachim Breitner (Homepage) am 2006-09-12T07:57:34+00:00
Das mit dem MBR angucken ist recht einfach, das Format ist nicht schwer, das sind nur 512 bytes, da koennte man glaub ich schon weiter kommen. Klingt auf jedem Fall nach weniger stress als der Rest :)
#3 manuel am 2006-09-13T07:15:39+00:00
Mag sein, aber dann? sfdisk patchen? Aber bei der nächsten Installation zieh ich mal MBRs, vielleicht ists ja doch was einfaches.

Vielleicht läuft ja "diskpart" in wine, dann bau ich das in den Installer ein ;-)
#4 Joachim Breitner (Homepage) am 2006-09-13T07:36:28+00:00
erstmal MBR patchen, und sfdisk oder whatever patchen, das er 0xfoobar an stelle 23 schreibt koennte andere schon helfen :)
#5 manuel am 2006-09-13T08:45:00+00:00

Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.