Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thanks,

--jh--

share|improve this question

1 Answer 1

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

Your Answer

 
discard

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.