Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Debian 6.0.5. To test a feature of my product, I need to modify the system date&time back and forth frequently. Once a time I set the system date back to one month ago, then I reboot the system, and it reported the last mount time of the file system is in the future and enter the maintenance mode automatically. I had to run the fsck to make sure the file system is not broken to boot into Debian.

Is there any way to ask Debian stop checking the last mount time of its file system when booting? Thanks.

P.S. Most of my disk partition are in ext4 format, and the others are in 'ntfs' format.

share|improve this question
1  
Is it necessary to reboot the whole system to test your service? Perhaps you can simply restart your service. –  Michael Hampton Jul 12 '12 at 1:14
add comment

1 Answer

This article has some recommendations if you have filesystems other than ext3/4

List all ext3 and ext4 filesystems:

mount -t ext4 | awk '{print $1}'
mount -t ext3 | awk '{print $1}'

For each one run tune2fs on it:

tune2fs -c -1 -i 0 /dev/sda1

This command will set the mount interval and last check time to values that keep fsck from running

share|improve this answer
    
This prevents automatic checking, but does not prevent the "sanity" checks run on startup. –  Ignacio Vazquez-Abrams Jul 11 '12 at 16:00
1  
@flashnode: Thank you. One point I forgot to mention is that one of my mounted file system is 'ntfs'. It looks like tune2fs only applies for ext2/ext3/ext4. Is there a similar tool specific for ntfs? Thanks. –  Landy Jul 12 '12 at 0:30
    
@Landy: I edited my answer with a very good article. –  flashnode Jul 12 '12 at 14:56
    
@flashnode: Thank you. You really helped me a lot! ;-) –  Landy Jul 16 '12 at 8:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.