cannot set root to partition with cylinder count greater than 133674
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Binary package hint: grub
Grub fails to set root (and thus boot) to a partition whose start cylinder is greater than 133674 because the source code erroneously uses a 32-bit signed "int" to hold an unsigned long which is greater than 2^31.
I have a new 1.5Tb hard drive with a CHS geometry of 182401/255/63. The drive reports a total sector count of 2930277168. I have naively partitioned the drive with two partitions beyond the 133674 cylinder boundary from which I would like to be able to boot. The partition with /boot on it is at the start of the drive.
The geometry struct defined in stage2/shared.h uses an unsigned long to hold this value which is fine, but in many functions (such as rawread in stage2/disk_io.c) the value is passed as an integer which results in a negative value.
You can see the problem clearly in a grub shell by typing "root (hd0,4)" (where /dev/sda5 is beyond the 133674 boundary) which results in "Error 18: Selected cylinder exceeds maximum supported by BIOS".
This was observed on an Intrepid 8.10, Intel 64 bit platform with grub-0.
I am aware that active development of grub legacy has been discontinued, but I don't believe grub2 to be polished enough to replace it yet so it would be nice to see a patch for this problem.
Changed in grub: | |
assignee: | nobody → kamion |
Same problem here with jaunty beta