Specifying a mount point for local volumes

Dear all,

I am new to the Mac operating system and am trying to find my way around it.

At installation of the OS, I created two partitions, one located at /dev/disk0s2 and the other one at /dev/disk0s3.

The system has been installed on /dev/disk0s2 and automatically mounts on /. And I'd like /dev/disk0s3 to mount automatically at startup on /Users. My goal is to keep system and user accounts separated.

Yet, I cannot find how to do that. Where is the configuration file that the OS uses to decide what volumes are mounted where?

There is not /etc/fstab like I'm used to on Linux systems. All I found is a
/etc/fstab.hd, that contains nothing.

The natural thing was to try and use the Disk Utility application. But all it tells me is that /dev/disk0s3 will mount on /Volumes/Untitled, without giving me the choice.

What am I not seeing? Can someone, please, explain me how I can specify mount points for each volume?

Thank yall in advance!

--
David.

MacBook Pro Mac OS X (10.4.6) Howdy!

Posted on Jun 8, 2006 2:48 PM

Reply
10 replies

Jun 8, 2006 6:24 PM in response to David Lecomte

Confusing post. First, the machine should have come with an installed OS on a single partition. Second, describe in more detail exactly what you did to create two partitons. If you boot with your install/restore disk, launch Disk Utility, and erase and partition the HD correctly, all partitions should automatically mount. I'm at a loss to figure out exactly what you did and why you're having problems. Report back with the details and maybe we can unravel the problem.

Jun 8, 2006 6:56 PM in response to David Lecomte

Some trial and error may be required to get custom mount points to work in OS X - various methods can be found on the web and some seem to work on some machines but not others. The main question is whether to use the "/etc/fstab" file (which you will have to create yourself) or '/mounts' in the "NetInfo" database, but fortunately it is possible to load a properly formatted '/etc/fstab' file into "NetInfo" using ' niload' to cover your bases.

Try looking at the documentation in ' man fstab', including the "Example" section for the correct formatting. Volumes may be referred to by either of two forms of ' UUID', or the name of the volume (' LABEL'), but again, what works on one machine may not work on another so some trial and error may be needed here as well. Also, I'm not sure if it works with a "/dev/disk#" (I haven't tried it).

Once the ' /etc/fstab' file is created, it can be loaded into the "NetInfo" database using:<pre>sudo niload fstab / < /etc/fstab</pre>Make sure the mount point exists, and try rebooting - if the format is one that your system accepts, the volume should mount at your designated mount point at boot time. However, this isn't always the case for drives attached after boot - sometimes it works, sometimes it goes ahead and mounts it in "/Volumes".

I have it working on two machines, but I really don't know enough about it to give specific instructions, so would encourage you to search the web, using keywords such as "OS X", "fstab", and "niload"...

Jun 8, 2006 8:24 PM in response to baltwo

Hi!

Confusing post. First, the machine should have come
with an installed OS on a single partition. Second,
describe in more detail exactly what you did to
create two partitons. If you boot with your
install/restore disk, launch Disk Utility, and erase
and partition the HD correctly, all partitions should
automatically mount. I'm at a loss to figure out
exactly what you did and why you're having problems.
Report back with the details and maybe we can unravel
the problem.


Sorry if I was unclear and thanks for looking into this.

Yes, the OS came installed on a single partition. But it also had installed tons of software that I was not interested in. So rather than sorting everything, I went for a clean custom install.

After booting off the CD, I had the opportunity, through the Disk Utility, to partition my hard drive. Which I did, because I want to have a partition dedicated to the system and a partition for the user accounts.

So I end up with two partitions, /dev/disk0s2 and /dev/disk0s3.

MacOS installed itself on /dev/disk0s2, which is mounted at /.

I would like /dev/disk0s3 to mount on /Users. But I see nowhere the opportunity to choose a mount point at startup. The Disk Utility tells me that /dev/disk0s3 will mount on /Volumes/Untitled. And sure, it mounts there automatically, as you say. But this is not where I want it.


Usually (on Unix systems, which I am accustomed to), mount points for partitions are specified in /etc/fstab. But such a file does not exist so I guess there should be some other configuration file in which one can customize the way partitions are mounted.

I assume the OS does not mount volumes arbitrarily. There must be a configuration file or tool somewhere that it reads at startup and tells it what to do. This is what I'm looking for.

Is it clearer?

--
David.

