Booting Windows with Grub causes extended partitions to dissapear
- 1. Problem
- 2. Research
- 3. Solution
- 3.1. Switch harddrives position
- 3.2. Change motherboard
- 3.3. Switch to LILO
- 3.4. Ditch Windows 98
1. Problem
I have two hard-disks. The first one is all-Linux, the second one has a typical Windows 98 setup with C: as a primary partition and D: as a logical partition inside an extended partition. Booting with Grub into Windows from
the MBA of the first hard-disk is successful (I get Windows loaded and I see C: fine) but all the extended partitions (including D: and another one on the first disk) are invisible. Fdisk reports them as type UNKNOWN and Windows and MS-DOS report them as unaccessible.
Here’s how I boot Windows from Grub:
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1
makeactive
2. Research
There are several reports
about this on the Grub users mailing list. It is now a known Grub bug (#486, “map doesn’t work in some environments”), and is believed to be an issue
with the map directive. That means that if you have to use map and you have a certain hardware configuration, you’re toast.
Yoshinori K. Okuji, one of the main Grub developers, has told me that remote debugging would require close to real-time interaction and that’s not possible due to his very busy schedule. Unfortunately, the bug can’t be
reproduced on all computers. Nowadays it would take someone who can both experience the bug and know how to program in assembly in order to hunt down this bug. I can’t program in assembly, so it looks like a long wait until the right person comes along.
3. Solution
3.1. Switch harddrives position
One solution would be to switch hard-drives around. It’s not good for me because the second drive is rack-mounted and is sometimes absent.
3.2. Change motherboard
Another idea would be to upgrade my motherboard (the BIOS is already flashed to the latest version). This is just pure speculation though, as Yoshinori Okuji warned me, short of looking at the Windows 98 code and making sure.
Update: I’ve since changed my motherboard to an nForce-based EpoX. Still getting the same behaviour. So either the master HDD is the actual culprit, or Windows 98.
3.3. Switch to LILO
One good solution is to use LILO, which is too bad, since I like Grub a whole lot more.
3.4. Ditch Windows 98
With Windows 2000 or XP this doesn’t happen anymore. AFAIK the issue has never been fixed and the bug still stands. I’ve no idea whether Grub2 is also affected, and in all likeliness I’ll never know. Good writtens to Windows 98.
