Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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.