/は起動時に読み取り専用なのに理由がわかりません。問題を解決して修正する方法は? [閉鎖]

/は起動時に読み取り専用なのに理由がわかりません。問題を解決して修正する方法は? [閉鎖]

wheezeにアップグレードした後、ルートファイルシステムが正常にマウントされました。しばらく食べてよく分からないけど、wheezyにdistアップグレードした後に始まったようですが、偶然かもしれません。本機はLenovo T400 FWIWです。

起動画面の写真1読み取り専用ファイルシステムに関する最初の警告を表示します。何も記録されません。

fsckでは問題が見つかりませんでした。2

mount -o remount,rw /

上記はうまくいきます。

(しかし、利用可能なシステムを取得するには、ネットワーク管理者とgdm3を再起動する必要がありました。関連性があるかどうかはわかりませんが、python -m SimpleHTTPServer 8080や他のターミナルw3mなど、localhost上で実行されているサービスに接続できないようです。)ローカルホストポート8080に送信要求がタイムアウトしました)

fstabで何の問題も見つかりませんでした

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=2934c627-6f1a-438b-a877-1544108c7418 /               ext3 errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=39b1f59e-6193-4c46-8b4d-80b183f0b19c none            swap    sw           0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

どんなアドバイスも本当にありがとうございます。明らかに間違って修正することができることを願っていますが、デバッグ方法に関するヒントがない場合はどうなりますか?

...

tune2fs -l /dev/sda1

出力

tune2fs 1.42.2 (27-Mar-2012)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          2934c627-6f1a-438b-a877-1544108c7418
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              14893056
Block count:              59547904
Reserved block count:     2977395
Free blocks:              50391869
Free inodes:              14576981
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1009
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Tue May  3 01:44:56 2011
Last mount time:          Wed Apr 18 13:11:25 2012
Last write time:          Tue Apr 17 23:51:46 2012
Mount count:              5
Maximum mount count:      25
Last checked:             Tue Apr 17 23:51:46 2012
Check interval:           15552000 (6 months)
Next check after:         Sun Oct 14 23:51:46 2012
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
First orphan inode:       9145036
Default directory hash:   half_md4
Directory Hash Seed:      af8ca7f0-bcad-49f3-98c0-9b19a531a885
Journal backup:           inode blocks

...

起動時に /etc/init.d/checkroot.sh が実行されず、スクリプトは最終的に root を rw に再インストールします (起動後に実行するとこれになります)。私はDebianテスト/wheezyを使用しています。 /etc/init.dファイルに依存関係のコメントがありますが、それ以上のinitシステムについてさらに詳しく説明する方法がわかりません。

...

修正されましたが、どのように発生したのか、修正がシステムに存在する必要があるのか​​はわかりません。 checkfsとmtabが/etc/rcS.dにありますが、checkrootにはないことを知って、以下を追加しました。

cd /etc/rcS.d
ln -s ../init.d/checkroot.sh S06checkroot.sh

2回再起動した後(最初は混乱していましたが、その間にcheckroot.shにいくつかの追加ツールを追加しました)、起動時にrwを使用してバックアップしました(そしてローカルホストで受信/要求しました。あると推測されます))。

(圧着されたシステムでS07checkroot.shにアクセスできることを見ました。ほぼ近いかもしれません。)

ベストアンサー1

/root ファイルシステムにエラーがあり、fstab が /root を読み取り専用で再マウントします。

fstabの行

UUID=2934c627-6f1a-438b-a877-1544108c7418 / ext3 errors=remount-ro 0 1

/rootが読み取り専用でマウントされる原因は何ですか?

mount (8)マニュアルページから

errors={continue|remount-ro|panic}
Define the behaviour when an error is encountered.  (Either ignore errors
and just  mark  the  filesystem  erroneous and continue, or remount the
filesystem read-only, or panic and halt the system.)  The default is set in
the  filesystem superblock, and can be changed using tune2fs(8).

結局のところ、/ rootファイルシステムにどのような問題があるかを調べる必要があります。リカバリディスクから簡単に起動し、/rootでfsckを実行できます。潜在的なエラーを無視することを選択した場合は、fstabの行をerrors=continue

おすすめ記事