linux fix the superblock by dumpe2fs fsck
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的更多相关文章
- linux文件系统相关命令(df/du/fsck/dumpe2fs)
一.文件系统查看命令df 格式 df [选项] [挂载点] 选项 名称 作用 -a 显示所有的文件系统信息,包括特殊文件系统,如/proc,/sysfs -h 使用习惯单位显示容量,如KB,MB或GB ...
- Linux磁盘 - fdisk,partprobe, mkfs, mke2fs, fsck, badblocks, mount, mknod
磁盘分区: fdisk [root@www ~]# fdisk [-l] 装置名称 选项与参数: -l :输出后面接的装置所有的 partition 内容.若仅有 fdisk -l 时, 则系统将会把 ...
- linux 文件系统之superblock
为了实际测试这个pagecache和对裸盘操作的区别,我一不小心敲错命令,将一个磁盘的super_block给抹掉了,全是0, dd if =/dev/zero of=/dev/sda2 bs=409 ...
- Linux下对superblock的理解
对superblock的理解首先从partition structure的结构开始: 开始的,总的来说,block这个概念好理解..下面就是对super block的理解了Super block即为超 ...
- Linux启动提示“unexpected inconsistency;RUN fsck MANUALLY”
问题:在开机启动时,提示“unexpected inconsistency;RUN fsck MANUALLY”进不了系统 解决方法: fsck不仅可以对文件系统进行扫描,还能修正文件系统的一些问题, ...
- Linux学习之fsck命令
在windows下,磁盘的文件系统出错,需要运行chkdsk命令进行修复.而在linux下,则需要运行fsck命令.由于linux对于文件系统的错误非常敏感,由于意外断电或者其它原因导致linux系统 ...
- linux 磁盘与文件系统管理 (鸟哥私房菜)
各种接口磁盘在Linux中的文件名分别为 /dev/sd[a-p][1-15]:为SCSI,SATA,USB,Flash随身碟等接口的磁盘文件名 /dev/hd[a-d][1-63]:为IDE接口的磁 ...
- 【文件系统】dumpe2fs命令
dumpe2fs - dump ext2/ext3/ext4 filesystem information dumpe2fs prints the super block and blocks gro ...
- 恢复ext4文件系统superblock
恢复ext4文件系统superblock 1. Create ext4 文件系统. [root@localhost ~]# mkfs.ext4 /dev/vdb1 [root@localhost ~] ...
随机推荐
- U盘安装CentOS 7卡住在 mounting configuration file system
使用UltraISO PE 9.6.0.3000刻录CentOS 7.2到U盘之后,在PC机上安装,一直卡住在此界面 网上各路大神各显神通,提供了各种各样的办法,后来根据一位网友的说法,顺利安装完成 ...
- phpstrom 激活
最新(2017年5月)PhpStorm 2017.1.2 .WebStorm 2017.1.PyCharm 2016.3激活方式 打开网址 http://idea.lanyus.com/ 选择获取注 ...
- 安卓程序代写 网上程序代写[原]Android中的回调Callback
回调就是外部设置一个方法给一个对象, 这个对象可以执行外部设置的方法, 通常这个方法是定义在接口中的抽象方法, 外部设置的时候直接设置这个接口对象即可. 1. 如何定义一个回调 a. 定义接口 : 在 ...
- Image Lazy Load:那些延时加载图片的开源插件(jQuery)
图片延时加载技术对大流量的网站来说是十分实用的.目前图片在网站中大量使用,如果不加处理的话会对服务器和带宽造成级大压力,通过只渲染当前用户可见区域的图片,可以极大地减少网站的请求数,降低网络带宽资源. ...
- yizhihongqiang
最新网址:https://www. hongxingwangzhi .com/
- circRNA 在人和小鼠脑组织中的表达
circRNA 是一类动物体内的内源性的RNA,尽管circRNA的种类丰富,但是其在神经系统中的 功能,并不清楚.科学家通过对人和小鼠的不同脑部组织的RNA 测序,发现了上千种circRNA,经过分 ...
- Mac 安装 Jenkins
Mac 安装 Jenkins 有两种方法 方法一: 从官方下载最新版本:http://mirrors.jenkins-ci.org/osx/latest 点击安装. 方法二(推荐): 使用 homeb ...
- [hadoop] hadoop native libraries 编译
安装hadoop启动之后总有警告:Unable to load native-hadoop library for your platform... using builtin-Javaclasses ...
- [Tensorflow] Cookbook - Retraining Existing CNNs models - Inception Model
From: https://github.com/jcjohnson/cnn-benchmarks#alexnet 先大概了解模型,再看如果加载pre-training weight. 关于retai ...
- 6. Oracle闪回特性
Oracle 闪回 (flashback)是9i版本提供的新特性.这一特性:其他数据库(PostgreSQL,Mysql)是羡慕不已.对数据恢复提供非常便捷的方式.闪回技术通常用于快速简单恢复数据库中 ...