修复错误配置fstab文件导致系统无法正常启动 1. 问题再现 1.1. 操作环境说明 操作系统:CentOS5.2 硬盘分区情况: [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 fstab文件: [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 1.2. 创建新的分区,并配置fstab文件 1.2.1. 创建分区 在/dev/sda上创建新的主分区sda4 [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 ...