|
From: | Jean-Christian de Rivaz |
Subject: | Re: _primary_constraint(): start_geom is uninitialized if min_geom==0 && cylinder_size < dev->length. Debian bug #602568 |
Date: | Tue, 09 Nov 2010 15:14:57 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.24 (X11/20100329) |
Jim Meyering a écrit :
Jean-Christian de Rivaz wrote: ...Your patch work fine, thank you for providing it. address@hidden:/home/jcdr/parted-git/parted/build-O0# parted/parted /dev/sdb print Model: disk2go PURE II (scsi) Disk /dev/sdb: 5243kB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 5120B 5243kB 5238kB primary The debug capture in attachment prove that your logic is the right one for this case. Now I just wonder if parted should display FAT16 in the file system field. Because fdisk do it: address@hidden:/home/jcdr/parted-git/parted/build-O0# fdisk -l /dev/sdb Disk /dev/sdb: 5 MB, 5242880 bytes 1 heads, 10 sectors/track, 1024 cylinders Units = cylinders of 10 * 512 = 5120 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 2 1024 5115 6 FAT16 And parted do it for the /dev/sdc (the regular storage device of this USB key): address@hidden:/home/jcdr/parted-git/parted/build-O0# parted/parted /dev/sdc print Model: disk2go PURE II (scsi) Disk /dev/sdc: 2142MB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00B 2142MB 2142MB fat16Perhaps it should, depending on what it means. Is it reporting just the magic number, or is it reporting the existence of a file system of that type? It seems that 4MiB is the minimum size of a FAT16 file system, and at 2.5MiB, yours is well under the minimum, so with the latter interpretation, parted is correct not to report it as one.
Sorry, I failed to find where this /deb/sdb1 partition is 2.5MiB in size. Seem to be 5.1MiB (5238kB, or (1024-2+1)*512*10/2.0**20=4.99MiB according to fdisk) to me ( > 4MiB ). This is also confirmed by the system while mounting the /deb/sdb1 partition:
address@hidden:/home/jcdr/parted-git/parted/build-O0# mount /dev/sdb1 /mnt address@hidden:/home/jcdr/parted-git/parted/build-O0# df -h /dev/sdb1 Filesystem Size Used Avail Use% Mounted on /dev/sdb1 5.0M 0 5.0M 0% /mntI also tryed with a FAT12 partition type witch is know to work for floppy disk as small as 720kiB and got the same result:
address@hidden:/home/jcdr/parted-git/parted/build-O0# fdisk -l /dev/sdb Disk /dev/sdb: 5 MB, 5242880 bytes 1 heads, 10 sectors/track, 1024 cylinders Units = cylinders of 10 * 512 = 5120 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 2 1024 5115 1 FAT12address@hidden:/home/jcdr/parted-git/parted/build-O0# parted/parted /dev/sdb print
Model: disk2go PURE II (scsi) Disk /dev/sdb: 5243kB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 5120B 5243kB 5238kB primaryNow you could argument that FAT12 is not supported by parted, but the FAT16 result on a 5MiB partition is still a strange result to me.
Jean-Christian de Rivaz
[Prev in Thread] | Current Thread | [Next in Thread] |