bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Verbatim USB 4GB drive crashes parted, with 10 heads, 10 sectors/tra


From: Fred Finster
Subject: Re: Verbatim USB 4GB drive crashes parted, with 10 heads, 10 sectors/track
Date: Tue, 8 Mar 2011 10:34:20 -0800 (PST)

> Here was my  git command and the following build commands
> git clone git://git.debian.org/git/parted/parted.git

After cloning the repository you need to apply the patch from this
message:

http://lists.gnu.org/archive/html/bug-parted/2011-03/msg00000.html

Then you should have a version that won't throw an assertion.

Thanks,

Brian
~~~~~~~~~~~~~~~~~~~~~~~~~~
Thank you Brian,  I now have a patched version of parted that does not throw an assertion.   Question?,  the FDISK output says 10 heads, 10 sectors/track, 76533 cylinders,  Will parted work with these values?  Why was the assertion thrown? 10 heads  is greater than 0 and less than 63 heads.   10 sectors/track  seems like a reasonable number.   Is 76533 cylinders the value that is out of whack for the calculation formula?  ie 76533 is greater than a 2 byte number(ie 65K)?   If inside the Flash Disk, it uses LBA (logical Block Addressing) and the cylinder, heads, sectors, (CHS ) numbers from the FAT are not used,   maybe changing to 20 sectors/track would reduce the number of cylinders by half to 38266.5 (which will fit in a 2 byte number, ie 65K)
So maybe Verbatim, just picked another boneheaded number that does not fit the FAT32 specification, and parted should just throw( or ignore) an assertion.


Here are my test results with libparted/labels/dos.c file patched.

address@hidden ~/Downloads/gparted/parted/parted $ sudo ./parted /dev/sdc unit co print unit s print
Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 3918MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4129kB  3918MB  3914MB  primary  fat32        lba

Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 7653312s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Flags
 1      8064s  7653311s  7645248s  primary  fat32        lba
address@hidden ~/Downloads/gparted/parted/parted $ sudo ./parted /dev/sdc print unit s print unit chs print
Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 3918MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4129kB  3918MB  3914MB  primary  fat32        lba

Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 7653312s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End       Size      Type     File system  Flags
 1      8064s  7653311s  7645248s  primary  fat32        lba

Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 949,9,8
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 949,128,63.  Each cylinder is 4129kB.
Partition Table: msdos

Number  Start  End      Type     File system  Flags
 1      1,0,0  949,9,8  primary  fat32        lba

address@hidden ~/Downloads/gparted/parted/parted $

address@hidden ~/Downloads/gparted/parted/parted $ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 3918 MB, 3918495744 bytes
10 heads, 10 sectors/track, 76533 cylinders
Units = cylinders of 100 * 512 = 51200 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              81       76534     3822624    c  W95 FAT32 (LBA)
address@hidden ~/Downloads/gparted/parted/parted $


I attached a copy of the unaltered Verbatim 4GB FAT partition table of 32 * 512 byte blocks, for further testing by Jim Meyering.

Attachment: gparted_bad_pt_32
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]