我尝试过四种不同的SDHC两张卡。第一组为 8 GB,第二组为 32 GB。
使用分区,我尝试按以下方式进行分区:
我尝试创建一个 65 MiB 的启动分区FAT32,第二个填充剩余的空间ext4。
无论我是通过 GParted 还是通过BeagleBoardUbuntu脚本(sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle
)我有同样的问题。
第一个启动分区没有问题,但其他分区则不然。它不会像第一个分区那样自动挂载,并会出现以下错误:
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.
答案1
我假设 /dev/sdd2 的分区已创建并且类型正确,因为您手动尝试了该步骤并且看起来没问题,但是您可能想尝试使用“--debug --fdisk-debug”运行 ./setup_sdcard.sh 脚本以获取有关分区的更多信息以确保万无一失。无论如何,由于我们已经有一个可能正确的分区,因此请以 root 或“sudo -i”身份执行以下操作:
mkfs.ext4 /dev/sdd2 -L rootfs
mkdir /tmp/temp_mount
mount -t ext4 /dev/sdd2 /tmp/temp_mount
这最后一步应该会失败,至少我们预计它会失败,因为脚本基本上就是这么做的。如果成功,则说明 ./setup_sdcard.sh 有问题,可能应该重新下载。这是一个检查 dmesg(在终端上输入“dmesg”)以查找与硬盘或分区相关的任何近期错误的好时机。如果您看到有关“日志”的任何错误,请尝试以下操作:
tune2fs -j /dev/sdd2
mount -t ext4 /dev/sdd2 /tmp/temp_mount
并尝试运行 fsck,如下所示:
fsck.ext4 /dev/sdd2
mount -t ext4 /dev/sdd2 /tmp/temp_mount
作为健全性检查,还可以尝试:
mkfs.ext4 /dev/sdd2
mount /dev/sdd2 /tmp/temp_mount
最后,另一个选择可能是用零填充(其中一张)卡(dd if=/dev/zero of=/dev/sdd),然后重试脚本。但请确保卡上没有有价值的数据,因为这会清除所有内容。然后重试该过程。
失败的原因可能不是卡硬件问题,因为您尝试了各种卡(尽管您可以尝试不同的读卡器)。我怀疑这要么是读卡器的硬件错误,要么是内核错误,要么是 e2fsprogs 的问题。e2fsprogs 是最新稳定版本,所以可能没问题。尝试在另一台机器上使用不同的读卡器进行格式化。
希望上述解决方案之一能够帮助您。