Bug 667514 - fdisk tries to start at cylinder 2048
Summary: fdisk tries to start at cylinder 2048
Status: RESOLVED INVALID
Alias: None
Product: openSUSE 11.4
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Factory
Hardware: i586 SUSE Other
: P3 - Medium : Normal with 1 vote (vote)
Target Milestone: ---
Assignee: Petr Uzel
QA Contact: E-mail List
URL:
Whiteboard: util-linux
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-27 01:57 UTC by Sid Boyce
Modified: 2011-03-24 00:32 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sid Boyce 2011-01-27 01:57:34 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13

Same problem on x86_64. I returned a SDHC as bad because of the problem on 3 x86_64 boxes.
Yesterday while partitioning a 160G IDE HD on the x86 I saw it again. I used cfdisk which worked.# rpm -qf /sbin/fdisk
util-linux-2.18.91-10.1.i586


Reproducible: Always

Steps to Reproduce:
1. fdisk /dev/sda
2. Tried setting primary partition 1.
3.
Actual Results:  
Insists 2048 is first cylinder and fails to set up 150G on a 160G HD.

Expected Results:  
Should start at first cylinder.
Comment 1 Petr Uzel 2011-01-27 07:36:45 UTC
Please provide output of " fdisk -u=sectors -l /dev/sda". Thanks
Comment 2 Sid Boyce 2011-01-27 15:58:46 UTC
# fdisk -u=sectors -l /dev/sda

Disk /dev/sda: 164.7 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders, total 321672960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b1acd

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   312496379   156248158+  83  Linux
/dev/sda2       312496380   321669494     4586557+  82  Linux swap / Solaris
Comment 3 Sid Boyce 2011-01-27 16:02:10 UTC
# cfdisk -Ps /dev/sda
Partition Table for /dev/sda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0   312496379     63   312496380 Linux (83)           Boot
 2 Primary   312496380   321669494      0     9173115 Linux swap / So (82) None
   Pri/Log   321669495   321672959*     0        3465*Free Space           None
Comment 4 Sid Boyce 2011-01-27 17:39:08 UTC
They seem to say the same thing, fdisk failed to partition the drive but cfdisk worked.
Comment 5 Petr Uzel 2011-01-28 07:39:59 UTC
I fail to understand what you think is wrong. The outputs of fdisk and cfdisk look fine to me (or did I overlook something?).

> fdisk failed to partition the drive but cfdisk worked.

Could you please elaborate more on this?
Comment 6 Sid Boyce 2011-01-28 09:35:27 UTC
# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                147G   55G   85G  39% /
devtmpfs              490M  428K  489M   1% /dev
tmpfs                 502M  4.0K  502M   1% /dev/shm
/dev/sda1             147G   55G   85G  39% /

