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. Features Download Pricing Mind Maps Blog XMind的快捷键

    XMind提供很多快捷键.使用XMind时,在操作的过程中结合快捷键,双手同时操作,将给你带来很大的便利.例如下面一些常用的快捷键: 编辑主题:F2 添加标签:F3 创建一个新的空白工作簿:Ctrl+ ...

  2. ssh的tunnel隧道打洞

    分正向和反向. 假设,本地机器可以ssh连上远程机器.本地机器在下面叫做SSHClient, 远程机器叫做SSHServer. 一. 正向代理(本地转发) 在SSHClient机上执行: : SSHS ...

  3. linux每日命令(10):touch命令

    linux的touch命令一般用来修改文件时间戳,或者新建一个不存在的文件. 一.命令格式: touch [参数]... 文件... 二.命令参数: 参数 描述 -a 或--time=atime或-- ...

  4. Selenium Web 自动化 - Selenium常用API

    Selenium Web 自动化 - Selenium常用API 2016-08-01 目录 1 对浏览器操作  1.1 用webdriver打开一个浏览器  1.2 最大化浏览器&关闭浏览器 ...

  5. [转]《RabbitMQ官方指南》安装指南

    原文链接   翻译:xiezc 目录(其中的文章后续翻译): Windows下安装 Debian / Ubuntu下安装 基于RPM的Linux下安装 Mac OS X下安装 Homebrew安装 W ...

  6. 线程安全的ConcurrentQueue<T>队列

    队列(Queue)代表了一个先进先出的对象集合.当您需要对各项进行先进先出的访问时,则使用队列.当您在列表中添加一项,称为入队,当您从列表中移除一项时,称为出队. ConcurrentQueue< ...

  7. linux环境中,如何解压后缀是bz2的压缩包?tar.bz2格式的压缩包,如何进行解压?

    问题说明: 今天下载了一个nagios中文的包,名字nagios-cn-3.2.3.tar.bz2,即以tar.bz2结尾,经常解压tar.gz 突然想不起来这个用什么命令来解压了.百度了下,再次记录 ...

  8. [Tensorflow] Object Detection API - build your training environment

    一.前期准备 Prepare protoc Download Protocol Buffers Create folder: protoc and unzip it. unsw@unsw-UX303U ...

  9. Android文档-开发者指南-第一部分:入门-中英文对照版

    发布的博客,排版太不行了,整理下发在百度盘上了: 第一部分:Introduction(入门) 0.Introduction to Android(引进到Android) 1.Application F ...

  10. [转]ubuntu bits/predefs.h:没有那个文件或目录

    [转]ubuntu bits/predefs.h:没有那个文件或目录 (2012-04-28 10:09:38) 转载▼ 标签: it 分类: Linux In file included from ...