[Bug 794043] Re: mkdosfs incorrectly calculates sector total
Rolf Leggewie
794043 at bugs.launchpad.net
Fri Nov 21 18:29:40 UTC 2014
Maverick has long since stopped to receive any updates. Marking the
Maverick task for this ticket as "Won't Fix".
** Changed in: dosfstools (Ubuntu Maverick)
Status: New => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dosfstools in Ubuntu.
https://bugs.launchpad.net/bugs/794043
Title:
mkdosfs incorrectly calculates sector total
Status in “dosfstools” package in Ubuntu:
Fix Released
Status in “dosfstools” source package in Lucid:
New
Status in “dosfstools” source package in Maverick:
Won't Fix
Status in “dosfstools” source package in Natty:
New
Status in “dosfstools” source package in Hardy:
New
Bug description:
Binary package hint: dosfstools
mkdosfs will incorrectly calculate the number of sectors of a given
FAT partition if the number sectors are odd due to count_blocks
incorrectly handling the remainder of a division operation. This
miscalculation causes the OMAP4 bootloader to fail to boot.
This bug can be observed by comparing the total sector size in fdisk
expert more to fsck.msdos; this discrepancy only shows up when the
number of sectors are odd:
fdisk output:
Expert command (m for help): p
Disk /dev/sdb: 204 heads, 3 sectors, 12654 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 1 1 0 203 3 258 3 158505 83
2 00 0 0 0 0 0 0 0 0 00
3 00 0 0 0 0 0 0 0 0 00
4 00 0 0 0 0 0 0 0 0 00
mcasadevall at daybreak:~/src/dosfstools-3.0.9$ sudo fsck.msdos -v /dev/sdb1
dosfsck 3.0.9 (31 Jan 2010)
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkdosfs"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
2048 bytes per cluster
4 reserved sectors
First FAT starts at byte 2048 (sector 4)
2 FATs, 16 bit entries
79872 bytes per FAT (= 156 sectors)
Root directory starts at byte 161792 (sector 316)
512 root directory entries
Data area starts at byte 178176 (sector 348)
39539 data clusters (80975872 bytes)
3 sectors/track, 204 heads
0 hidden sectors
158504 sectors total
Checking for unused clusters.
/dev/sdb1: 0 files, 0/39539 clusters
Compare the difference in sectors total. The attached patch correctly
handles the remainder and causes the sector counts to match.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dosfstools/+bug/794043/+subscriptions
More information about the foundations-bugs
mailing list