Steve Scrimpshire Posted September 11, 2003 Report Share Posted September 11, 2003 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? Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 11, 2003 Author Report Share Posted September 11, 2003 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. Quote Link to comment Share on other sites More sharing options...
bvc Posted September 11, 2003 Report Share Posted September 11, 2003 you have to drop to, or boot to init 1 and do it yourself. See man reiserfsck http://www.catfive.org/cgi-bin/man2web?pro...rfsck§ion=8 reiserfsck --check --logfile check.log /dev/hdaX or write your own script for doing it. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 11, 2003 Author Report Share Posted September 11, 2003 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 Quote Link to comment Share on other sites More sharing options...
bvc Posted September 11, 2003 Report Share Posted September 11, 2003 did you reboot to init 1, or go there from init 3 or 5? At lilo; linux init 1 or linux 1 ( I think works......I use grub) This is how I've always done it. Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted September 11, 2003 Report Share Posted September 11, 2003 You could try booting off The CD1 install disk, hit F1 and type rescue at the prompt.You should be able to get to a command prompt with all partitions unmounted and run reiserfsck. Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted September 11, 2003 Author Report Share Posted September 11, 2003 I went there from runlevel 5. Thanks for the suggestions everyone. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.