WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: checkfs  (Read 2552 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
checkfs
« on: May 29, 2009, 04:07:56 AM »
Is there a way to get e2fsck running from the boot options (eg "e2fsck /dev/hda3") ? I recently had some serious problems on /hda3 that e2fsck found and repaired. "checkfs" seems useless.  I had to run this from puppy where I could umount /hda3 since tinycore.gz is on my hda3 partition.  e2fsck was even able to find and repair a circular dir structure error that was impossible to delete by any other method, in addition to all kinds of ionode issues.  "checkfs" didn't find anything.   

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: checkfs
« Reply #1 on: May 29, 2009, 05:02:03 AM »
If I remember correctly, "tc checkfs" calls e2fsck anyway - maybe it's a question of which command line switches are used?

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: checkfs
« Reply #2 on: May 29, 2009, 07:42:36 AM »
If I remember correctly, "tc checkfs" calls e2fsck anyway - maybe it's a question of which command line switches are used?

hmm.....I added "checkfs"  to my boot options, and it seemed to run.  Then I went into puppy, umounted hda3, and just ran "e2fsck /dev/hda3",which straightened out all the disk problems that checkfs didn't find.

edit:  as I recall, checkfs found some problems, like the circular dir structure (link to '.'), but didn't offer to fix anything, (maybe it's defaulting to the 'n' option). 
« Last Edit: May 29, 2009, 08:36:35 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: checkfs
« Reply #3 on: June 01, 2009, 02:12:57 AM »
I ran 'e2fsck /dev/hda3' after booting 'base norestore', and seemed to get a much more thorough file system check/fix then I got using 'checkfs', which hardly did anything.  Here is the e2fsck:

Code: [Select]
1.39-WIP (29-Mar-2006)
 /dev/hda3 was not cleanly unmounted, check forced.
 Pass 1: Checking inodes, blocks, and sizes
 Deleted inode 538611 has zero dtime.  Fix<y>? yes
 
 Deleted inode 538653 has zero dtime.  Fix<y>? yes
 
 Deleted inode 571239 has zero dtime.  Fix<y>? yes
 
 Deleted inode 571256 has zero dtime.  Fix<y>? yes
 
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 Block bitmap differences:  -(1108831--1108833) -1109443 -(1181136--1184345) -(1184842--1184907)
 Fix<y>?
 y
x<y>? yes
Free blocks count wrong for group #33 (4456, counted=4460).
Fix<y>? yes

Free blocks count wrong for group #36 (872, counted=4148).
Fix<y>? yes

Free blocks count wrong (1232661, counted=1235941).
Fix<y>? yes

Inode bitmap differences:  -538611 -538653 -571239

Free blocks count wrong for group #36 (872, counted=4148).
Fix<y>? yes

Free blocks count wrong (1232661, counted=1235941).
Fix<y>? yes

Inode bitmap differences:  -538611 -538653 -571239 -571256
Fix<y>? yes

Free inodes count wrong for group #33 (16225, counted=16227).
Fix<y>? yes

Free inodes count wrong for group #35 (16203, counted=16205).
Fix<y>? yes

Free inodes count wrong (1415239, counted=1415243).
Fix<y>? yes

/dev/hda3: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda3: 151477/1566720 files (0.9% non-contiguous), 1892717/3128658 blocks

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: checkfs
« Reply #4 on: June 01, 2009, 09:54:31 AM »
e2fsck is called with both options f and p, force check and automatic repair.
However, I see it is called backgrounded, This happened when most processes were backgrounded to speed boot time.  checkfs is not a normal boot process and therefore should not be. I will fix in final 2.0.
10+ Years Contributing to Linux Open Source Projects.