fstab 을 수정 하다가 꼬이거나 삭제가 된경우 read only 파일 시스템이 되거나 부팅이 되다 멈추거나 하는 증상이 있습니다.
이미 read only 상태기 때문에 수정이 안되지만, 방법은 있습니다.
 
그럼 아래와 같이 최상위 폴더를 마운트 한 후 수정 합니다.
[root@falinux ~]$ mount -o remount rw /
[root@falinux ~]$ cp .fstab /etc/fstab  
 
fstab 파일은 최상위 폴더에 .fstab 이라는 파일로 가지고 있으며, 이를 복사 해 주면 됩니다.
 
 
mtab 은 조금 다릅니다.
mtab 은 사실 링크파일 입니다.
 
ll -al 명령으로 확인 해보면 아래와 같이 나오는 것을 볼 수 있습니다.
 
lrwxrwxrwx    1 root     root           12 Sep 30 10:44 mtab -> /proc/mounts 
 
즉, mtab 은 /proc/mounts 입니다.
 
read only 파일 시스템으로 변경되는 이유는 대부분 이 mtab 이 삭제 되어서 입니다.
사실 이 심볼릭링크 파일이 삭제되는 이유는 잘 모르겠지만, 복구는 위 fstab 과 비슷 합니다.
 
[root@falinux ~]$ mount -o remount rw /
[root@falinux etc]$ ln -s /proc/mounts mtab
[root@falinux etc]$ cat mtab 
rootfs / rootfs rw 0 0
/dev/root / yaffs2 rw,relatime 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
none /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw,relatime 0 0
[root@falinux etc]$  
 
위 같이 리마운트 해서 /proc/mounts 를 mtab 으로 링크 걸어주면 됩니다.
 
리부팅 해보면 정상적으로 될 것 입니다.


 출처 : http://forum.falinux.com/zbxe/index.php?document_srl=797150&mid=lecture_tip

'리눅스' 카테고리의 다른 글

awstats 설치  (0) 2015.06.24
VI 문자열 치환  (0) 2015.06.22
mrtg 설치하기  (0) 2015.06.20
apache 데몬 chkconfig 등록 안될때  (0) 2015.06.05
아파치 접속자 수 확인  (0) 2015.06.03
Posted by Narusika
,