Re: Help with CHS / geometry
Mouse <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.sparc |
|---|---|
| Message-ID | <[email protected]> |
>> sd0: 8715 MB, 8387 cyl, 10 head, 212 sec, 512 bytes/sect x 17850000 sectors > [...] 17780440 sectors total. > But the drive has 17850000 sectors, as it does not really have that > geometry physically (and nothing cares much about that fact). Indeed. Most of the reasons the OS once cared about geometry are no longer valid, and, in these days of ZBR, even real spinning rust no longer has a single geometry anyway. Personally, I usually do one of two things: either (1) I factor the sector count and pick C/H/S numbers that are in reasonable ranges and multiply out to the correct value (for 17850000 sectors I'd likely pick 1700 cyl, 42 head, 250 sec), or (2) I use H and S values that give 1M "cylinders", for disklabeling convenience. On a few occasions I've gone for 2M or 4M cylinders instead, for disks over 64G (for which the count of 1M "cylinders" overflows a 16-bit field - all the fields of struct sun_dkgeom are 16-bit...but, confusingly, sdkp_cyloffset is 32 bits). > The last 17850000 - 17780440 = 69560 sectors will not be accessible > with this "virtual" geometry and a sun label. The kernel will print > a note about this on boot, but this is fine (and it happens for a lot > of "real" drives). Also, don't be afraid to experiment with things such as partitions placed such that the extend - or even begin - past what the geometry information says is the end of the disk. One more thing you can do is use a Sun label that describes only one partition, in which you put your boot stuff, with a native NetBSD label, including other partitions, elsewhere. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B