树莓派打破了SD卡?无法格式化

问题描述 投票:5回答:5

所以,我有一个CnMemory 8GB SDHC。我用了我的树莓派。它的工作至今。但后来我的覆盆子冻结(不能通过SSH连接,阿帕奇didnt回应要么)。所以我把功率输出。我rebootet树莓。这一次,我的显示器。 FS似乎已损坏。我做的fsck和解决的问题。与shutdown -r重新启动。现在将无法启动。好了,所以我想我需要把一个空白的新形象吧。

我不能。的gparted告诉我,卡只有1GB,而不是8GB。

# fsck /dev/mmcblk0 
fsck from util-linux 2.20.1
e2fsck 1.42.8 (20-Jun-2013)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/mmcblk0

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>

fdisk的和的fdisk的/ dev / mmcblk0导致以下

# fdisk
[...]
Disk /dev/mmcblk0: 1073 MB, 1073741824 bytes
4 heads, 16 sectors/track, 32768 cylinders, total 2097152 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: 0x00000000

Disk /dev/mmcblk0 doesn't contain a valid partition table

# fdisk /dev/mmcblk0 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xccf88a5e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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

还有它冻结。它说,它已经改变了,但它并没有它的卡在那里。

一个为Windowssystem不能格式化SD卡或者得到一个I / O错误。

这是这个问题的第二个SD卡!

我希望你有任何想法如何解决这个问题。谢谢!


编辑:

当我试图消灭分区表DD冻结为好。

# dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1

Aaditi:

dmesg的节目invalid allocation unit size

如果我尝试的mkfs编写存在一些误区。

# mkfs /dev/mmcblk0 --type=ext4
mke2fs 1.42.8 (20-Jun-2013)
Warning: could not erase sector 2: Attempt to write block to filesystem resulted in short write
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376

Allocating group tables: done                            
Warning: could not read block 0: Attempt to read block from filesystem resulted in  short read
Warning: could not erase sector 0: Attempt to write block to filesystem resulted in short write
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 0/8
Warning, had trouble writing out superblocks.

# dmesg
mmc0: SD Status: Invalid Allocation Unit Size
[...]

难道我只是在几个小时后彻底分手呢?

raspberry-pi sd-card disk-partitioning
5个回答
3
投票

我也有类似的问题,因为它已经被RPI coruppted后,我无法格式化SD完整空间。与现场的GParted试验系统未成功。

最后,我发现了一个解决方案,使用命令行工具删除分区

DISKPART

在Windows上。

这是非常容易和简单的使用。我也跟着上的说明

this short tutorial。后来我才得以重新格式化。

不幸的是,我无法找到UNIX系统等效的解决方案呢。


2
投票

我是有这样的问题。 这是我的输出,

root@tygra:/path# dd bs=4M if=Gingerbread+EthernetManager.img of=/dev/mmcblk0
dd: failed to open ‘/dev/mmcblk0’: Read-only file system

我用的是有一个SD卡转接器一个microSD。 该解决方案是非常简单的。有一个在适配器的侧面一个小开关,把它转化为未锁定。


1
投票

在我的经验中,微型SD卡可以很容易地停止运转。现在我已经受够了过两次,用不同的SD卡品牌,即写入SD停止运作,你就留下一个破碎的文件系统,不能做太多了。有时你可以通过从其他设备上复制保存数据,只读安装卡。

我的假设将是SD卡并不像OS /交换盘特别好,因为写在总计数和粒度我相信限制。尽管如此,服务器现在配备了SSD的---但是这些可能被严重缓存里面。


0
投票

启动命令提示符以管理员身份,然后按照这些步骤。每一行是一个新的命令。

diskpart

list disk

select disk {{disk_number}} //Select the disk you would like to remove the partition from

list part

select part {{partition_number}} //Select the partition you would like to remove from the selected disk

delete part //Make sure you remove the correct partition!

create part pri

exit

0
投票

我有过类似的事情发生在我的树莓派。是什么让这对我的工作是从SD协会(https://www.sdcard.org/downloads/formatter_4/),这是适用于Mac和Windows的SD卡格式化,虽然花了相当长的时间,我的4GB存储卡。

杉杉,下载安装并运行应用程序。插入SD卡,并选择驱动器盘符,然后按格式。等待,直到它达到100%。

如果报告不正确的容量,尽量易我分区大师(http://www.partition-tool.com/)(它捆绑了一些其他的软件也是如此,所以一定要取消选中/安装时不要选择它)。如果你看到任何分区的空间,那么这可能是它。

对不起,如果我不能建议可用于Linux的任何工具,我想它也对Linux,但似乎没有什么为我工作。

这里的答案可能会为你工作了:https://raspberrypi.stackexchange.com/questions/1446/how-can-i-reformat-my-sd-card-to-use-it-normally-again

或这个:

https://raspberrypi.stackexchange.com/questions/9656/i-have-a-16gb-sd-card-that-is-now-only-55mb-how-do-i-get-15-945gb-back?lq=1

© www.soinside.com 2019 - 2024. All rights reserved.