cannot set root to partition with cylinder count greater than 133674

Bug #325090 reported by John Ryan on 2009-02-03
2
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
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.97-29ubuntu45 installed. A review of the source code for Jaunty grub-0.97-29ubuntu48 suggests that the problem remains unresolved.

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.

Colin Watson (cjwatson) on 2009-02-12
Changed in grub:
assignee: nobody → kamion
Alexander Muon (webthrower000) wrote :

Same problem here with jaunty beta

Colin Watson (cjwatson) wrote :

I'm afraid we haven't been able to find time to do anything about this. It may not be worth it now since grub2 has moved on really quite a lot over the last two years ...

Changed in grub (Ubuntu):
assignee: Colin Watson (cjwatson) → nobody
importance: Undecided → Medium
status: New → Triaged
tags: removed: qa-jaunty-foundations
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers