2

I have tried with four different SDHC cards. The first set of two were 8 GB and the second set were 32 GB.

Using GParted, I tried to partition in the following manner:

I tried to make one boot partition of 65 MiB FAT32, and the second to fill the remaining space of type ext4.

No matter if I do this via GParted or via the BeagleBoardUbuntu script (sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle) I have the same problem.

The first boot partition will be fine, but every other partition will not be. It will not automount as the first partition does and comes up with the following errors:

swamprat@swamprat-O-E-M:~/ubuntu-11.04-r1-minimal-armel$ sudo ./setup_sdcard.sh --mmc /dev/sdd --uboot beagle
[sudo] password for swamprat:

I see...
fdisk -l:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
Disk /dev/sdd: 33.6 GB, 33554432000 bytes

mount:
/dev/sda5 on / type ext4 (rw,errors=remount-ro,commit=0)
/dev/sda6 on /home type ext4 (rw,commit=0)
/dev/sda7 on /virt type ext4 (rw,commit=0)

Are you 100% sure, on selecting [/dev/sdd] (y/n)? y


1 / 9: Downloading X-loader and Uboot
2011-06-21 16:30:48 URL:http://rcn-ee.net/deb/tools/latest/bootloader [1936/1936] -> "/tmp/tmp.ngjOoVvqe3/dl/bootloader" [1]
2011-06-21 16:30:49 URL:http://rcn-ee.net/deb/tools/MLO/MLO-beagleboard-1.5.0+r22+gitrb6bbfe7848de547b64edf1c363c86cec4921b517-r22 [23716/23716] -> "/tmp/tmp.ngjOoVvqe3/dl/MLO-beagleboard-1.5.0+r22+gitrb6bbfe7848de547b64edf1c363c86cec4921b517-r22" [1]
2011-06-21 16:30:52 URL:http://rcn-ee.net/deb/tools/UBOOT/u-boot-beagleboard-2011.02+r75+gitrc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8-r75.bin [284788/284788] -> "/tmp/tmp.ngjOoVvqe3/dl/u-boot-beagleboard-2011.02+r75+gitrc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8-r75.bin" [1]

2 / 9: Unmountting Partitions

3 / 9: Creating Boot Partition

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-32000, default 1): Last cylinder, +cylinders or +size{K,M,G} (1-32000, default 32000):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to e (W95 FAT16 (LBA))

Command (m for help):
Disk /dev/sdd: 33.6 GB, 33554432000 bytes
64 heads, 32 sectors/track, 32000 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00044167

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1          65       66544    e  W95 FAT16 (LBA)

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

Calling ioctl() to re-read partition table.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

4 / 9: Creating ext4 Partition

5 / 9: Formatting Boot Partition
mkfs.vfat 3.0.9 (31 Jan 2010)

6 / 9: Formatting ext4 Partition
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
2044000 inodes, 8175360 blocks
408768 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
250 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624

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

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

7 / 9: Populating Boot Partition
`/tmp/tmp.ngjOoVvqe3/dl/MLO-beagleboard-1.5.0+r22+gitrb6bbfe7848de547b64edf1c363c86cec4921b517-r22' -> `/tmp/tmp.ngjOoVvqe3/disk/MLO'
`/tmp/tmp.ngjOoVvqe3/dl/u-boot-beagleboard-2011.02+r75+gitrc7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8-r75.bin' -> `/tmp/tmp.ngjOoVvqe3/disk/u-boot.bin'
uImage
Image Name:   2.6.39-x1
Created:      Tue Jun 21 16:31:46 2011
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3254748 Bytes = 3178.46 kB = 3.10 MB
Load Address: 80008000
Entry Point:  80008000
uInitrd
Image Name:   initramfs
Created:      Tue Jun 21 16:31:48 2011
Image Type:   ARM Linux RAMDisk Image (uncompressed)
Data Size:    3690105 Bytes = 3603.62 kB = 3.52 MB
Load Address: 00000000
Entry Point:  00000000
Image Name:   Boot Script
Created:      Tue Jun 21 16:31:49 2011
Image Type:   ARM Linux Script (uncompressed)
Data Size:    377 Bytes = 0.37 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 369 Bytes = 0.36 kB = 0.00 MB
Image Name:   Reset Nand
Created:      Tue Jun 21 16:31:50 2011
Image Type:   ARM Linux Script (uncompressed)
Data Size:    602 Bytes = 0.59 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
Contents:
   Image 0: 594 Bytes = 0.58 kB = 0.00 MB
