Jump to content

Checking Reiser filesystem with reiserfsck


Steve Scrimpshire
 Share

Recommended Posts

I had to power off my computer because of a hard lockup and of course it tells me that the filesystem integrity needs to be checked when I rebooted, but it won't check it because it is not using reiserfsck. What do I need to change for it to check it with reiserfsck on boot before it is mounted read/write?

 

TIA

 

[Edit]: I found the function in /etc/rc.d/rc.sysinit, but I'm afraid of the variable FSCKOPTIONS:

 

if [ "$FSCKOPTIONS" ]; then

fsckoptions="$FSCKOPTIONS"

   else

fsckoptions=



<<------------snip----------------->>



Fsck()

{	initlog -c "/sbin/fsck $*"

rc=$?

if [ $rc -ne 0 -a $rc -ne 1 ]; then

    quiet off

    gprintf "Failed to check filesystem. Do you want to repair the errors? (Y/N)n"

    gprintf "(beware, you can lose data)n"     

    read answer



    if strstr "yY" "$answer"; then

 initlog -c "/sbin/fsck $* -y"

 rc=$?

    fi

fi

 

That's the only two times I see FSCKOPTIONS...where does it come from?

Link to comment
Share on other sites

Ok. I see that rc.sysinit uses fsck to check the filesystem which is supposed to look in /etc/fstab for the filesystem type and then use e2fsck or reiserfsck, depending on what filesystem it is, but when I click Y to check the filesystem it just immediately continues and does not check. I've tried to run fsck while in linux and it always just prints out the version number and exits, no matter what options I use. What's up with that? I have 9.1 with the latest updates.

Link to comment
Share on other sites

Thanks. I went to init 1 and it did not allow me to do it saying that /dev/hda1 was mounted read-write. I tried to unmount it but of course it was busy. So I typed

 

mount -r /dev/hda1

 

and it said it was already mounted according to mtab. I tried reiserfsck anyway for the heck of it and it worked, so it did mount it read-only with that command. I guess I should have done

 

mount /dev/hda1

 

to mount it read-write afterwards before I tried to switch back to runlevel 3, because it gave me all kinds of errors and hung up because it couldn't write. I did the 3 finger salute and it rebooted, BUT on reboot, it said

 

"Your system appears to have been shut down uncleanly. Press Y within 5 seconds to (pretend to) check the filesystem integrity"

 

LOL

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...