It seems that you have a bad superblock. To fix this:

Firstly, boot into a live CD or USB

Find out your partition number by using

sudo fdisk -l|grep Linux|grep -Ev 'swap'

Then, list all superblocks by using the command:

sudo dumpe2fs /dev/sda2 | grep superblock

Replace sda2 to your drive number

You should get a similar output like this

  Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878

Choose an alternate superblock from this list, for this case alternate superblock # 32768

Now, to check and repair a Linux file system using alternate superblock # 32768:

sudo fsck -b 32768 /dev/sda2 -y

The -y flag is used to skip all the Fix? questions and to answer them all with a yes automatically

You should get similar output like this:

fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks

Now try mounting the partition

sudo mount /dev/sda2 /mnt

Now, try to browse the filesystem with the following commands

cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location

If you are able to perform the above commands, you have most probably fixed your error.

Now, restart you computer and you should be able to boot normally.

linux fix the superblock by dumpe2fs fsck的更多相关文章

  1. linux文件系统相关命令(df/du/fsck/dumpe2fs)

    一.文件系统查看命令df 格式 df [选项] [挂载点] 选项 名称 作用 -a 显示所有的文件系统信息,包括特殊文件系统,如/proc,/sysfs -h 使用习惯单位显示容量,如KB,MB或GB ...

  2. Linux磁盘 - fdisk,partprobe, mkfs, mke2fs, fsck, badblocks, mount, mknod

    磁盘分区: fdisk [root@www ~]# fdisk [-l] 装置名称 选项与参数: -l :输出后面接的装置所有的 partition 内容.若仅有 fdisk -l 时, 则系统将会把 ...

  3. linux 文件系统之superblock

    为了实际测试这个pagecache和对裸盘操作的区别,我一不小心敲错命令,将一个磁盘的super_block给抹掉了,全是0, dd if =/dev/zero of=/dev/sda2 bs=409 ...

  4. Linux下对superblock的理解

    对superblock的理解首先从partition structure的结构开始: 开始的,总的来说,block这个概念好理解..下面就是对super block的理解了Super block即为超 ...

  5. Linux启动提示“unexpected inconsistency;RUN fsck MANUALLY”

    问题:在开机启动时,提示“unexpected inconsistency;RUN fsck MANUALLY”进不了系统 解决方法: fsck不仅可以对文件系统进行扫描,还能修正文件系统的一些问题, ...

  6. Linux学习之fsck命令

    在windows下,磁盘的文件系统出错,需要运行chkdsk命令进行修复.而在linux下,则需要运行fsck命令.由于linux对于文件系统的错误非常敏感,由于意外断电或者其它原因导致linux系统 ...

  7. linux 磁盘与文件系统管理 (鸟哥私房菜)

    各种接口磁盘在Linux中的文件名分别为 /dev/sd[a-p][1-15]:为SCSI,SATA,USB,Flash随身碟等接口的磁盘文件名 /dev/hd[a-d][1-63]:为IDE接口的磁 ...

  8. 【文件系统】dumpe2fs命令

    dumpe2fs - dump ext2/ext3/ext4 filesystem information dumpe2fs prints the super block and blocks gro ...

  9. 恢复ext4文件系统superblock

    恢复ext4文件系统superblock 1. Create ext4 文件系统. [root@localhost ~]# mkfs.ext4 /dev/vdb1 [root@localhost ~] ...

随机推荐

  1. js绝对地址图片转换成base64的方法

    //将图片转换成base64 function getBase64Image(url, callback){ var canvas = document.createElement('canvas') ...

  2. iOS开发微信支付

    现在基本所有的App都会接入支付宝支付以及微信支付,也有很多第三方提供给你 SDK帮你接入,但是这种涉及到支付的东西还是自己服务器搞来的好一些,其实搞懂了 逻辑非常的简单,下面直接给大家说说下基本流程 ...

  3. 截图工具(window 10 和Mac OSX)

      Win10上截图 1.使用系统截图工具 所有程序中可以看到 通过win+R,打开运行,输入"SnippingTool" 文件位于: C:\Windows\System32\Sn ...

  4. Go_14:GoLang中 json、map、struct 之间的相互转化

    1. golang 中 json 转 struct <1. 使用 json.Unmarshal 时,结构体的每一项必须是导出项(import field).也就是说结构体的 key 对应的首字母 ...

  5. VMware 虚拟机安装OSX el capitan 11.12

    今天在虚拟机里装苹果OSX ,参考下文: http://wenku.baidu.com/link?url=eq6lxPfiGPcNbQiFiykJDgYDtdzG238P6_-T8IKxbKyDHX0 ...

  6. Java知多少(34)final关键字:阻止继承和多态

    在 Java 中,声明类.变量和方法时,可使用关键字 final 来修饰.final 所修饰的数据具有“终态”的特征,表示“最终的”意思.具体规定如下: final 修饰的类不能被继承. final ...

  7. C++ 智能指针二

    /* 智能指针shared_ptr注意点 */ #include <iostream> #include <string> #include <memory> // ...

  8. 如何把光盘制作成ISO镜像文件

    如何把一张光盘转换成为ISO的镜像文件呢,这需要借助软件的力量. 下面来简单的介绍下吧. 工具/原料 UltraISO软碟通软件. 光驱 方法/步骤 下载并安装UltraISO软碟通软件. 插入要做的 ...

  9. [TensorBoard] *Cookbook - Tensorboard

    Ref: https://www.tensorflow.org/get_started/summaries_and_tensorboard 可视化对于Training的重要性,不言而喻. 代码示范 # ...

  10. [Model] VGG16

     Jeff: fast.ai lesson 1&2感觉没讲什么干货. ~/keras/keras.json配置后台theano or tensorflow. ~/./theanorc处理器配置 ...