Cent OS 5.4 重启后报错 “fsck.ext3:Unable to resolve “LABEL=/name_of_label”

故障描述:

服务器重启后出现如下信息:
unable-to-resove-LABEL1fstab-LABEL

 

故障分析:

1,根据提示原因可能是系统加载/etc/fstab的时候找不到分区/app或挂载不上。

解决方法:

1、在修复模式下(or type control -D to continue):后面输入root密码后回车,进入以后编辑/etc/fstab,在编辑该文件的时候,系统提示该文件为只读,无法编辑,则执行:fsck -ay完后重启。
如果还不行的话,则执行第2步:
2、在(or type control -D to continue):后面输入root密码后回车,执行:init 1,系统将自动重启并进入单用户模式,在进入单用户模式后,由于根分区是只读的,需要通过重新挂载:

sh-3.2# mount  -o remount,rw /

回车,然后再修改/etc/fstab文件(此时不会再提示该文件为只读的了)就可以了,把无法挂载的分区那一行行首用#注释掉或将那一行直接删除掉,这样就可以跳过出错分区,重新启动后再修改/etc/fstab文件。
(备注:此处进入单用户模式是关键!)

3、系统重启后则在正常进入系统后,重新编辑/etc/fstab,根据实际情况,编辑该文件进行/other分区的挂载就可以了。

注意: 将第1列改成硬件设备或分区名这里是”/dev/sdb”而不是以标识名”LABEL=/app” 下图是已经改好的,redhat早期版本对标识符使用不是很准确unable-to-resove-LABEL2

4,修改正确的fstab后,重启系统挂载

经过以上操作,故障搞定

新技术

Redhat6.0后改进了这个功能,不使用LABEL在fstab文件中,而是采用了UUID唯一标识。

fstab-UUID
以下是实际操作修复过程,实际操作是在修复模式下进行的,下面的内容是在正常系统上的 :

在修复模式下(or type control -D to continue):后面输入root密码后回车

# 将/分区变更为可读写,如果是实际操作
sh-3.2# mount  -o remount,rw /

# 如果密码复杂,根分区可读写后,直接修改root密码为简单点

# 查询设备名
[root@urlzh ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          38      305203+  83  Linux
/dev/sda2              39       13092   104856255   83  Linux
/dev/sda3           13093       13602     4096575   82  Linux swap / Solaris
/dev/sda4           13603       19452    46990125    5  Extended
/dev/sda5           13603       19452    46990093+  83  Linux

# 查看分区表
[root@urlzh ~]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/boot             /boot                   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

# 查询设备对应的挂载点,以便修改/etc/fstab中设备与分区挂载点之间的对应关系
[root@urlzh ~]# e2label /dev/sda1
/boot

# 修改之前
[root@urlzh ~]# cat /etc/fstab
/dev/sda5                 /                       ext3    defaults        1 1
/dev/sda2              /var                    ext3    defaults        1 2
/dev/sda1             /boot                   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@urlzh ~]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/boot             /boot                   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

# 查询设备对应的UUID
[root@urlzh ~]# blkid /dev/sda1
/dev/sda1: LABEL=”/boot” UUID=”c2ed89e8-63d3-4013-892f-17db4f862245″ SEC_TYPE=”ext2″ TYPE=”ext3″

========================================================================================

Linux – Error unable to resolve label filesystem recovery, Recovery file system problem

Error unable to resolve label filesystem recovery

How to recover from error label not found?
How to recover from error unable to resolve label?

Error Message

fsck.ext3: Unable to resolve 'LABEL=/usrs'        [FAILED]

*** An error occurred 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):

When the above error is found many ask the question, how to recover from the error. From the above error it is obvious that

the error is something relaed to a filsystem. TO over come this issue you have to edit the /etc/fstab. When this error occurs

you cannot edit the /etc/fstab file as it is, to edit the file you have to login as single user, then mount the filesystem.

After that only you can edit the files or /etc/fstab.

Steps for recovery:

1) Login as single user mode
2) Provide the password

Mount the filesystem to edit

3) mount -o remount,rw /

OR

3) mount -av

Edit /etc/fstab

4) vi /etc/fstab

   Find the word 'LABEL=/usrs' 

5) Change /usrs as 'LABEL=/usr'

After making the changes, you can re bot the machine.

Command to check the label

 # e2label /dev/sda1

If you specify bad device number then you might get error as below

 # e2label /dev/sdaxx

OUTPUT:

e2label: Bad magic number in super-block while trying to open /dev/sda
Couldn't find valid filesystem superblock.

Command to find the disk id

 #  blkid /dev/sda1

OUTPUT:

 # /dev/sda1: UUID="1d35d020-f6a1-456f-91e6-4a722111a766" TYPE="ext3"

The blkid is the command which is used to find the block-id of the disk.The topic on Linux – Error unable to resolve label filesystem recovery is posted by – Math
Hope you have enjoyed, Linux – Error unable to resolve label filesystem recoveryThanks for your time

发表评论