Re: Troubleshooting pendrive ext2fs

2009-08-19 Thread Casimiro de Almeida Barreto
Discovered the problem:

The pendrive is a counterfeit. VID=1043 PDI=8012 does not correspond to
Kingston (iChips ???).

Somehow it is capable of storing 16GBytes of data (I recorded a file and
then unconnected the pendrive and reconnected it and verified the
content via cat $FILE | md5sum > /tmp/check.md5...

Device readily sent to police, so they'll ask the store how it appeared
there.

Sorry for the inconvenience.

CdAB

Em 18-08-2009 19:18, Casimiro de Almeida Barreto escreveu:
> Hello,
>
> I've trouble creating an ext2/ext3/ext4 file system in a 64GBytes pendrive.
>
> The device appears at /proc/bus/usb/devices as:
>
> T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=1043 ProdID=8012 Rev= 1.00
> S:  Manufacturer=Generic
> S:  Product=Flash Disk
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
> It's partioned as:
>
> Disk /dev/sdd: 67.1 GB, 67108864512 bytes
> 64 heads, 32 sectors/track, 64000 cylinders
> Units = cilindros of 2048 * 512 = 1048576 bytes
> Disk identifier: 0x4a26a3ed
>
> Dispositivo Boot  Start End  Blocks   Id  System
> /dev/sdd1   1   6400065535984   83  Linux
>
> And raw partition table data is:
>
> Disk /dev/sdd: 64 heads, 32 sectors, 64000 cylinders
>
> Nr AF  Hd Sec  Cyl  Hd Sec  Cyl Start  Size ID
>  1 00   1   10  63  32 1023 32  131071968 83
>  2 00   0   00   0   00  0  0 00
>  3 00   0   00   0   00  0  0 00
>  4 00   0   00   0   00  0  0 00
>
> Disk was formatted with the following command:
>
> [r...@localhost ~]# mkfs.ext2 -L kingston -M /media/kingston -O
> large_file,extent /dev/sdd1
> mke2fs 1.41.4 (27-Jan-2009)
> Filesystem label=kingston
> OS type: Linux
> Block size=4096 (log=2)
> Fragment size=4096 (log=2)
> 4096000 inodes, 16383996 blocks
> 819199 blocks (5.00%) reserved for the super user
> First data block=0
> Maximum filesystem blocks=0
> 500 block groups
> 32768 blocks per group, 32768 fragments per group
> 8192 inodes per group
> Superblock backups stored on blocks:
> 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
> 4096000, 7962624, 11239424
>
> Writing inode tables: done   
> Writing superblocks and filesystem accounting information: done
>
> This filesystem will be automatically checked every 33 mounts or
> 180 days, whichever comes first.  Use tune2fs -c or -i to override.
>
> And then checked:
>
> # fsck -f -v /dev/sdd1
>
> Resulting in:
>
> [r...@localhost ~]# fsck -v -f /dev/sdd1
> fsck 1.41.4 (27-Jan-2009)
> e2fsck 1.41.4 (27-Jan-2009)
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Pass 5: Checking group summary information
> Block bitmap differences:  +(32768--34306) +(65536--66049)
> +(98304--99842) +(131072--131585) +(163840--165378) +(196608--197121)
> +(229376--230914) +(262144--262657) +(294912--296450) +(327680--328193)
> +(360448--360961) +(393216--393729) +(425984--426497) +(458752--459265)
> +(491520--492033) +(524288--524801) +(557056--557569) +(589824--590337)
> +(622592--623105) +(655360--655873) +(688128--688641) +(720896--721409)
> +(753664--754177) +(786432--786945) +(819200--820738) +(851968--852481)
> +(884736--886274) +(917504--918017) +(950272--950785) +(983040--983553)
> +(1015808--1016321) +(1048576--1049089) +(1081344--1081857)
> +(1114112--1114625) +(1146880--1147393) +(1179648--1180161)
> +(1212416--1212929) +(1245184--1245697) +(1277952--1278465)
> +(1310720--1311233) +(1343488--1344001) +(1376256--1376769)
> +(1409024--1409537) +(1441792--1442305) +(1474560--1475073)
> +(1507328--1507841) +(1540096--1540609) +(1572864--1573377)
> +(1605632--1607170) +(1638400--1638913) +(1671168--1671681)
> +(1703936--1704449) +(1736704--1737217) +(1769472--1769985)
> +(1802240--1802753) +(1835008--1835521) +(1867776--1868289)
> +(1900544--1901057) +(1933312--1933825) +(1966080--1966593)
> +(1998848--1999361) +(2031616--2032129) +(2064384--2064897)
> +(2097152--2097665) +(2129920--2130433) +(2162688--2163201)
> +(2195456--2195969) +(2228224--2228737) +(2260992--2261505)
> +(2293760--2294273) +(2326528--2327041) +(2359296--2359809)
> +(2392064--2392577) +(2424832--2425345) +(2457600--2458113)
> +(2490368--2490881) +(2523136--2523649) +(2555904--2556417)
> +(2588672--2589185) +(2621440--2621953) +(2654208--2655746)
> +(2686976--2687489) +(2719744--2720257) +(2752512--2753025)
> +(2785280--2785793) +(2818048--2818561) +(2850816--2851329)
> +(2883584--2884097) +(2916352--2916865) +(2949120--2949633)
> +(2981888--2982401) +(3014656--3015169) +(3047424--3047937)
> +(3080192--3080705) +(3112960--3113473

Troubleshooting pendrive ext2fs

2009-08-18 Thread Casimiro de Almeida Barreto
Hello,

I've trouble creating an ext2/ext3/ext4 file system in a 64GBytes pendrive.

The device appears at /proc/bus/usb/devices as:

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1043 ProdID=8012 Rev= 1.00
S:  Manufacturer=Generic
S:  Product=Flash Disk
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

It's partioned as:

Disk /dev/sdd: 67.1 GB, 67108864512 bytes
64 heads, 32 sectors/track, 64000 cylinders
Units = cilindros of 2048 * 512 = 1048576 bytes
Disk identifier: 0x4a26a3ed

Dispositivo Boot  Start End  Blocks   Id  System
/dev/sdd1   1   6400065535984   83  Linux

And raw partition table data is:

Disk /dev/sdd: 64 heads, 32 sectors, 64000 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl Start  Size ID
 1 00   1   10  63  32 1023 32  131071968 83
 2 00   0   00   0   00  0  0 00
 3 00   0   00   0   00  0  0 00
 4 00   0   00   0   00  0  0 00

Disk was formatted with the following command:

[r...@localhost ~]# mkfs.ext2 -L kingston -M /media/kingston -O
large_file,extent /dev/sdd1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=kingston
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
4096000 inodes, 16383996 blocks
819199 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
500 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done   
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

And then checked:

# fsck -f -v /dev/sdd1

Resulting in:

[r...@localhost ~]# fsck -v -f /dev/sdd1
fsck 1.41.4 (27-Jan-2009)
e2fsck 1.41.4 (27-Jan-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  +(32768--34306) +(65536--66049)
+(98304--99842) +(131072--131585) +(163840--165378) +(196608--197121)
+(229376--230914) +(262144--262657) +(294912--296450) +(327680--328193)
+(360448--360961) +(393216--393729) +(425984--426497) +(458752--459265)
+(491520--492033) +(524288--524801) +(557056--557569) +(589824--590337)
+(622592--623105) +(655360--655873) +(688128--688641) +(720896--721409)
+(753664--754177) +(786432--786945) +(819200--820738) +(851968--852481)
+(884736--886274) +(917504--918017) +(950272--950785) +(983040--983553)
+(1015808--1016321) +(1048576--1049089) +(1081344--1081857)
+(1114112--1114625) +(1146880--1147393) +(1179648--1180161)
+(1212416--1212929) +(1245184--1245697) +(1277952--1278465)
+(1310720--1311233) +(1343488--1344001) +(1376256--1376769)
+(1409024--1409537) +(1441792--1442305) +(1474560--1475073)
+(1507328--1507841) +(1540096--1540609) +(1572864--1573377)
+(1605632--1607170) +(1638400--1638913) +(1671168--1671681)
+(1703936--1704449) +(1736704--1737217) +(1769472--1769985)
+(1802240--1802753) +(1835008--1835521) +(1867776--1868289)
+(1900544--1901057) +(1933312--1933825) +(1966080--1966593)
+(1998848--1999361) +(2031616--2032129) +(2064384--2064897)
+(2097152--2097665) +(2129920--2130433) +(2162688--2163201)
+(2195456--2195969) +(2228224--2228737) +(2260992--2261505)
+(2293760--2294273) +(2326528--2327041) +(2359296--2359809)
+(2392064--2392577) +(2424832--2425345) +(2457600--2458113)
+(2490368--2490881) +(2523136--2523649) +(2555904--2556417)
+(2588672--2589185) +(2621440--2621953) +(2654208--2655746)
+(2686976--2687489) +(2719744--2720257) +(2752512--2753025)
+(2785280--2785793) +(2818048--2818561) +(2850816--2851329)
+(2883584--2884097) +(2916352--2916865) +(2949120--2949633)
+(2981888--2982401) +(3014656--3015169) +(3047424--3047937)
+(3080192--3080705) +(3112960--3113473) +(3145728--3146241)
+(3178496--3179009) +(3211264--3211777) +(3244032--3244545)
+(3276800--3277313) +(3309568--3310081) +(3342336--3342849)
+(3375104--3375617) +(3407872--3408385) +(3440640--3441153)
+(3473408--3473921) +(3506176--3506689) +(3538944--3539457)
+(3571712--3572225) +(3604480--3604993) +(3637248--3637761)
+(3670016--3670529) +(3702784--3703297) +(3735552--3736065)
+(3768320--3768833) +(3801088--3801601) +(3833856--3834369)
+(3866624--3867137) +(3899392--3899905) +(3932160--3932673)
+(3964928--3965441) +(3997696--3998209) +(4030464--4030977)
+(4063232--4063745) +(4096000--4097538) +(4128768--4129281)
+(4161536--4162049) +(4194304--4194817) +(4227072--4227585)