Using fdisk to partition the drive, it thinks it's a much smaller drive. I could not get anywhere close to 147G, from memory it was about 1/2 the size available. With the 16GB SDHC it said the size was only 8GB.
fdisk is obviously correctly reading what was written by cfdisk, but it couldn't allocate it. It came up with insufficient space.
# rpm -qf /sbin/fdisk
util-linux-2.18.91-12.1.i586
Later I shall try repartitioning the old 80GB HD to see if it's been fixed with the updated util-linux.
Comment 7 Petr Uzel 2011-01-28 10:26:56 UTC
(In reply to comment #6)
> # df -h
> Filesystem            Size  Used Avail Use% Mounted on
> rootfs                147G   55G   85G  39% /
> devtmpfs              490M  428K  489M   1% /dev
> tmpfs                 502M  4.0K  502M   1% /dev/shm
> /dev/sda1             147G   55G   85G  39% /

OK, so if I understand correctly, you cannot achieve the above partition table with fdisk, so I assume you partitioned your drive by sth else than fdisk (cfdisk??), right?

> Using fdisk to partition the drive, it thinks it's a much smaller drive. I
> could not get anywhere close to 147G, from memory it was about 1/2 the size
> available. With the 16GB SDHC it said the size was only 8GB.
> fdisk is obviously correctly reading what was written by cfdisk, but it
> couldn't allocate it.

I would need complete transcript of the session where you are partitioning the drive (or SDHC card), preferably starting with the empty disk (no partitions). I still have no clue what's wrong...
Comment 8 Sid Boyce 2011-01-28 10:43:42 UTC
That's correct, I had to use cfdisk. Later today I shall try repartitioning the old HD using fdisk and provide full details of the session, assuming the problem hasn't been fixed in Milestone 6.
Comment 9 Petr Uzel 2011-01-28 11:29:19 UTC
OK, thanks.
Comment 10 Bernhard Wiedemann 2011-01-29 16:45:11 UTC
Sid, you need to be aware, that your 160GB HDD does not have 150 GiBibytes. only 149.01 as you can calculate with
160000000000/1024/1024/1024

It is intentional to start partitions at sector 2048 by default. While this wastes 1MB of space, this will work better with SSDs and modern 3TB HDDs with sectors of 4kB.

However, explicitly giving a 63 as starting sector results in 
"Value out of range." which could be considered a bug.
People want to use fdisk to partition small USB-sticks or disk-images for VMs, where wasting 1MB might not be wanted.

The other thing is that fdisk recently changed the default unit from cylinders to sectors, so where old fdisk showed a "1" , there would today be a "63".
Comment 11 Petr Uzel 2011-02-09 06:50:57 UTC
(In reply to comment #10)
> However, explicitly giving a 63 as starting sector results in 
> "Value out of range." which could be considered a bug.

I'll look into this.

@Sid: Apart from ^^^, is there anything else which you consider a bug?
Comment 12 Sid Boyce 2011-02-09 16:00:22 UTC
A later zypper dup in Milestone 5 seemed to have fixed it. Yesterday I was able to partition a 32G SDHC card without problems in Milestone 6.
Comment 13 Bernhard Wiedemann 2011-03-21 10:58:24 UTC
both 11.4 and Factory fdisk still can not create partitions starting at sector 63 which should be possible, even if the default is 2048.
Comment 14 Petr Uzel 2011-03-21 13:27:13 UTC
You have to start fdisk in DOS-compatible mode (which is off by default since cylinder alignment does not make sense in most cases these days):

# fdisk -c=dos /dev/sdd

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (with command 'c').
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 
Using default value 1
First sector (32-16383, default 32): 63
Last sector, +sectors or +size{K,M,G} (63-16383, default 16383): 
Using default value 16383

Command (m for help): p

Disk /dev/sdd: 8 MB, 8388608 bytes
8 heads, 32 sectors/track, 64 cylinders, total 16384 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 32768 bytes
Disk identifier: 0x0004ef76

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              63       16383        8160+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks
Comment 15 Sid Boyce 2011-03-21 14:20:05 UTC
# fdisk -c=dos /dev/sdf

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (with command 'c').
Command (m for help): p

Disk /dev/sdf: 33.6 GB, 33554432000 bytes
64 heads, 32 sectors/track, 32000 cylinders, total 65536000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004e19d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     2097184     1048576+  83  Linux
/dev/sdf2         2097185    65535999    31719407+  83  Linux

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): l

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx         
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility   
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs        
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT            
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1 80  Old Minix      
Hex code (type L to list codes): e
Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help): p

