Find the answer to your Linux question:
Results 1 to 5 of 5
This isn't a Ubuntu (Kubuntu) specific question, but a general linux question I guess. I know how to mount devices no problem, but I'm wondering if this is possible. I'm ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2

    Mounting Directories

    This isn't a Ubuntu (Kubuntu) specific question, but a general linux question I guess. I know how to mount devices no problem, but I'm wondering if this is possible. I'm dual booting windows 7 and kubuntu, and I want to know if I can mount my windows My Documents folder to my ~/Documents. It doesn't have to be able to account for new users or multiple users. I'd just like to be able to directly mount /dev/sda2/Documents\ and\ Settings\Users\whatever to /home/falmarri/Documents

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    You cannot mount directories. You can only mount full partitions.

    So for instance, you could mount your entire Windows partition and access your My Documents directory that way. A relatively recent guide on how to do this is at:

    https://help.ubuntu.com/community/Mo...dowsPartitions

    Hope this helps.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Yeah, I know how to do that. The problem is that I'm doing this for a friend who's just learning linux. So I'd prefer not to mount the windows partition in its entirety and I'd like to make it somewhat seamless. Is this possible? :

    Can I mount the partition into /mnt/win for example as 000, or 700 or something, and then symlink the Documents folder to ~/Documents or whatever? I know my way around linux, but it's almost always for personal reasons, so I'm not an expert on how permissions work for this kind of thing.

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,101
    Use a bind mount
    mount --bind /existing/directory /whereever/you/want/it

    man mount says, this feature exists since 2.4.0 and can of course be set in fstab.

    Just make sure, the windows partition is mounted before, then mount the "My Documents" directory to Documents in your users´ home.

    You might have some fun with escaping the spaces in "My Documents", but this should be doable also
    Last edited by Irithori; 01-15-2010 at 08:58 AM.
    You must always face the curtain with a bow.

  5. #5
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,301
    Could you do something similar with a symlink to the mounted partions sub directory?

    Although the --bind thing seems slicker
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...