Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 second drive that I want to be mounted at the root. The drive contains the following folders:


I want those two folders to be accessible at "/". I can mount the drive at /media/disk1 but that does not solve my problem.

I tried the following command but it doesn't work:

mount /dev/sdb1 /

I have no errors but the folders do not appear on /

share|improve this question
You can only have one partition mounted to a certain point (/ here). You would have to create separate partitions for /home and /shared. Or you could just link /home and /shared to their locations in /media/disk1 – Nattgew Apr 22 '14 at 17:43
@Nattgew: Actually you can! see – njzk2 Apr 22 '14 at 20:11
up vote 14 down vote accepted

What you seems you want is a "union" mount, which can't be done in Ubuntu (at least not with default tools; follow the above link you are adventurous). In general there is still no official union-mount solution in Linux (2014-04-22); there are out-of-tree filesystems like AUFS and work-more-or-less-in-progress on UnionMount. Valerie Aurora has a (slightly outdate) page about it.

What you can easily do is mounting the disk at, for example, /mnt/disk1 and then symlink the directories where you want them:

ln -s /mnt/disk1/home /home
ln -s /mnt/disk1/shared /shared 

(again, you should not have an existing /home or /shared folder, confusion and/or errors would appear otherwise).

Another way to do these kind of things is a "bind mount". It's very similar to symlinking directories, but can cross "chroot" boundaries. You can find more info in this page and in this other one.

Update: the overlayfs file-system has been promoted to standard kernel for version 3.18. So now there is an official union-type solution for linux; userspace utility to simplify its use will surely follow. For now, documentation is in the kernel tree at Documentation/filesystems/overlayfs.txt.

share|improve this answer
Thank you, that's what I'll do ! – CoachNono Apr 22 '14 at 17:50
I will, I had to wait for the delay ! – CoachNono Apr 22 '14 at 17:58
Well, something like a merge mount can be and is being done in Linux. – Ruslan Apr 22 '14 at 19:56
Of course it can be done! unionfs for the win! (typically used in cases where you want a drive to be mounted readonly (fragile SSD with limited amount of write cycles, CDs...), but with possibility to write stuff (in ram with tmpfs, discarded when the drive is unmounted) during the session.) – njzk2 Apr 22 '14 at 20:09
Indeed, I'd love to see an updated answer to this question. – ændrük Apr 22 '14 at 22:26

You have to create the folders there, for example if you want the A drive there or a folder there, type:

 mkdir -p ~/    

where ~/ is the directory after /, so / is the directory the file is being created in!

You can make any directory with this -- just instead of ~/, type the directory you want the file to be created in. For example, for a file being made in /usr/abc/, type mkdir -p ~/usr/abc/. Hope this helps!

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.