Disk /dev/sdf: 33.6 GB, 33554432000 bytes
64 heads, 32 sectors/track, 32000 cylinders, total 65536000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004e19d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     2097184     1048576+   e  W95 FAT16 (LBA)
/dev/sdf2         2097185    65535999    31719407+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
slipstream:/HAMRADIO/SDR/SoftRock/M0RZF # mkfs.vfat -F 16 /dev/sdf1
mkfs.vfat 3.0.10 (12 Sep 2010)
slipstream:/HAMRADIO/SDR/SoftRock/M0RZF # mkfs.ext4 /dev/sdf2
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1982464 inodes, 7929851 blocks
396492 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
242 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

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
slipstream:/HAMRADIO/SDR/SoftRock/M0RZF # sync
slipstream:/HAMRADIO/SDR/SoftRock/M0RZF # sync
slipstream:/HAMRADIO/SDR/SoftRock/M0RZF # fsck.ext4 /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Group descriptors look bad... trying backup blocks...
fsck.ext4: Bad magic number in super-block when using the backup blocks
fsck.ext4: going back to original superblock
Superblock has an invalid journal (inode 8).
Clear<y>? cancelled!
Comment 16 Sid Boyce 2011-03-21 14:22:55 UTC
Still seeing the problem as demonstrated above.
Comment 17 Bernhard Wiedemann 2011-03-21 14:27:22 UTC
The "error 16: Device or resource busy."
indicates that you had those partitions mounted before fdisk, so you can get arbitrary corruption from the kernel writing out old FS data to your disk. This is unrelated to fdisk.
you must umount before fdisk/mkfs
Comment 18 Petr Uzel 2011-03-21 14:37:16 UTC
(In reply to comment #17)
> The "error 16: Device or resource busy."
> indicates that you had those partitions mounted before fdisk, so you can get
> arbitrary corruption from the kernel writing out old FS data to your disk. This
> is unrelated to fdisk.
> you must umount before fdisk/mkfs

Or reboot after fdisk as suggested, 
...
or use parted, which isn't as strict wrt mounted partitions (uses different logic to inform the kernel about partition table changes).
Comment 19 Sid Boyce 2011-03-21 14:39:10 UTC
Still seeing the problem as demonstrated above.
Comment 20 Sid Boyce 2011-03-21 14:42:50 UTC
That's the problem, the /dev/sdf partitions weren't mounted.
I can delete the partitions, do a write, then do fdisk again and set up new partitions, mkfs and afterwards I get the same errors when I run fsck.
Comment 21 Petr Uzel 2011-03-21 14:46:31 UTC
(In reply to comment #20)
> That's the problem, the /dev/sdf partitions weren't mounted.
> I can delete the partitions, do a write, then do fdisk again and set up new
> partitions, mkfs and afterwards I get the same errors when I run fsck.

Is fdisk complaining that "Re-reading the partition table failed" even if none of the partitions on sdf is mounted?
Comment 22 Petr Uzel 2011-03-21 14:48:36 UTC
... if so, please reboot after fdisk and try again. Does it help?
If not, reopen new bugreport and assign to me. Thx.
Comment 23 Sid Boyce 2011-03-21 23:14:59 UTC
That's the problem, the /dev/sdf partitions weren't mounted.
I can delete the partitions, do a write, then do fdisk again and set up new partitions, mkfs and afterwards I get the same errors when I run fsck.
Comment 24 Sid Boyce 2011-03-21 23:25:23 UTC
Rebooting or moving the SD to another system doesn't help. Either way round, creating with openSUSE and trying to mount on Kubuntu or creating on Kubuntu and trying to mount on openSUSE.
Also on the same system, same results. I'll get a new reader and try that, if it fails I'll open another bug.
Comment 25 Petr Uzel 2011-03-22 08:45:42 UTC
(In reply to comment #24)
> Rebooting or moving the SD to another system doesn't help. Either way round,
> creating with openSUSE and trying to mount on Kubuntu or creating on Kubuntu
> and trying to mount on openSUSE.

I'm not sure I understand correctly the steps you did/want to do. AFAIU, you are trying to 
1/ create new parition (or modify existing one) on SDHC card with fdisk
2/ mkfs.ext4 
3/ fsck.ext4
4/ mount it

But the problem is that 3/ fails (as in comment #15). Is this right?
If it is [*], please

1/ make sure none of the partitions on the SDHC card is mounted (check in /proc/mounts)
2/ run fdisk and let me know if it complains that "Re-reading the partition table failed"
3/ reboot, to be sure that kernel rereads the partition table 
4/ run fsck.ext4 with "-c" - this will scan for bad blocks on the card (I suspect this might be HW issue).
5/ post here any interesting output form fsck
6/ try to mount the partition

[*] and if not, please be more verbose in describing what you tried, expected and what failed. Thanks.
Comment 26 Sid Boyce 2011-03-22 11:49:19 UTC
Rebooting or moving the SD to another system doesn't help. Either way round, creating with openSUSE and trying to mount on Kubuntu or creating on Kubuntu and trying to mount on openSUSE.
Also on the same system, same results. I'll get a new reader and try that, if it fails I'll open another bug.
Comment 27 Petr Uzel 2011-03-22 11:58:26 UTC
Sid, sorry, but repeating the same comment again won't help. Please reopen if you can provide information requested in comment #25. Thanks.
Comment 28 Sid Boyce 2011-03-22 12:07:12 UTC
I created the partitions on openSUSE. I suspect the card reader is not capable. Yesterday I contacted maplin.co.uk about a reader that was advertised as supporting every type of card, asking if it could write 16/32GB microSD cards and the answer was no. It would seem many of these readers are crippled.
The following transaction is exactly what happens:-
# fdisk /dev/sdf

Command (m for help): p

Disk /dev/sdf: 33.6 GB, 33554432000 bytes
64 heads, 32 sectors/track, 32000 cylinders, total 65536000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004e19d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          32     2097184     1048576+   e  W95 FAT16 (LBA)
/dev/sdf2         2097185    65535999    31719407+  83  Linux

Command (m for help): q

slipstream:/home/lancelot # fsck.ext4 -c /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sdf2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

slipstream:/home/lancelot # e2fsck -b 8193 /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Bad magic number in super-block while trying to open /dev/sdf2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

slipstream:/home/lancelot # mkfs.ext4 /dev/sdf2
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1982464 inodes, 7929851 blocks
396492 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
242 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

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

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

**** Nothing on /dev/sdf is mounted *****
slipstream:/home/lancelot # cat /proc/mounts
rootfs / rootfs rw 0 0
devtmpfs /dev devtmpfs rw,relatime,size=4055604k,nr_inodes=1013901,mode=755 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/sda2 / xfs rw,relatime,attr2,noquota 0 0
proc /proc proc rw,relatime 0 0
none /lib/bootchart/tmpfs tmpfs rw,nosuid,noexec,relatime 0 0
none /lib/bootchart/tmpfs/proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/sda1 /boot reiserfs rw,relatime,acl,user_xattr 0 0
/dev/sdb1 /home/lancelot/ftp reiserfs rw,relatime 0 0
none /tmp tmpfs rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
proc /var/lib/ntp/proc proc ro,nosuid,nodev,relatime 0 0
none /lib/bootchart/tmpfs tmpfs rw,nosuid,noexec,relatime 0 0

slipstream:/home/lancelot # fsck.ext4 -c /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Group descriptors look bad... trying backup blocks...
fsck.ext4: Bad magic number in super-block when using the backup blocks
fsck.ext4: going back to original superblock
Superblock has an invalid journal (inode 8).
Clear<y>? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

One or more block group descriptor checksums are invalid.  Fix<y>? yes

Group descriptor 0 checksum is invalid.  FIXED.
Group descriptor 1 checksum is invalid.  FIXED.
Group descriptor 2 checksum is invalid.  FIXED.
Group descriptor 3 checksum is invalid.  FIXED.
Group descriptor 4 checksum is invalid.  FIXED.
Group descriptor 5 checksum is invalid.  FIXED.
Group descriptor 6 checksum is invalid.  FIXED.
Group descriptor 7 checksum is invalid.  FIXED.
Group descriptor 8 checksum is invalid.  FIXED.
Group descriptor 9 checksum is invalid.  FIXED.
Group descriptor 10 checksum is invalid.  FIXED.
Group descriptor 11 checksum is invalid.  FIXED.
Group descriptor 12 checksum is invalid.  FIXED.
Group descriptor 13 checksum is invalid.  FIXED.
Group descriptor 14 checksum is invalid.  FIXED.
Group descriptor 15 checksum is invalid.  FIXED.
Group descriptor 16 checksum is invalid.  FIXED.
Group descriptor 17 checksum is invalid.  FIXED.
Group descriptor 18 checksum is invalid.  FIXED.
Group descriptor 19 checksum is invalid.  FIXED.
Group descriptor 20 checksum is invalid.  FIXED.
Group descriptor 21 checksum is invalid.  FIXED.
Group descriptor 22 checksum is invalid.  FIXED.
Group descriptor 23 checksum is invalid.  FIXED.
Group descriptor 24 checksum is invalid.  FIXED.
Group descriptor 25 checksum is invalid.  FIXED.
Group descriptor 26 checksum is invalid.  FIXED.
Group descriptor 27 checksum is invalid.  FIXED.
Group descriptor 28 checksum is invalid.  FIXED.
Group descriptor 29 checksum is invalid.  FIXED.
Group descriptor 30 checksum is invalid.  FIXED.
Group descriptor 31 checksum is invalid.  FIXED.
Group descriptor 32 checksum is invalid.  FIXED.
Group descriptor 33 checksum is invalid.  FIXED.
Group descriptor 34 checksum is invalid.  FIXED.
Group descriptor 35 checksum is invalid.  FIXED.
Group descriptor 36 checksum is invalid.  FIXED.
Group descriptor 37 checksum is invalid.  FIXED.
Group descriptor 38 checksum is invalid.  FIXED.
Group descriptor 39 checksum is invalid.  FIXED.
Group descriptor 40 checksum is invalid.  FIXED.
Group descriptor 41 checksum is invalid.  FIXED.
Group descriptor 42 checksum is invalid.  FIXED.
Group descriptor 43 checksum is invalid.  FIXED.
Group descriptor 44 checksum is invalid.  FIXED.
Group descriptor 45 checksum is invalid.  FIXED.
Group descriptor 46 checksum is invalid.  FIXED.
Group descriptor 47 checksum is invalid.  FIXED.
Group descriptor 48 checksum is invalid.  FIXED.
Group descriptor 49 checksum is invalid.  FIXED.
Group descriptor 50 checksum is invalid.  FIXED.
Group descriptor 51 checksum is invalid.  FIXED.
Group descriptor 52 checksum is invalid.  FIXED.
Group descriptor 53 checksum is invalid.  FIXED.
Group descriptor 54 checksum is invalid.  FIXED.
Group descriptor 55 checksum is invalid.  FIXED.
Group descriptor 56 checksum is invalid.  FIXED.
Group descriptor 57 checksum is invalid.  FIXED.
Group descriptor 58 checksum is invalid.  FIXED.
Group descriptor 59 checksum is invalid.  FIXED.
Group descriptor 60 checksum is invalid.  FIXED.
Group descriptor 61 checksum is invalid.  FIXED.
Group descriptor 62 checksum is invalid.  FIXED.
Group descriptor 63 checksum is invalid.  FIXED.
Group descriptor 64 checksum is invalid.  FIXED.
Group descriptor 65 checksum is invalid.  FIXED.
Group descriptor 66 checksum is invalid.  FIXED.
Group descriptor 67 checksum is invalid.  FIXED.
Group descriptor 68 checksum is invalid.  FIXED.
Group descriptor 69 checksum is invalid.  FIXED.
Group descriptor 70 checksum is invalid.  FIXED.
Group descriptor 71 checksum is invalid.  FIXED.
Group descriptor 72 checksum is invalid.  FIXED.
Group descriptor 73 checksum is invalid.  FIXED.
Group descriptor 74 checksum is invalid.  FIXED.
Group descriptor 75 checksum is invalid.  FIXED.
Group descriptor 76 checksum is invalid.  FIXED.
Group descriptor 77 checksum is invalid.  FIXED.
Group descriptor 78 checksum is invalid.  FIXED.
Group descriptor 79 checksum is invalid.  FIXED.
Group descriptor 80 checksum is invalid.  FIXED.
Group descriptor 81 checksum is invalid.  FIXED.
Group descriptor 82 checksum is invalid.  FIXED.
Group descriptor 83 checksum is invalid.  FIXED.
Group descriptor 84 checksum is invalid.  FIXED.
Group descriptor 85 checksum is invalid.  FIXED.
Group descriptor 86 checksum is invalid.  FIXED.
Group descriptor 87 checksum is invalid.  FIXED.
Group descriptor 88 checksum is invalid.  FIXED.
Group descriptor 89 checksum is invalid.  FIXED.
Group descriptor 90 checksum is invalid.  FIXED.
Group descriptor 91 checksum is invalid.  FIXED.
Group descriptor 92 checksum is invalid.  FIXED.
Group descriptor 93 checksum is invalid.  FIXED.
Group descriptor 94 checksum is invalid.  FIXED.
Group descriptor 95 checksum is invalid.  FIXED.
Group descriptor 96 checksum is invalid.  FIXED.
Group descriptor 97 checksum is invalid.  FIXED.
Group descriptor 98 checksum is invalid.  FIXED.
Group descriptor 99 checksum is invalid.  FIXED.
Group descriptor 100 checksum is invalid.  FIXED.
Group descriptor 101 checksum is invalid.  FIXED.
Group descriptor 102 checksum is invalid.  FIXED.
Group descriptor 103 checksum is invalid.  FIXED.
Group descriptor 104 checksum is invalid.  FIXED.
Group descriptor 105 checksum is invalid.  FIXED.
Group descriptor 106 checksum is invalid.  FIXED.
Group descriptor 107 checksum is invalid.  FIXED.
Group descriptor 108 checksum is invalid.  FIXED.
Group descriptor 109 checksum is invalid.  FIXED.
Group descriptor 110 checksum is invalid.  FIXED.
Group descriptor 111 checksum is invalid.  FIXED.
Group descriptor 112 checksum is invalid.  FIXED.
Group descriptor 113 checksum is invalid.  FIXED.
Group descriptor 114 checksum is invalid.  FIXED.
Group descriptor 115 checksum is invalid.  FIXED.
Group descriptor 116 checksum is invalid.  FIXED.
Group descriptor 117 checksum is invalid.  FIXED.
Group descriptor 118 checksum is invalid.  FIXED.
Group descriptor 119 checksum is invalid.  FIXED.
Group descriptor 120 checksum is invalid.  FIXED.
Group descriptor 121 checksum is invalid.  FIXED.
Group descriptor 122 checksum is invalid.  FIXED.
Group descriptor 123 checksum is invalid.  FIXED.
Group descriptor 124 checksum is invalid.  FIXED.
Group descriptor 125 checksum is invalid.  FIXED.
Group descriptor 126 checksum is invalid.  FIXED.
Group descriptor 127 checksum is invalid.  FIXED.
Group descriptor 128 checksum is invalid.  FIXED.
Group descriptor 129 checksum is invalid.  FIXED.
Group descriptor 130 checksum is invalid.  FIXED.
Group descriptor 131 checksum is invalid.  FIXED.
Group descriptor 132 checksum is invalid.  FIXED.
Group descriptor 133 checksum is invalid.  FIXED.
Group descriptor 134 checksum is invalid.  FIXED.
Group descriptor 135 checksum is invalid.  FIXED.
Group descriptor 136 checksum is invalid.  FIXED.
Group descriptor 137 checksum is invalid.  FIXED.
Group descriptor 138 checksum is invalid.  FIXED.
Group descriptor 139 checksum is invalid.  FIXED.
Group descriptor 140 checksum is invalid.  FIXED.
Group descriptor 141 checksum is invalid.  FIXED.
Group descriptor 142 checksum is invalid.  FIXED.
Group descriptor 143 checksum is invalid.  FIXED.
Group descriptor 144 checksum is invalid.  FIXED.
Group descriptor 145 checksum is invalid.  FIXED.
Group descriptor 146 checksum is invalid.  FIXED.
Group descriptor 147 checksum is invalid.  FIXED.
Group descriptor 148 checksum is invalid.  FIXED.
Group descriptor 149 checksum is invalid.  FIXED.
Group descriptor 150 checksum is invalid.  FIXED.
Group descriptor 151 checksum is invalid.  FIXED.
Group descriptor 152 checksum is invalid.  FIXED.
Group descriptor 153 checksum is invalid.  FIXED.
Group descriptor 154 checksum is invalid.  FIXED.
Group descriptor 155 checksum is invalid.  FIXED.
Group descriptor 156 checksum is invalid.  FIXED.
Group descriptor 157 checksum is invalid.  FIXED.
Group descriptor 158 checksum is invalid.  FIXED.
Group descriptor 159 checksum is invalid.  FIXED.
Group descriptor 160 checksum is invalid.  FIXED.
Group descriptor 161 checksum is invalid.  FIXED.
Group descriptor 162 checksum is invalid.  FIXED.
Group descriptor 163 checksum is invalid.  FIXED.
Group descriptor 164 checksum is invalid.  FIXED.
Group descriptor 165 checksum is invalid.  FIXED.
Group descriptor 166 checksum is invalid.  FIXED.
Group descriptor 167 checksum is invalid.  FIXED.
Group descriptor 168 checksum is invalid.  FIXED.
Group descriptor 169 checksum is invalid.  FIXED.
Group descriptor 170 checksum is invalid.  FIXED.
Group descriptor 171 checksum is invalid.  FIXED.
Group descriptor 172 checksum is invalid.  FIXED.
Group descriptor 173 checksum is invalid.  FIXED.
Group descriptor 174 checksum is invalid.  FIXED.
Group descriptor 175 checksum is invalid.  FIXED.
Group descriptor 176 checksum is invalid.  FIXED.
Group descriptor 177 checksum is invalid.  FIXED.
Group descriptor 178 checksum is invalid.  FIXED.
Group descriptor 179 checksum is invalid.  FIXED.
Group descriptor 180 checksum is invalid.  FIXED.
Group descriptor 181 checksum is invalid.  FIXED.
Group descriptor 182 checksum is invalid.  FIXED.
Group descriptor 183 checksum is invalid.  FIXED.
Group descriptor 184 checksum is invalid.  FIXED.
Group descriptor 185 checksum is invalid.  FIXED.
Group descriptor 186 checksum is invalid.  FIXED.
Group descriptor 187 checksum is invalid.  FIXED.
Group descriptor 188 checksum is invalid.  FIXED.
Group descriptor 189 checksum is invalid.  FIXED.
Group descriptor 190 checksum is invalid.  FIXED.
Group descriptor 191 checksum is invalid.  FIXED.
Group descriptor 192 checksum is invalid.  FIXED.
Group descriptor 193 checksum is invalid.  FIXED.
Group descriptor 194 checksum is invalid.  FIXED.
Group descriptor 195 checksum is invalid.  FIXED.
Group descriptor 196 checksum is invalid.  FIXED.
Group descriptor 197 checksum is invalid.  FIXED.
Group descriptor 198 checksum is invalid.  FIXED.
Group descriptor 199 checksum is invalid.  FIXED.
Group descriptor 200 checksum is invalid.  FIXED.
Group descriptor 201 checksum is invalid.  FIXED.
Group descriptor 202 checksum is invalid.  FIXED.
Group descriptor 203 checksum is invalid.  FIXED.
Group descriptor 204 checksum is invalid.  FIXED.
Group descriptor 205 checksum is invalid.  FIXED.
Group descriptor 206 checksum is invalid.  FIXED.
Group descriptor 207 checksum is invalid.  FIXED.
Group descriptor 208 checksum is invalid.  FIXED.
Group descriptor 209 checksum is invalid.  FIXED.
Group descriptor 210 checksum is invalid.  FIXED.
Group descriptor 211 checksum is invalid.  FIXED.
Group descriptor 212 checksum is invalid.  FIXED.
Group descriptor 213 checksum is invalid.  FIXED.
Group descriptor 214 checksum is invalid.  FIXED.
Group descriptor 215 checksum is invalid.  FIXED.
Group descriptor 216 checksum is invalid.  FIXED.
Group descriptor 217 checksum is invalid.  FIXED.
Group descriptor 218 checksum is invalid.  FIXED.
Group descriptor 219 checksum is invalid.  FIXED.
Group descriptor 220 checksum is invalid.  FIXED.
Group descriptor 221 checksum is invalid.  FIXED.
Group descriptor 222 checksum is invalid.  FIXED.
Group descriptor 223 checksum is invalid.  FIXED.
Group descriptor 224 checksum is invalid.  FIXED.
Group descriptor 225 checksum is invalid.  FIXED.
Group descriptor 226 checksum is invalid.  FIXED.
Group descriptor 227 checksum is invalid.  FIXED.
Group descriptor 228 checksum is invalid.  FIXED.
Group descriptor 229 checksum is invalid.  FIXED.
Group descriptor 230 checksum is invalid.  FIXED.
Group descriptor 231 checksum is invalid.  FIXED.
Group descriptor 232 checksum is invalid.  FIXED.
Group descriptor 233 checksum is invalid.  FIXED.
Group descriptor 234 checksum is invalid.  FIXED.
Group descriptor 235 checksum is invalid.  FIXED.
Group descriptor 236 checksum is invalid.  FIXED.
Group descriptor 237 checksum is invalid.  FIXED.
Group descriptor 238 checksum is invalid.  FIXED.
Group descriptor 239 checksum is invalid.  FIXED.
Group descriptor 240 checksum is invalid.  FIXED.
Group descriptor 241 checksum is invalid.  FIXED.
fsck.ext4: e2fsck_read_bitmaps: illegal bitmap block(s) for /dev/sdf2
slipstream:/home/lancelot # 

**** And here we go again *** Must be the reader.
slipstream:/home/lancelot # fsck.ext4 -c /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Group descriptors look bad... trying backup blocks...
fsck.ext4: Bad magic number in super-block when using the backup blocks
fsck.ext4: going back to original superblock
Superblock has an invalid journal (inode 8).
Clear<y>?
Comment 29 Sid Boyce 2011-03-22 12:09:51 UTC
slipstream:/home/lancelot # e2fsck -c /dev/sdf2
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Group descriptors look bad... trying backup blocks...
e2fsck: Bad magic number in super-block when using the backup blocks
e2fsck: going back to original superblock
Superblock has an invalid journal (inode 8).
Clear<y>?
Comment 30 Sid Boyce 2011-03-22 12:14:58 UTC
I'm going to buy a new reader that comes with a 32GB microSD card. I know it's not the media as I get the same errors with the 16GB or the 32GB card.
I've seen some readers supplied with different sizes of cards, so perhaps that's the limit of what these cards can do.
Comment 31 Bernhard Wiedemann 2011-03-22 12:30:44 UTC
Sid, can you please
cat /proc/mounts
before the fdisk, and check the output - because KDE could mount the sd-card on insertion which could cause all this trouble.
Comment 32 Sid Boyce 2011-03-22 16:22:21 UTC
I'm going to buy a new reader that comes with a 32GB microSD card. I know it's not the media as I get the same errors with the 16GB or the 32GB card.
I've seen some readers supplied with different sizes of cards, so perhaps that's the limit of what these cards can do.
Comment 33 Sid Boyce 2011-03-22 16:29:04 UTC
I'm going to buy a new reader that comes with a 32GB microSD card. I know it's not the media as I get the same errors with the 16GB or the 32GB card.
I've seen some readers supplied with different sizes of cards, so perhaps that's the limit of what these cards can do.
Comment 34 Sid Boyce 2011-03-22 16:39:19 UTC
# cat /proc/mounts|grep sdf
slipstream:/home/lancelot # 
slipstream:/home/lancelot # mount /dev/sdf1 /1
slipstream:/home/lancelot # mount /dev/sdf2 /2
mount: wrong fs type, bad option, bad superblock on /dev/sdf2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

# cat /proc/mounts|grep sdf
/dev/sdf1 /1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0

Ovbiously I can't create a valid filesystem on /dev/sdf2, so it seems the hardware can't handle the 32GB card or a 16 GB card.
Comment 35 Petr Uzel 2011-03-23 16:07:14 UTC
So this really looks like a HW issue - closing.

Sid, if you encounter this again with different reader, please reopen. Otherwise we can hardly do anything about it.
Comment 36 Sid Boyce 2011-03-24 00:32:11 UTC
Thanks, will do.