Skip navigation

How to PREVENT a volume or disk mounting when booting?

6413 Views 25 Replies Latest reply: May 30, 2013 3:25 PM by ApMaX RSS
1 2 Previous Next
ApMaX Level 1 Level 1 (5 points)
Currently Being Moderated
Apr 30, 2013 1:36 AM

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.

  • lrr394 Level 1 Level 1 (5 points)
    Currently Being Moderated
    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

  • lrr394 Level 1 Level 1 (5 points)

    hfs might be a different element that you might have to change.  In mouse cases, harddrive partitions are set as hfs.  If its a windows partition, than it might be ntfs.

  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Apr 30, 2013 5:36 AM (in response to ApMaX)

    1. Each line needs to be its own line, however you accomplish that.

    2. You can just put extra lines in the fine. An unknown UUID will be ignored. The fstab will have to be installed on each Mac.

    3. To revert the change you will have to remove the fstab file or comment out the appropriate lines.

  • lrr394 Level 1 Level 1 (5 points)
    Currently Being Moderated
    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.

  • Linc Davis Level 10 Level 10 (107,995 points)
    Currently Being Moderated
    Apr 30, 2013 8:22 AM (in response to ApMaX)

    Apart from anything else, those UUID's are invalid. They should not contain letters after F.

  • etresoft Level 7 Level 7 (23,905 points)

    You are using sudo commands to make non-standard modifications to your operating system. Then you are shocked when it doesn't behave the same way? Shocking!

  • etresoft Level 7 Level 7 (23,905 points)

    That is what the automounter is for. If you aren't using those disks, unplug them.

  • etresoft Level 7 Level 7 (23,905 points)

    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.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.