Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to PREVENT a volume or disk mounting when booting?

This thread has been labeled as solved:


How to hide/not mount a partition

https://discussions.apple.com/thread/4271735?start=0&tstart=0


So, I am starting this new one. I am using Macs with OS X 10.8.3 (Mountain Lion).


1. sadhuram said:


-------------------------------------------------------------------------------- -----------------------------------------------------------------------

Launch terminal, then:


sudo nano /etc/fstab


Press enter. It will prompt you for your administrator password, type it and enter (don't worry if you can't see if you are actually typing anything).


You will be in nano editor, now you have to write the desired configuration. In my case the partition I don't wanna be mounted is called "Arch". I must open "Disk Utility" and then search on the left bar the partition, select it and press CMD+I. Search for the UUID (Universal Unique Identifier) and copy it, mine was: 3CA41C88-3E86-3A39-88CE-9379FF44B6A5


Go back to terminal and write:


# fstab

#

# Identifier mount point fs type options1

#

UUID=3CA41C88-3E86-3A39-88CE-9379FF44B6A5 none hfs rw,noauto


Remember to change my UUID with the UUID of your partition. Once you've finished editing the document you moust press CRTL+O (to save changes) and then press CRTL+X to quit nano editor.

-------------------------------------------------------------------------------- -----------------------------------------------------------------------


2. Then, I said:


-------------------------------------------------------------------------------- -----------------------------------------------------------------------

sadhuram, many thanks. I will appreciate your feedback on these three things:


1. FIRST


After

sudo nano /etc/fstab

I pressed the carriage return and I got something like this (without the lines ---):


--------------------------------------------------

UUID=3C236DAC-45CD-8ADB-8J8A-KI87K756L875 none hfs rw,noauto

UUID=9DKL76JH-859G-9865-87L7-TN59694I6K47 none hfs rw,noauto

--------------------------------------------------


and then I pasted below what you indicated to read (without the lines ---):


--------------------------------------------------

UUID=3C236DAC-45CD-8ADB-8J8A-KI87K756L875 none hfs rw,noauto

UUID=9DKL76JH-859G-9865-87L7-TN59694I6K47 none hfs rw,noauto

# fstab

#

# Identifier mount point fs type options1

#

UUID=U4766497-8TBE-9Y79-M4IH-K7OT4G49475H none hfs rw,noauto

--------------------------------------------------


I understand that it is not required to press the carriage return after pasting that.


If now I press/type:

ctrl O

nothing happens.


If then I press/type:

ctrl X

nothing happens either.


2. SECOND

Imagine that the booting OS X 10.8.3 above is an external disk used to boot two different iMacs (one at work and other at home, for instance). One iMac has the UUID indicated above, but the other has a different UUID, of course. How to prevent that none of such internal Mac hard disks automounts when either of the iMacs (at work or at home) is booted from the external disk?


3. THIRD

On the other hand, how to reverse the unmount feature and make such iMac internal disks automatically mount (if required in the future)? In other words, how to revert this change if required in the future?


Thanks again.

-------------------------------------------------------------------------------- -----------------------------------------------------------------------


Could someone please answer to my questions above. Thanks.

Posted on Apr 30, 2013 1:35 AM

Reply
26 replies

Apr 30, 2013 5:16 AM in response to ApMaX

Question 1:


What was given to you was a bit wrong. Follow these similar stats:


  • Enter the Terminal
  • If you are not logged in as an Administrator, type "login" and enter an Admin account. You will now be logged in as admin in the Terminal
  • From there, type this: "sudo pico /etc/fstab" and hit enter. You will be prompted to enter the Password of the admin account you have logged into.
  • There, you will need to find your UUID. By this, you can do the following:
    • Go into Disk Utility
    • Select the Partition you want to hide
    • Select Get Info
    • The UUID will look something like this: "431C0AB2-AB69-3A4B-9A9F-B01CD2184B29"
  • Copy that UUID
  • Step back into Terminal
  • Enter the follow: "UUID=[your UUID] none hfs rw,noauto 0 0"
  • Hit Control^o and hit enter
  • Than hit Control^x and hit enter
  • To see it take effect, you will need to restart the comptuer.


Question 2:


