Jump to content

Ubuntu 10.04: "Map" Drive


seventheyejosh

Recommended Posts

Hey guys, just had a quick question for ya'll. I just got the new 10.04 installed as a dual boot OS w/ ReFit on my macbook, running OS X 10.6X, and was wondering how I could "map" (hate to use that word here) my main HDD thru Ubuntu.

 

My main is on /dev/sda2/ and Ubuntu is on /dev/sda4/ .

 

I read an article not too long ago, so I'm positive it is possible, I just forgot to bookmark it, or lost it :'(

 

Thanks!

 

By the way it is running like a dream if anyone is interested.

Link to comment
Share on other sites

So I messed with fstab, and broke 2 installs of ubuntu, so now, on try 3, I'm going to see if I can get it going through terminal first.

 

I created a directory for my mount, I chmodded it to 0777, and mounted, with read&write access, and still cannot access certain folder.

 


sudo mkdir /mnt/macosx
sudo chmod 0777 /mnt/macosx

 

then I mount the drive:

 


sudo mount -t hfsplus  /dev/sda2 -o "rw" /mnt/macosx

 

Which mounts the drive just fine, however certain folders inside of /Users/macbook/ are still inaccessible. My 'books' and 'guitar' directories are read/writeable, but 'music', 'desktop', 'documents', etc are not allowed.

 

The properties says type 'folder', with content of 'unreadable' with owner of '502' and no access given to my user, even though I'm in the root user group.

 

Thoughts?

 

Also, thanks so far, you've been a great help!

Link to comment
Share on other sites

Ah, that may be the issue. On the mac your user id is 502, while on Ubuntu it is likely something else.

 

echo $UID

 

within a term to find out your id. You could likely create a new account on the ubuntu box and force it to be 502. Generally though, on Linux, users shouldn't have an id lower than 1000.

Link to comment
Share on other sites

I've created another account (1001) and manually added it to root

 

Added it to root? That doesn't make sense.

 

lowered it's id to 502, and the changes seem to take, but when I log in with the account, it's id is back to 1001

 

You should create the account with the id of 502 to begin with.

 

Anyway, I just remembered a method I used to use when dual booting two different. Create a group on the mac OS called 'shared' or similar. Give it an id of 1005 for instance. Join this group. Then make sure all files you want shared have there group set to 'shared' and are at least chmod'd to at least 664.

 

Then, on the Linux OS create the same group with the same number and have your users join this group.

 

You can even setup the sticky bits on directories to make sure any new files end up being owned by  this same group.

Link to comment
Share on other sites

Well I tried one thing last night that worked, I created a new user on OS X and changed it's userid to 1001, which gave all of its folders access to the user 1001 on ubuntu. I really didn't want to do that for my main account though, so I tried the way you proposed, creating a user thru the CLI with an initial ID of 502, and bingo, it worked!

 

Thank you so much, this is just great stuff!

 

- Josh

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.