`/tmp/readme.txt' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/readme.txt'
`/tmp/update_boot_files.sh' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/update_boot_files.sh'
`/tmp/fix_zippy2.sh' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/fix_zippy2.sh'
`/tmp/latest_kernel.sh' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/latest_kernel.sh'
`/tmp/minimal_xfce.sh' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/minimal_xfce.sh'
`/tmp/get_chrome.sh' -> `/tmp/tmp.ngjOoVvqe3/disk/tools/get_chrome.sh'

Finished populating Boot Partition

8 / 9: Populating rootfs Partition
Be patient, this may take a few minutes
mount: wrong fs type, bad option, bad superblock on /dev/sdd2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


Unable to mount /dev/sdd2 at /tmp/tmp.ngjOoVvqe3/disk to complete populating rootfs Partition
Please retry running the script, sometimes rebooting your system helps.
0

1 Answer 1

1

I assume that the partition for /dev/sdd2 is created and is of the correct type because you tried that step manually and it looked OK, however you might want to try running the ./setup_sdcard.sh script with "--debug --fdisk-debug" to get more information about the partitioning to be sure. Anyway, since we already have a partition that is probably correct, as root or 'sudo -i', do the following:

mkfs.ext4 /dev/sdd2 -L rootfs
mkdir /tmp/temp_mount
mount -t ext4 /dev/sdd2 /tmp/temp_mount

This last step should fail, at least we expect it to because that is basically what the script is doing. If it succeeds then you have a bad ./setup_sdcard.sh and should probably re-download it. This would be a good time to check dmesg (type 'dmesg' at a terminal) for any recent errors related to hard drives or partitions. If you see any errors about 'journals' then try this:

tune2fs -j /dev/sdd2
mount -t ext4 /dev/sdd2 /tmp/temp_mount

and try running fsck on it as follows:

fsck.ext4 /dev/sdd2
mount -t ext4 /dev/sdd2 /tmp/temp_mount

As a sanity check, also try:

mkfs.ext4 /dev/sdd2
mount /dev/sdd2 /tmp/temp_mount

Finally, another option might be to fill (one of) the cards with zeros (dd if=/dev/zero of=/dev/sdd) and then retry the script. But make sure there are no valuable data on the card because this will erase everything. Then try the process again.

The reason this is failing is probably not due to the card hardware since you tried various cards (although you could try a different card reader). I suspect that it is either a hardware bug with the card reader, a kernel bug or a problem with e2fsprogs. e2fsprogs is the latest stable version so that is probably OK. Try formatting on a different machine with a different reader.

Hopefully one of the above solutions will help you out.

5
  • I have edited the question and filled in what I can. Found this is it relivant : vincemoser.wordpress.com/2007/06/29/howto-partition-sd-card
    – DevilCode
    Jun 25, 2011 at 18:33
  • dd if=/dev/zero of=/dev/sdd Zeroing the card made no difference either =((
    – DevilCode
    Jun 27, 2011 at 13:52
  • I got another 8Gig card to partition OK so I’m beginning to think its dependant on the make of cards. The 32 Gig cards work fine with only one partition but not if any extra are added. I think its because the the 32 Gig cards are Ebay ones made with dubious manufacturers.
    – DevilCode
    Jun 27, 2011 at 16:17
  • Did you try a different card reader?
    – CodePoet
    Jun 27, 2011 at 17:01
  • Yes no different. I think it might be because they are possibly cheap copy cards from china or something, as i got them from ebay and makes I don't recognise. I will buy a 32 Gig from a recognised name and see.. unless anyone can thing of anything else...
    – DevilCode
    Jun 28, 2011 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .