Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running Ubuntu 11.04(natty) on an EC2 micro instance. Setup 1gb swap file at /mnt/swap. Works fine until I reboot and then the swap is not active. I can activate it manually using swapon -a, but my line in /etc/fstab is ignored.

/mnt/swap      none    swap    defaults        0       0

(I also tried "sw" instead of defaults)

I'm using an EBS backed AMI.

This does work if I put the swap file in other places, but not at /mnt/. I'm curious as to why?

share|improve this question

migrated from Oct 1 '11 at 4:04

This question came from our site for professional and enthusiast programmers.

Minor note: there is no "Ubuntu 11". There is a released "Ubuntu 11.04" and there will be an "Ubuntu 11.10". The version number is a combination of the year.month of the release. – Eric Hammond Sep 30 '11 at 22:11
up vote 4 down vote accepted

On instance types other than micro, one of the instance store block devices gets mounted to /mnt. In my micro instance launch, I have a line in fstab for /dev/sdb. I would try removing this line.

share|improve this answer
This is your answer. You need to comment out the pre-existing /mnt line in the /etc/fstab file. – Eric Hammond Sep 30 '11 at 22:41

Your Answer


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.