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. 关于Installation error: INSTALL_FAILED_NO_MATCHING_ABIS的解决方法

    遇到过好几次这种错误提示,工程代码没有任何错误,但是连安装都安装不上模拟器,console控制台就报出上面的错误: [2015-11-25 15:15:37 - Em4.x] Installation ...

  2. 【ARM】arm系列知识框架

    [ARM编程模型] 硬件: 电路原理图 软件: 体系结构, 指令集, 寄存器组 [ARM编程技术] 汇编/C语言 编译, 链接, 烧写和调试 windows: MDK linux  : gcc [AR ...

  3. 自己实现字符串转整数(不使用JDK的字符串转整数的方法)

    [需求]: (1)如果输入的字符串为null,为空,或者不是数字,抛出异常: (2)如果输入的数字超出int的最大值或最小值,抛出异常: (3)输入的数字允许以+或-号开头,但如果输入的字符串只有&q ...

  4. C++:重载全局new/delete实现跨平台多线程内存检测

    Reference: https://blog.csdn.net/u014023615/article/details/39551191 Reference: https://blog.csdn.ne ...

  5. java中job运行时间

    long startTime=System.currentTimeMillis();//记录开始时间 method();//此处为你调用的方法 long endTime=System.currentT ...

  6. 奇怪的Excel导入问题,OleDbException (0x80004005): 未指定的错误

    windows server 2008 的安全性做的比较好,首先进入系统盘(一般都是C:\),点击工具--文件夹选项--查看,把“使用共享向导(推荐)”的勾去掉,把“隐藏受保护的操作系统文件(推荐)” ...

  7. Python之保存和读取字典

    import pickle def save_obj(obj, name ): with open('obj/'+ name + '.pkl', 'wb') as f: pickle.dump(obj ...

  8. Entity Framework 5中遇到的 mysql tinyint(1) 转换为 bool 的问题 (我用的是VS2013中的EF5版本)

    数据有一个字段,用的是 tinyint 长度是1  默认值为0 , 当用vs2013中的 EF5来生成 实体模型之后,看到这个列被标识为 bool 类型   Mysql官方参考文档关于布尔类型的说明: ...

  9. expect脚本同步文件 expect脚本指定host和要同步的文件 构建文件分发系统 批量远程执行命令

    自动同步文件 #!/usr/bin/expect set " spawn rsync -av root@.txt /tmp/ expect { "yes/no" { se ...

  10. Generate class from database table How can i generate a class from a table at a SQL Server?

    Set @TableName to the name of your table. declare @TableName sysname = 'TableName' declare @Result v ...