Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 have a backup external hard drive in a USB box that is identical to my laptop's boot drive so that I can swap it in if my boot drive fails. When it's connected to the system for normal use (e.g., backup, accessing files that don't fit on my SSD), I'd like to mount it like this:

/something/     (partition 1 mounts here)
/something/home (partition 3 mounts here)
                (partition 2 is swap, not used in this config)

This will make the filesystem look identical to the one on my boot disk, when mounted. Also, I want it to automount.

I have in /etc/fstab:

LABEL=ht10oa1 /media/ext        ext4    commit=120,defaults,nofail,user 0    2
LABEL=ht10oa3 /media/ext/home   ext4    commit=120,defaults,nofail,user 0    2

This works half the time. The other half, /media/ext/home mounts first, and /media/ext mounts over it, hiding the contents. Not good.

How can I ensure that /media/ext mounts first? I'm looking for simple here (I would think this should be automatic, as it is at boot time). If it matters, it's on Ubuntu 11.10.



share|improve this question

The best way is to use UUID to mount device from /etc/fstab. UUID are not subject to detection order. Here is a better explanation on how to do that.

share|improve this answer
This did not work. The partitions still mount in random order. – Joe May 1 '13 at 14:05
Sorry I misunderstood your problem, now I get it! – StreakyCobra May 1 '13 at 14:10

You must log in to answer this question.

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