1

I'm starting an instance on Amazon EC2, and it does a fsck at boot and restart.

The console output at the start is:

 * Checking root filesystem .../dev/sda1: Adding dirhash hint to filesystem.

/dev/sda1 primary superblock features different from backup, check forced.

It does a fsck and restarts.

I'm creating my own AMI from a local loopback image. It's not based on any of the exiting Amazon AMIs. Is there something I can do to prevent this from happening? The instance comes up fine after the automatic restart, but it's a pain cause it delays when it's available.

2 Answers 2

6

use tune2fs:

# max mounts before check (-1 = disable)
$ tune2fs -c -1 /dev/sda1

# time based (0 = never)
$tune2fs -i 0 /dev/sda1
2

The simplest method is to set the 'pass' field in your /etc/fstab config to 0 for the root file system. This prevents fsck from running on the file system when it's mounted.

Alternatively, you can experiment with tune2fs and the -c and -i arguments to change the file system options so it's checked less often (but for a transient instance, it should probably be disabled completely).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .