Super User is a question and answer site for computer enthusiasts and power users. 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

I'm using VirtualBox and a virtual hard disk, formatted as a swap partition, for booting a virtual machine with a USB key. The guest machine is Ubuntu 10.04. I realized that there's no swap partition on the USB key.

Is there a way to mount the swap on the virtual disk automatically without affecting when I boot the USB key drive on real hardware?

share|improve this question

The nofail mount option for swap partitions will cause swapon to ignore the partition if it doesn't exist.

share|improve this answer

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.