由于我的SD卡上的文件系统损坏(可能是由于电源不足所致)之后,我想制作一个新的文件系统。(e2fsck
失败,请在下面登录。)
但是,SD卡上与文件相关的所有更改都将被魔术撤消!
fdisk
,旧的分区表立即恢复原位。(在下面登录。)dd if=/dev/zero of=/dev/mmcblk0 bs=1M
,fdisk
合理地说Disk /dev/mmcblk0 doesn't contain a valid partition table
。如果dd
是这样做,以前的分区表又回来了。我没有用小开关物理上锁定SD卡。我没有任何只读错误。实际上,我根本没有任何错误!dmesg
除了安装错误的文件系统外,不报告任何内容。
运行Xubuntu实时CD(12.10)时也会发生此问题。不幸的是,我目前无法使用其他计算机和/或SD卡读取器。
这是我的计算机,SD卡出现问题还是我一直都在丢失某些东西?有什么建议我可以尝试吗?
e2fsck
失败:
$ sudo e2fsck /dev/mmcblk0p2
e2fsck 1.42.5 (29-Jul-2012)
/dev/mmcblk0p2: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? yes
e2fsck: unable to set superblock flags on /dev/mmcblk0p2
/dev/mmcblk0p2: ********** WARNING: Filesystem still has errors **********
这是显示fdisk
无效的日志:
$ sudo fdisk /dev/mmcblk0
Command (m for help): p
Disk /dev/mmcblk0: 31.5 GB, 31460425728 bytes
4 heads, 16 sectors/track, 960096 cylinders, total 61446144 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: 0x00017b69
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 61446143 30661632 83 Linux
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2
Command (m for help): p
Disk /dev/mmcblk0: 31.5 GB, 31460425728 bytes
4 heads, 16 sectors/track, 960096 cylinders, total 61446144 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: 0x00017b69
Device Boot Start End Blocks Id System
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 31.5 GB, 31460425728 bytes
4 heads, 16 sectors/track, 960096 cylinders, total 61446144 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: 0x00017b69
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/mmcblk0p2 122880 61446143 30661632 83 Linux
在这一点上,我建议在SD卡上运行坏块以查看发现的内容。
听起来卡的写逻辑已损坏,在安装点上看到的只是数据的缓存版本。应该通过同步和在umount期间将其写回。看到您根本没有提到SD卡已挂起,则表明损坏严重到足以产生假阳性写回响应,或者简单地说,是磁盘在写完后对您说谎。
您可以在将卡从系统中拔出时尝试切换写保护开关。例如
为了使电路发痒,可能会缓存“卡在1”值。除此之外,将其粉碎,这样就不会再有其他人遭受痛苦和折磨了。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句