I will have to do some research on that for you. I've seen it done but it can be rather difficult. What you can do is make it difficult to access these drives. One thing to remember, they cant change any files or software in most cases on the comptuer.


Question 3:


You would step back into the /etc/fstab and erase everything you have typed

Apr 30, 2013 5:32 AM in response to lrr394

Thanks. If what you inicate for Question 1 is repeated for the other disk (with its specific UUID) will it work for both 1 and 2 disks not mounting when booting from the external disk where such commands are entered (Question 2)?


In relation to Question 3, can it be done also in a simpler Terminal way as the one that you indicated in Question 1 (but for the opposite effect of mounting)?

Apr 30, 2013 5:44 AM in response to ApMaX

ApMaX wrote:


Thanks. If what you inicate for Question 1 is repeated for the other disk (with its specific UUID) will it work for both 1 and 2 disks not mounting when booting from the external disk where such commands are entered (Question 2)?


You can unmount any amount of harddrive you want, as etresoft said, it would have to be at its individual line. There are no limits as to the amount you can enter. In regards to Question 2, I believe there is a way to do this, but I have to do research, I don't want to tell you something incorrect.



ApMaX wrote:


In relation to Question 3, can it be done also in a simpler Terminal way as the one that you indicated in Question 1 (but for the opposite effect of mounting)?

You would take the same process from Question 1 and just remove everything that you have added. Restart the computer to see things to take effect.

May 1, 2013 4:26 AM in response to lrr394

I have been doing some testing and found some amazing facts:


1. If a disk is configured to prevent automounting at boot as indicated above (sudo nano /etc/fstab), then DiskWarrior cannot rebuild its directory. If such configuration is deleted on that very same disk so that the disk automounts at boot, then DiskWarrior can rebuild its directory (no problems fount). Shocking!!!


2. In relation to my first post above (1. FIRST; "nothing happens") I have found what was going on and is again amazing:


2.1. After

sudo nano /etc/fstab

and carriage return (enter) in Terminal, the GNU nano 2.0.6 command-line interface shows and there you can select text and try to delete with the delete key or pressing Control K. Yet it deletes nothing. No way.


2.2. To delete some text, you must move the rectangular gray cursor of the GNU nano with the keyboard arrow keys, place it on the left of one line and then press Control K to delete such line. Likewise with the rest of lines to delete. You cannot delete all lines at once (at least, I have not found how to do it), but one-by-one as indicated before.


2.3. When you finish deleting lines, press Command O to save changes. Then press Command Q to quit GNU nano and return to the Terminal prompt.


2.4. Then type Exit to exit the Terminal session and Command Q to quit Terminal.


These directions can be used also when Saving and Quitting GNU nano at any time.


3. There is more. I have found that if I make a backup of a disk with Time Machine, then configure such a disk to prevent automounting at boot, and then try to backup again, Time Machine sees it at a different disk and instead of making an incremental backup of it, it backups the whole disk again, even it it has minor changes from the last backup (before configuring it to prevent automounting). Again, shocking!!!


CONCLUSION. The quest remains: a way to prevent automounting one or more disks at boot that does not interfere with DiskWarrior rebuilding its directory and that does not interfere with Time Machine making incremental backups. Anyone knows how to do it? Thanks.

May 1, 2013 5:16 AM in response to etresoft

I do nothing about Terminal, nano or other command-line interfaces. That is why I use a Mac in the first place.


But now, I wanted to do something that unfortunately the Mac OS X 10.8.3 GUI does not allow me to do, which besides being convenient, is also ecological (saving electricity, noise, heat and increasing the life of disks not used routinely; I may use such disks once a month or so), protecting the environment and the Earth.


It seems that for that I need Terminat et al. And I do what I am told to do. And then report the experience. Just that.


Could someone help? Thanks.

May 1, 2013 5:37 AM in response to etresoft

You do not get it. I cannot unplug such disks because they are internal. Did your read the threads (this one and the original one where this comes from)? I have all my external disks unplugged when I do not use them, of course.


But in this case the scenario (described in this and the other original thread) is different: I boot from an external Thunderbolt SSD disk (pocketable; 260 g) two iMacs: one at work and other at home. All my stuff is in the external disk, which is extremely convenient and much better than using a laptop, at least for me.


