• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: How to do fsck on the root file system?  (Read 2892 times)
CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« on: August 05, 2009, 02:59:28 PM »

Is there a way to do setup to do fsck on the root file system, on the ShPlug?  Setting up some parameters and rebooting or something like that?
Logged

Cordially, CqCn

fnordianslip
Newbie
*

Karma: 0
Posts: 8



View Profile
« Reply #1 on: August 05, 2009, 03:35:07 PM »

I don't think that there is an fsck helper for JFFS2. You'll soon know if there are issues with dmesg output and if JFFS2 can't fix any issues itself, then you probably won't be able to do anything with it either - it is reflash time.

However, I've just turned up here and don't actually know anything about the plug, having just started waiting for mine, so I don't actually know for sure that it uses a JFFS2 rootfs, although I did ask if the JFFS2 image was compressed in another thread and nobody corrected me.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #2 on: August 05, 2009, 04:21:59 PM »

In my case I am booting from the SDCard plugged into the slot.  Some people on the net thinks there is a way to give some parameters to reboot or something, that it would do fsck as part of that; but I have not seen anything like that looking through all the parameters some of those reboot like commands.
Logged

Cordially, CqCn

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #3 on: August 05, 2009, 04:50:21 PM »

The "usual" thing to do is to give forcefsck as an additonal boot parameter (or create a /forcefsck file before rebooting). At least it s for RedHat and Mandriva. Have a look in yor /etc/.rc.sysinit file.  It will then fsck all disk mounted at boot time, including the root partition (but if it changes anything there it will reboot immediately afterwards).
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #4 on: August 05, 2009, 05:06:40 PM »

The "usual" thing to do is to give forcefsck as an additonal boot parameter (or create a /forcefsck file before rebooting). At least it s for RedHat and Mandriva. Have a look in yor /etc/.rc.sysinit file.  It will then fsck all disk mounted at boot time, including the root partition (but if it changes anything there it will reboot immediately afterwards).
/etc/.rc.sysinit ??  Is that the exact name?? I do not see any such file; I do not speak *nix well Sad
Logged

Cordially, CqCn

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #5 on: August 05, 2009, 07:20:38 PM »

birdman,

Even though I have not located any similar looking *sysinit* files here, I have a feeling

touch /forcefsck

does work with ShPlug as you suggested.  That trigger file is removed after the boot, but just any old other file name survives the boot.  I have no easy way to verify if the fsck indeed took place, though.
Thanks for the pointer!
Logged

Cordially, CqCn

birdman
Sr. Member
****

Karma: 4
Posts: 440


View Profile WWW
« Reply #6 on: August 06, 2009, 03:02:32 AM »

The other way to do it, which occurred to me later and is what I do for the CompactFlash card on my Asus wl500g, is to shut the system down, take out the card and fsck it on another Linux system.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #7 on: August 06, 2009, 03:31:13 AM »

for ext2/3 based filesystems read the superblock to determine the last filesystem check.
Code:
tune2fs -l /dev/something
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #8 on: August 06, 2009, 08:32:50 AM »

for ext2/3 based filesystems read the superblock to determine the last filesystem check.
Code:
tune2fs -l /dev/something
fragfutter, Thank you very much for that tip.
Logged

Cordially, CqCn

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #9 on: August 06, 2009, 09:05:19 AM »

birdman,

Even though I have not located any similar looking *sysinit* files here, I have a feeling

touch /forcefsck

does work with ShPlug as you suggested.  That trigger file is removed after the boot, but just any old other file name survives the boot.  I have no easy way to verify if the fsck indeed took place, though.
Thanks for the pointer!
Well, I tested.  Even though the /forcefsck file is removed on reboot, fsck does not appear to take place on a reboot.  Testing using tune2fs -l before and after the reboot.
Logged

Cordially, CqCn

Pages: [1]
Print
Jump to: