On Sat, 26 Mar 2011 12:36:08 -0400 (EDT), Geronimo wrote: > > I'm a bit confused. > > I tried to read partition info from hex-dump of first block and compare that > with the values from /var/log/installer/partman ... > > According to partition info from wiki the biggest number of chs is 0x3FF, > which is 1023 decimal - and partman output contains entries like: > (91201,0,0) (91201,80,62) > > So is there another way to interpret entries from partition table?
The master boot record is the first sector of the disk (512 bytes). Its LBA value is 0 and its CHS value is 0:0:1 (cylinder 0, head 0, record 1). The partition table is contained within the master boot record. Assuming that your disk is partitioned using the standard MS-DOS disk partitioning scheme, the partition table is at offset 0x1be (decimal 446). The total size of the partition table is 64 bytes. It consists of four 16-byte entries. Each entry describes a primary partition or an extended partition. There can be a maximum of one (minimum of zero) extended partitions. Logical partitions, if any, are described in the extended partition table in the first sector of the extended partition. See, for example, http://en.wikipedia.org/wiki/Master_boot_record for more details. Each partition table entry contains the starting sector of the partition in both CHS format and LBA format. It also contains the total number of sectors in the partition and the CHS address of the last sector in the partition. LBA values and CHS values can be converted back and forth to each other as long as (1) the disk geometry is known, and (2) the partition is completely contained within the portion of the disk which is addressable in CHS format. In the best case scenario, CHS values can address only the first 8.4G of the disk. The LBA values can address up to 2T (2 terabytes). Unfortunately, not all disk partitioning programs agree on the disk geometry; so what to use for LBA values depends on which program was used to partition the disk. I address this topic to some extent in my LILO web page http://users.wowway.com/~zlinuxman/lilo.htm That's why I recommend that you concentrate on the sector numbers, which are essentially the same as LBA values. The sector information is further down in the file than the CHS information. -- .''`. Stephen Powell : :' : `. `'` `- -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/2008653358.1735863.1301160403861.javamail.r...@md01.wow.synacor.com