When I boot any of those iMacs with such external disk where all my stuff is, I do not want the internal iMac disk to automount because I use it only once a month (one iMac) or even once a year or so (the other iMac).


I am very grateful to all the people that contributed above and to the people that may contibute next to accomplish the requested tasks in this thread. And yes, that is possible. Applications like "TinkerTool System - System Settings - System - Volumes - Exclude volumes from automatic mounting" can do it without any interference with DiskWarrior or Time Machine. But I wanted to do it without having to install such application, which Apple does not aprove in the App Store.


If someone can help, it will be most appreciated.

May 1, 2013 6:16 AM in response to ApMaX

You are running in a most unusual setup. Furthermore, you are making no difference whatsoever in terms of energy efficiency or lifetime of the disks. Time Machine is not appropriate for a scenario like this. When you strike out on your own like this, you have to learn how to deal with it. That may involve using the Terminal or other advanced tools.


TinkerTool is perfectly safe. Apple does not allow any applications in the Mac App Store that can modify system settings like this. GNU nano is not the world's greatest editor. I use vi when I edit my /etc/fstab to do something very similar. There are many other editors available. TextWrangler would be an excellent choice. Make sure to download it directly from BareBones. There is a version on the Mac App Store, but the Mac App Store version cannot edit these system files.

May 1, 2013 6:40 AM in response to etresoft

Again, you do not get it. I and many other people have been using such setup for many years now and it works great. And you have all your stuff with you wherever in the world; you just need a Mac to boot from. Once you try it, you do not want to go back.


On the other hand, it makes a lot of ecological sense and disk lifetime if you turn on 24 h a day 255 days a year a hard disk or only turn it on once a month or once a year. And Time Machine is perfectly appropriate because the Time Machine disk is a different external disk where the external booting and internal disk are backedup. Again you got it all wrong.


As said, I have no idea of command-line intefaces (including all text editors; I only know about Mac GUI) and just want a step-by-step method for newbies or dummies if you want to do what has been demonstrated that is possible (TinkerTool System).


If you know how to do it, I will appreciate your feedback. Otherwise, please go elsewhere with your useless "wisdom" (sic). If you want to help, you must help (step-by-step procedures), not spit useless garbage. Because as has been demonstrated with your "useful" (sic) participation in this thread, all your levels and points are utterly useless. Or prove me wrong (step-by-step for dummies) and I will be most grateful.

May 1, 2013 7:30 AM in response to ApMaX

ApMaX wrote:


Again, you do not get it. I and many other people have been using such setup for many years now and it works great.

Then why are you posting here if it works great?

On the other hand, it makes a lot of ecological sense and disk lifetime if you turn on 24 h a day 255 days a year a hard disk or only turn it on once a month or once a year.

There are 365.24 days in a year. Spinning a disk up and down several times a year is more stressful on the mechanism than keeping it running constantly.


And Time Machine is perfectly appropriate because the Time Machine disk is a different external disk where the external booting and internal disk are backedup. Again you got it all wrong.

You are the one reporting problems with Time Machine.


As said, I have no idea of command-line intefaces (including all text editors; I only know about Mac GUI) and just want a step-by-step method for newbies or dummies if you want to do what has been demonstrated that is possible (TinkerTool System).

Then why do you continue to pursue that course of action when there are perfectly good GUI tools?


If you know how to do it, I will appreciate your feedback. Otherwise, please go elsewhere with your useless "wisdom" (sic). If you want to help, you must help (step-by-step procedures), not spit useless garbage. Because as has been demonstrated with your "useful" (sic) participation in this thread, all your levels and points are utterly useless. Or prove me wrong (step-by-step for dummies) and I will be most grateful.

You are the only one to have used either "wisdom" or "useful" in this thread. On both occasions you spelled them correctly.


I don't know why you persist in asking for step-by-step procedures for something you are already doing. You are never going to get Time Machine to work the way you want. Time Machine is operating as it was designed. When it detects something unusual, as in this case, it doesn't trust its incremental backup logic and performs a deep scan of the drive. DiskWarrior seems to have similar behaviour. This isn't the way the system was designed to work. Here is your step-by-step procedure:


1. Setup system in unusual configuration.

2. Live with the consequences.

How to PREVENT a volume or disk mounting when booting?

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