Jun 8, 2006 8:45 PM in response to biovizier

Hello,

Once the ' /etc/fstab' file is created, it
can be loaded into the "NetInfo" database
using:<pre>sudo niload fstab / < /etc/fstab</pre>Make
sure the mount point exists, and try rebooting - if
the format is one that your system accepts, the
volume should mount at your designated mount point at
boot time. However, this isn't always the case for
drives attached after boot - sometimes it works,
sometimes it goes ahead and mounts it in "/Volumes".


Thank you very much, that was helpful and gives me something to start with.

So basically, even though /etc/fstab does not exist, I can create it and have the system consider it.

I'll try that, and will look into the other keywords you gave me if that does not work.

Thanks again,

--
David.

Jun 8, 2006 11:52 PM in response to David Lecomte

You're totally confusing things. When you boot your machine it will mount /dev/disk0s2, the boot volume, with whatever name you chose for it (the usual default is Macintosh HD, but you can give any name you want). It shows up as the top disk icon on the screen's right-hand side. The second partition, /dev/disk0s3, shows up as Untitled, because that's the default name when you created it. It should show up directly under the boot volume. If you click on its name label, It highlights, click again and it becomes a text box. Type whatever you want for the new name (I assume Users) and the name changes. Now, Disk Utility and the system components will recognize and identify it by that name.

if you still want to transfer your Users folder to it, then see the details outlined at http://www.bombich.com/mactips/homedir.html. Even though they haven't been updated for Tiger, I believe they're still valid. However, I've never had a good reason to do that. What you can do, smartly is copy your main data folders/files (application documents, music, photos, movies, etc.) to the second partition and then make symbolic links in your user folder to those items.

Jun 9, 2006 9:56 AM in response to baltwo

Hello,

You're totally confusing things. When you boot your
machine it will mount /dev/disk0s2, the boot volume,


No, I am not confusing things. I am not trying to change the name of a volume. This is trivial as you point out.

I will not try re-explaining again. I believed I was pretty clear, but my English may be poorer than I thought.

if you still want to transfer your Users folder to
it, then see the details outlined at
http://www.bombich.com/mactips/homedir.html. Even


Thank you very much. This is another way of achieving what I'm trying to do and it works fine.

--
David.

Jun 9, 2006 12:29 PM in response to baltwo

Hi!

Thanks for the feedback.


Well, you're welcome. Your link does what I want to do.

Since I don't understand
what you mean by I would like /dev/disk0s3 to
mount on /Users
and you don't wish to
"re-explain", I'm dropping out of this discussiion.


Oh, so this is what you did not understand? I'm sorry, I thought it was the procedure that I wanted to accomplish. Since I had explained it twice, I figured I just was not able to explain it.


Volumes can be mounted anywhere you want.

Say you have a partition containing whatever data, on the node /dev/disk0s3. When unmounted, you cannot access it in an organized fashion. But if you type in a terminal

mount -t hfs /dev/disk0s3 /Users/David/Documents

the contents of the partition will appear in the "Documents" directory of the user David (and replace the actual contents of this directory).

If you do then

umount /dev/disk0s3

the partition gets unmounted and you don't see what's in it anymore (and you see again the original contents of your Documents directory).


As I said earlier, manually, you can mount any partition anywhere you want.

So for my problem, I could do

mount -t hfs /dev/disk0s3 /Users


But this is not a a satisfying solution, for it requires me to do it (manually) each time I boot the computer.

I could also make a startup script that does this automatically at boot, but I am not familiar enough with the MacOSX boot procedure yet -- I just bought my computer on monday.


My question was: since MacOS decides on its own to mount my partition /dev/disk0s3 on /Volumes/Untitled, there has to be somewhere a configuration file that tells it: "At boottime, do a mount -t hfs /dev/disk0s3 /Volumes/Untitled".

What I was looking for was the location of this file, and I just want to modify it so it performs a "mount -t hfs /dev/disk0s3 /Users".


As for the reasons for this procedure (you said you never needed it): one of them is described on the link you provided me with. If you ever need to reinstall the system (which may be my case since I'm playing with it in order to learn how everything works), you don't have to worry about losing your personal data. Just wipe out the system partition, reinstall MacOS, mount your other partition on /Users.

Your data is still there, organized as it was before you reinstalled. For you, the reinstall was transparent.

Is that better?

Good computing.


Thanks, same to you.

--
David.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Specifying a mount point for local volumes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.