rhel linux 自动 fsck,red hat as 4 启动报错:checking filesystems fsck.ext3: bad magic number ......
red hat as 4 启动报错:checking filesystems fsck.ext3: bad magic number in super-block while trying to open /dev/sdc
报错原因: red hat as4中的fstab中写错导致sdc1不能mount
首先说明系统环境:
vmware worksation 6
sdc是一个8G的硬盘.使用fdisk /dev/sdc 进行了分区,操作过程如下:
[root@rhel4lvm dev]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
1
Invalid partition number for type `1'
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
之后建立文件系统,这个也是很标准的操作,如下:
[root@rhel4lvm dev]# mkfs.ext3 /dev/sdc1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1048576 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
值得注意的是,此时还没有将此分区进行mount,所以,df -lH查询不出来,如下:
[root@rhel4lvm dev]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 4.9G 4.4G 224M 96% /
/dev/sdb1 99M 12M 83M 12% /boot
none 252M 0 252M 0% /dev/shm
/dev/sdb5 1012M 34M 927M 4% /tmp
执行如下命令,进行mount:
[root@rhel4lvm dev]# mount /dev/sdc1 /sourcedb
此时,再执行df命令就可以看到sdc1这个分区了,如下:
[root@rhel4lvm dev]# df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 5.2G 4.7G 235M 96% /
/dev/sdb1 104M 12M 87M 12% /boot
none 264M 0 264M 0% /dev/shm
/dev/sdb5 1.1G 35M 972M 4% /tmp
/dev/sdc1 8.5G 53M 8.0G 1% /sourcedb
之后,为了能在系统启动时自动挂载分区,手工编辑/etc/fstab,恰恰这一步写错了:
[root@rhel4lvm ~]# vi /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=SWAP-sdb3 swap swap defaults 0 0
/dev/sdc /sourcedb ext3 defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
请注意,倒数第三行,应该是 dev/sdc1,当时是没有问题,重新启动red hat 时,有报错:
checking filesystems fsck.ext3: bad magic number in super-block while trying to open /dev/sdc [FAILED]
*** An error occured during the file system check.
*** Dropping you to a shell;the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):
折腾了好半天才发现是/etc/fstab写错了.哎..不熟+粗心害死人啊!!!!!!!!!!!!!!!!!
rhel linux 自动 fsck,red hat as 4 启动报错:checking filesystems fsck.ext3: bad magic number ......相关推荐
- linux开启防火墙后,Docker容器启动报错:ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule 解决办法
目录 1.错误场景和现象 2.原因分析 3.解决办法 1.错误场景和现象 linux开启或重启防火墙后,创建docker自定义网络时 docker network create --driver br ...
- Linux RabbitMQ+Erlang /sbin/service rabbitmq-server start 启动报错
先检查两个版本的依赖关系 https://www.rabbitmq.com/which-erlang.html 看看RabbitMQ+Erlang和版本是否可以对应上,如果不对,直接卸载重新装,省时省 ...
- linux服务器断电后系统报错,Linux服务器开机启动报错.docx
Linux服务器开机启动报错 问题描述:重启机房服务器 119 开机的时候卡在这里吗,重启后还是卡这里.问题分析:由于前一段时间,tomcat服务的一个错误代码导致CPU一直接近100% 运行,并且在 ...
- Linux中yum执行yum -y install gcc 报错 解决方案
Linux中yum执行yum -y install gcc 报错 解决方案 本人实际遇到的问题,已亲测正式环境,为防止下次在遇到,在这里做个记录,遇到此问题的小伙伴可以参考此文章. 文章摘自其它网友博 ...
- SAP WM 自动创建TO单的JOB运行报错 - Enter the storage unit type - 对策
SAP WM 自动创建TO单的JOB运行报错 - Enter the storage unit type - 对策 报错如下: 详细信息: Log for automatic creation of ...
- linux重启was控制台报错,Linux非WAS部署,启动报错Cannot run program \lsb_release\
Linux非WAS部署,启动报错Cannot run program "lsb_release" 已确认 tools.jar 文件是当前 linux 中的 jdk 下的 jar 文 ...
- kali linux 安装 Mysql Can‘t read from messagefile 报错解决方案
kali linux 安装 Mysql Can't read from messagefile 报错解决方案 参考文章: (1)kali linux 安装 Mysql Can't read from ...
- linux启动报错+centos关闭和开启ipv6
LINUX启动报错,dmesg | grep -i erro 当前位置:洪哥笔记 >Linux >centos 6关闭或开启ipv6 centos 6关闭或开启ipv6 关键词 ipv6 ...
- u盘安装linux启动报错,U盘安装centos7,启动报错
通过U盘安装centos7的时候,启动报错,找不到安装媒介,解决方法. /dev/root does not exits. centos7的iso文件是:CentOS-7-x86_64-DVD-151 ...
- Linux下Tomcat启动报错:port already in use
Linux下Tomcat启动报错:port already in use,导致该问题的原因很多,我在这里记录一下我遇到的情况的解决办法. 检查了${TOMCAT_HOME}/conf/server.x ...
最新文章
- python通过什么连接数据库_python中常用的各种数据库操作模块和连接实例
- RHEL7 下双网卡绑定做主备(冗余)
- POJ1094查分约束,判断关系是否唯一
- Eclipse更改系统主题
- STM32f4 ARM Bootloader
- 【转】C#中[STAThread]的作用
- 面向切面编程--AOP(二)
- PAT乙级1066 图像过滤
- 【跨年烟花代码】用C语言来写“烟花”,快拿去给心中的那个人看
- va_g729a编码库使用
- IOS越狱运行Linux,iOS 13.4.1 Linux 简易越狱,重启就能打开
- JTF的Unable to invoke request异常或Unable to find a MessageBodyReader of content-type application..异常详解
- CommonAPI编写代码
- 数据结构-九宫格(回溯法)
- ICP许可证申办常见问题答疑
- 计算机科学技术的广告语,十大经典深入人心科技类广告语
- safari打开图片链接显示问题
- ad软件one pin错误是啥意思_AD错误中英文对照
- mysql集群数据一致性校验
- CCCC-GPLT L2-023. 图着色问题 图论-点染色