Package: util-linux
Version: 2.25.2-6
Severity: normal

I have an 8GB USB flash drive containing the attached Master Boot Record (MBR).

On this freshly-setup Debian 8.3 system I manually constructed the partition layout and believe it to have the following attributes:
    Partition #4 in MBR
    ~7900    Cylinders
       64    Heads, or Tracks
       32    Sectors

having created the partition layout using fdisk (possibly an older version tho).

(The fob's actual use is as a full Deb server, with sda1 being an extended partition containing 2 logical ext3 partitions and it boots up and runs all fine - the attached MBR that lacks sda1 is a 'simplest case' example of the problem.)

So now when I examine the attached MBR in fdisk via the cmds:
{ printf "u \n x \n p \n r \n q \n" | fdisk Sample64h32sMBR.mbr; } | grep -E "^(Geometry|Device|Sample64h)"

the 3 lines output are:
    Geometry: 64 heads, 32 sectors/track, 0 cylinders
Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs Sample64h32sMBR.mbr4 * 1 412 412 6 FAT16 1/1/0 411/32/63 80

The first and second lines are as expected, however the 3rd line SHOULD have the End geometry as:
    411/63/32
instead of the indicated:
    411/32/63

(The problem also manifests when I don't invoke the 'u'nits command - I only invoked the 'u' command to cause fdisk to output the "Geometry" line, making the problem readily illustrated.)

Of note: I believe the problem also affects the Start-geometry fields as well.

I'd plead that the problem be corrected by way of reversing the fields of numerals that are output as the Hd & Sec fields, and not by way of simply reversing the columnar headers, since Cyl/Sec/Hd display would be both a minor mind bend to do calculations and verifications of data upon, and also in conflict with what it seems to be the widespread convention of ordering the fields in a MostSignificant-to-LeastSignificant, Left-to-Right arrangement. (At least for English-speakers :)

In any case thanks for considering the bug, and your work on open source code!

====================================================

Below, the 'reportbug' output:
    -- System Information:
    Debian Release: 8.3
      APT prefers stable-updates
      APT policy: (500, 'stable-updates'), (500, 'stable')
    Architecture: i386 (i686)

    Kernel: Linux 3.16.0-4-586
    Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
    Shell: /bin/sh linked to /bin/dash
    Init: systemd (via /run/systemd/system)

    Versions of packages util-linux depends on:
    ii  initscripts    2.88dsf-59
    ii  libblkid1      2.25.2-6
    ii  libc6          2.19-18+deb8u3
    ii  libmount1      2.25.2-6
    ii  libncurses5    5.9+20140913-1+b1
    ii  libpam0g       1.1.8-3.1+deb8u1
    ii  libselinux1    2.3-2
    ii  libslang2      2.3.0-2
    ii  libsmartcols1  2.25.2-6
    ii  libtinfo5      5.9+20140913-1+b1
    ii  libuuid1       2.25.2-6
    ii  lsb-base       4.1+Debian13+nmu1
    ii  tzdata         2015g-0+deb8u1
    ii  zlib1g         1:1.2.8.dfsg-2+b1

    util-linux recommends no packages.

    Versions of packages util-linux suggests:
    ii  dosfstools          3.0.27-1
    ii  kbd                 1.15.5-2
    ii  util-linux-locales  2.25.2-6

    -- no debconf information

====================================================

Attachment: Sample64h32sMBR.mbr
Description: Binary data

Reply via email to