[b-free: 421] Re: Linux FS error?(long)

Naitoh Ryuichi (night@bfree.rim.or.jp)
Sat, 19 Aug 1995 00:34:40 +0900

隆一です。

In-Reply-To: <Subject: [b-free: 419] Linux FS error?(long)>
飯島 清高<GCE02464@niftyserve.or.jp> さん

>  キーボードの設定を教えていただきましてありがとうございます。
> うまくいきました。コントロールキーとCAPSキーも交換できて、
> 98出身の僕としては大変ありがたいです。
>

それは良かったです。
コントロールキーと CAPS キーの入れかえは必須ですよね。
何故、PC 互換機のコントロールキーは下の方についているのだろう。。
(たまに、CAPS キーの位置にあるキーボードもありますが)

>  ところでキーボードはうまくいったのですが、気になるwarningが出るので
> 質問させてください。
>
>  まず、最初、Linuxを起動させるときに
> EXT2-fs warning:mounting unchecked fs, running e2fsck is recommended や、
> EXT2-fs warning:mounting unchecked fs, running e2fsck is recommended
> /dev/hda7 on /var type ext2(rw)
> EXT2-fs warning:mounting unchecked fs, running e2fsck is recommended
> /dev/hda8 on /var type ext2(rw)
> と表示されます。

このメッセージは、ファイルシステムが fsck をしていないにもかかわらず
mount しようとした時に出るものですね。
Slackware だと /etc/rc.d/rc.S というファイルの中で、システムの立ち上げ
時に fsck を実行するようになっています。fsck を実行したあとに mount を
行うようになっていますので、普通ならばこのようなメッセージは出ないと思
います。

立ち上げ時に次のようなメッセージは出力されていないでしょうか?

---------------------------------------------------------------------
*** ERROR: Root partition has already been mounted read-write. Cannot check!

For filesystem checking to work properly, your system must initially mount
the root partition as read only. Please modify your kernel with 'rdev' so that
it does this. If you're booting with LILO, add a line:

read-only

to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it.

If you boot from a kernel on a floppy disk, put it in the drive and type:
rdev -R /dev/fd0 1

If you boot from a bootkernel disk, or with Loadlin, you can add the 'ro' flag.

This will fix the problem *AND* eliminate this annoying message. :^)
---------------------------------------------------------------------

このメッセージが出ていると立ち上げ時に fsck を実行していません。
Linux がこのメッセージを出力した場合には、'rdev -R /dev/hda1 1'を実行
してみてください。

>  ちなみに
> /dev/hda5 Linux native /
> /dev/hda6 Linux swap swap
> /dev/hda7 Linux native /var
> /dev/hda8 Linux native /home
> となっていまして1つのパーティションを4つの論理パーティションにわけたものです。
> ハードディスクはIDEで1Gです。
>
>  というわけで、fsckをしなければと思いやってみると、
> #fsck -A
> e2fsck 0.5a, 5-Apr-94 for EXT2 FS 0.5, 94/03/10
> /dev/hda5 is mounted.Do you really want to continue(y/n)? yes
> pass1: checking inodes,blocks,and sizes
> pass2: checking directory structre
> pass3: checking directory connectivity
> pass4: check reference counts
> pass5: checking group summary information
> /dev/hda5:23463/102816 files, 291651/411231 blocks
> e2fsck 0.5a, 5-Apr-94 for EXT2 FS 0.5, 94/03/10
> /dev/hda7 is mounted.Do you really want to continue(y/n)? yes
> pass1: checking inodes,blocks,and sizes
> pass2: checking directory structre
> pass3: checking directory connectivity
> pass4: check reference counts
> pass5: checking group summary information
> Fix summary information<y>? yes
> Block bitmap defference: -3297 -3298 ・・・ -3307 -3992 -9381 -9382 ・・・
> -9384.FIXED
>
> /dev/hda7: ***** FILE SYSTEM WAS MODIFIED *****
> /dev/hda7: 1098/3024 files, 4715/12064 blocks
> e2fsck 0.5a, 5-Apr-94 for EXT2 FS 0.5, 94/03/10
> /dev/hda8 is mounted.Do you really want to continue(y/n)? yes
> pass1: checking inodes,blocks,and sizes
> pass2: checking directory structre
> pass3: checking directory connectivity
> pass4: check reference counts
> pass5: checking group summary information
> /dev/hda8:55/50400files, 7208/201568blocks
> となり、いちおう修理完了のような気がします。
(後略)

この fsck ですが、シングルユーザモードにしてからおこなったでしょうか?
マルチユーザモードになっている状態で fsck を実行すると、OS 内部に記憶
してるファイルシステムの情報と HD 上の情報とで矛盾が出てくる可能性があ
ります。
シングルユーザモードへの移行は、shutdown -s で行えます。

では。

----------
内藤隆一 (ggc00661@niftyserve.or.jp/night@bfree.rim.or.jp)