LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-17-2007, 08:59 AM   #1
LinuxCrazy
Member
 
Registered: May 2007
Posts: 48

Rep: Reputation: 15
I cannot do fsck. Why is that? Repairing Linux ext2 or ext3 file system


I found this great tutorial on repairing my ext3 file system.
http://www.cyberciti.biz/tips/repair...le-system.html

The only problem is I don't know while file system I should unmount?


[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdc2 152696708 1433536 143506592 1% /
/dev/hdc1 101086 11291 84576 12% /boot
none 387788 0 387788 0% /dev/shm
 
Old 06-17-2007, 09:32 AM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Type the command ' /bin/mount ' and see the filesystems each mount has. Then of course the partition to be fixed needs to be unmonted. From the looks if /dev/hdc2 requires fixing then you will need to boot with a bootable linux floppy, live cd, or live usb with fsck tools on it.

Brian
 
Old 06-17-2007, 01:55 PM   #3
LinuxCrazy
Member
 
Registered: May 2007
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Brian1
Type the command ' /bin/mount ' and see the filesystems each mount has. Then of course the partition to be fixed needs to be unmonted. From the looks if /dev/hdc2 requires fixing then you will need to boot with a bootable linux floppy, live cd, or live usb with fsck tools on it.

Brian

so I can never run a fix on the / without the live cd?
While I can always run a fix on /boot without the cd?
 
Old 06-17-2007, 02:14 PM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
If you reboot with "shutdown -F -r now" the -F forces a fsck on the bootup.

EDIT: btw, if your / line in /etc/fstab ends with a "1" as in:
"/dev/hdb1 / ext3 defaults,errors=remount-ro 0 1"
fsck runs automagically on that partition every n mounts, usually 30. You can adjust the amount with tune2fs, see "man tune2fs" for information.

Last edited by makuyl; 06-17-2007 at 02:20 PM.
 
Old 06-18-2007, 03:42 PM   #5
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
I need to read my man pages more often. Never knew that option for shutdown. Thanks for the info.

Brian
 
Old 06-18-2007, 04:01 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
No problem, and from the shutdown man page:
Quote:
The -F flag means `force fsck'. This only creates an advisory file /forcefsck which can be tested by the system when it comes up again. The boot rc file can test if this file is present, and decide to run fsck(1) with a special `force' flag so that even properly unmounted filesystems get checked. After that, the boot process should remove /forcefsck.
So basically you can do the same thing with:
Code:
touch /forcefsck
shutdown -r now
If it for some obscure reason won't remove that file and continues to run fsck on bootup, just rm the file.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ext3 crash on arch linux and repairing bschiett Linux - Newbie 2 01-10-2006 12:00 PM
fsck.ext3: No such file or dir MaTrIx709 Linux - Hardware 4 08-08-2005 03:10 AM
Convert root file system from ext2 to ext3 lothario Mandriva 4 11-20-2004 05:21 PM
Which file system is better, ext2, ext3 or reiserfs? Which are the actual differences iqbala Linux - Newbie 5 12-04-2003 07:55 AM
reformat file system (from ext2 to ext3) pimo Linux - General 5 03-19-2002 04:11 AM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration