修复错误配置fstab文件导致系统无法正常启动
[root@localhost ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 1305.
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)
Command (m for help): p
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 522 4192933+ 83 Linux
/dev/sda2 523 783 2096482+ 83 Linux
/dev/sda3 784 914 1052257+ 82 Linux swap / Solaris
Command (m for help): v
6288172 unallocated sectors
|
[root@localhost ~]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/tmp /tmp ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
|
[root@localhost ~]# fdisk /dev/sda
The number of cylinders for this disk is set to 1305.
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)
Command (m for help): p
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 522 4192933+ 83 Linux
/dev/sda2 523 783 2096482+ 83 Linux
/dev/sda3 784 914 1052257+ 82 Linux swap / Solaris
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4
First cylinder (915-1305, default 915):
Using default value 915
Last cylinder or +size or +sizeM or +sizeK (915-1305, default 1305):
Using default value 1305
Command (m for help): p
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 522 4192933+ 83 Linux
/dev/sda2 523 783 2096482+ 83 Linux
/dev/sda3 784 914 1052257+ 82 Linux swap / Solaris
/dev/sda4 915 1305 3140707+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
|
[root@localhost ~]# mke2fs -j -L other /dev/sda4
mke2fs 1.39 (29-May-2006)
Filesystem label=other
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
393216 inodes, 785176 blocks
39258 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@localhost ~]# e2label /dev/sda4
other
|
[root@localhost /]# mkdir /others
[root@localhost /]# mount /dev/sda4 /others
[root@localhost /]# mount
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /tmp type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda4 on /others type ext3 (rw)
[root@localhost /]# cd /others
[root@localhost others]# ls -l
total 16
drwx------ 2 root root 16384 Nov 21 19:35 lost+found
[root@localhost others]#
|
[root@localhost /]# vi /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/tmp /tmp ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
LABEL=/other /others ext3 defaults 1 2
|
[root@localhost /]# init 6
|
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><?xml:namespace prefix = w ns = "urn:schemas-microsoft-com:office:word" />
|
图1.1
|
|
图2.1
|
|
图2.2
|
|
图2.3
|
|
图2.4
|
|
图2.5
|
修复错误配置fstab文件导致系统无法正常启动相关推荐
- CentOS6修改/etc/fstab文件造成系统无法启动的问题
CentOS6修改/etc/fstab文件造成系统无法启动,并无法修改fstab文件解决方式: 1.启动linux提示失败,输入root账户密码,进入 repair filesystem#,注意此时修 ...
- 【疑难杂症爆破委员会】UEFI Linux、Windows双系统,丢失Windows的efi文件导致找不到启动项(恢复Windows的efi文件)
[疑难杂症爆破委员会] UEFI Linux.Windows双系统,丢失Windows的efi文件导致找不到启动项,导致无法进入Windows系统 状况说明 状况是这样的:我本来好好的装着Linux和 ...
- centos修改磁盘uuid_Centos更换损坏硬盘UUID改变导致系统不能正常启动处理
Centos 更换损坏硬盘 UUID 改变导致系统不能正常启动处理 一. 适用场景 本文档的适用场景为,更换硬盘导致系统启动时因 UUID 不同,导致 挂载文件读取失败, 系统不能正常启动, 同时本文 ...
- Springboot集成knife4j,Failed to start bean ‘documentationPluginsBootstrapper‘;导致系统不能正常启动
Springboot集成knife4j,Springboot更新到2.6启动报错Failed to start bean 'documentationPluginsBootstrapper'; nes ...
- 为何删除bootmgr文件后系统仍然能启动
很多刚开始研究系统启动技术的人都会遇到这样的问题,明明已经修改了系统盘的bootmgr文件,为何在启动的时候,引导文件不起作用呢?就算把bootmgr文件删掉,仍然不影响系统原来的启动方式,这到底是什 ...
- linux中fstab文件_如何在Linux上写入fstab文件
linux中fstab文件 zentilia/Shutterstock.comzentilia / Shutterstock.com Adding a new hard drive or solid- ...
- linux中fstab文件的作用,如何在Linux上写入fstab文件 | MOS86
在Linux计算机上添加新的硬盘驱动器或固态驱动器? 您需要编辑fstab文件. 很多人觉得这个主意很吓人. 是的,至关重要的是您要正确,但掌握了正确的知识,这确实并不困难. 我们将引导您完成编辑fs ...
- /etc/fstab文件出错,无法进入Linux系统
问题描述 今天复习Linux文件系统管理,在Linux系统上挂载了一块新硬盘之后,然后分区,格式化,一步步走下来,为了能够使该硬盘在系统启动时自动挂载,于是将之写入了/etc/fstab文件,然而在r ...
- linux 文件乱码_RedHatlinux系统虚机启动后/etc/fstab中的文件系统未能挂载上
某一台linux虚机启动后,/etc/fstab中的文件系统不能挂载上,linux机器的操作系统版本为NeoShine Linux Server 3.0.6 操作系统版本 使用df -h查看磁盘的挂载 ...
最新文章
- SAP PP COR3不能看工单后续的备料TO单号?
- jquery设置属性值或移除属性
- 软件工程第二周阅读作业
- 【Echarts 3.x】填坑记
- 【推荐系统】协同过滤 零基础到入门
- 小米11和华为p40pro哪个好
- 每天一道LeetCode-----删除序列中指定元素,将满足要求的元素移动到前面
- 有关Struts2a的ction直接使用response异步问题
- 图像局部显著性—点特征(SiftGPU)
- video-js RTMP直播
- 代码重构技巧宝典,学透本篇就足够了!
- 如何在Windows 10上安装MySQL数据库服务器8.0.19
- 简练软考知识点整理-公邀竞单询其
- SendMessageTimeOut函数使用方法
- 程序员计算器 android6,程序员计算器
- 数据结构课程设计之学生宿舍信息管理系统
- C 通过四个点计算两条直线的交点
- c语言统计大小写字母 空格 和数字个数,C++统计中英文大小写字母、数字、空格及其他字符个数的方法...
- 字节跳动大数据中心17万服务器硬实力支撑今日头条等产品线(公号回复“字节跳动”下载PDF典型资料,欢迎转发、赞赏支持科普)
- Vue和SuperSlide做轮播效果