- Joined
- Dec 18, 2010
- Messages
- 162
- Motherboard
- ASUS ROG GL502VM
Hi,
I just learned how to do this and thought I'd share a step by step for those who are like me who love a clean desktop and don't like their windows partition sticking out.
Basically all we are going to do is create a shell command that will unmount these partitions, and set that shell command to exec with boot, you can always remount later by just going into disk utility and remounting them.
STEP 1: Choosing The Partition(s) We Want To Hide
Firstly, We need to choose what we want to hide. As you can see below I have my Lion Installer Partition and my Windows Partition that I don't want there anymore. So I will just remember/write down the names of the two partitions (Easy enough) for later.
STEP 2: Creating The Executable to Unmount the Partitions
Now comes the Terminal fun! We are going to use terminal to create the exec file to unmount these partitions. So open up terminal!
1. Ok first we need to choose a place where this file is going to go (It can be moved later). For ease, I will just choose the Desktop for now. So firstly in terminal type in
"cd Desktop" , No quotation marks.
2. Ok now that we chose where the exec will go, Now comes the process of making the executable. So now that we have enterred "cd Desktop" we are now going to run the nano command followed by your desired name for the exec. The nano command is what allows us to compile these exec's.
So in terminal type "nano "File Name"" IMPORTANT: The quotation marks surrounding File Name are only needed if you want a title with a space in it. For example I called mine "Hide Partitions" so it has to be in quotation marks since it has a space. If your title of the file is spaceless, ignore the quotations around it.
After typing in "nano "File Name"" (Ignore the quotation marks when entering into terminal), Press return, a new window will open.
After Pressing Return, This will appear.
Now we start the fun
So now is when we will program our exec file to do what we please. In my case I will be making it hide my Installer partition, and my Untitled(Windows) Partition.
So I simply first type in "diskutil unmount '/Volumes/Installer'" Without quotation marks. Also, That last apostrophe after your Partitions name is necessary. Do not get rid of it. After that I want to add the same line of code for my Untitled Partition, So I press Return to go down a line and type in "diskutil unmount '/Volumes/Untitled'"
These are commands that unmount your partitions.
After that we want to add another line of code under them that says "Killall Terminal" without quotations then press enter, It will go to a new line. This command is to simply close terminal when its done.
OK! So now we are ready to compile this as an executable! At the bottom of the nano window you will see it says to press ^x to Exit, press it! It will then give you the options for Yes, No, and cancel. press Y for Yes if you are ready to proceed.
Then it will say "File name to Write" Whatever you named it" Then press Enter to confirm!
So now we have a text file on our desktop, BUT WE ARE NOT DONE YET! Now we have to compile this to an exec file. So with your terminal still open (If you quit just re open and redo the cd Desktop.) We are going to type in "chmod +x "Your Files Name"" Remember to ignore the quotations around the command when typing in terminal, and as for the quotations around your files name, only use if you used quotations originally as I explained in red up there^.
Press enter. You now have a compiled and ready to use command file! Go ahead, double click it and test it out! Now for people who like to keep it clean, I moved it to my User Folder and in System Settings>User Settings> User> Login Items> I added the unix Exec we made to launch with boot.
REMOUNTING YOUR DRIVE
Say for some reason you need to temporarily get back into the drive you want to hide. Just open Disk Utility, Right click the unmounted partition and select Mount!
And thats, it. You have successfully hidden your extra drives.
I just learned how to do this and thought I'd share a step by step for those who are like me who love a clean desktop and don't like their windows partition sticking out.
Basically all we are going to do is create a shell command that will unmount these partitions, and set that shell command to exec with boot, you can always remount later by just going into disk utility and remounting them.
STEP 1: Choosing The Partition(s) We Want To Hide
Firstly, We need to choose what we want to hide. As you can see below I have my Lion Installer Partition and my Windows Partition that I don't want there anymore. So I will just remember/write down the names of the two partitions (Easy enough) for later.
STEP 2: Creating The Executable to Unmount the Partitions
Now comes the Terminal fun! We are going to use terminal to create the exec file to unmount these partitions. So open up terminal!
1. Ok first we need to choose a place where this file is going to go (It can be moved later). For ease, I will just choose the Desktop for now. So firstly in terminal type in
"cd Desktop" , No quotation marks.
2. Ok now that we chose where the exec will go, Now comes the process of making the executable. So now that we have enterred "cd Desktop" we are now going to run the nano command followed by your desired name for the exec. The nano command is what allows us to compile these exec's.
So in terminal type "nano "File Name"" IMPORTANT: The quotation marks surrounding File Name are only needed if you want a title with a space in it. For example I called mine "Hide Partitions" so it has to be in quotation marks since it has a space. If your title of the file is spaceless, ignore the quotations around it.
After typing in "nano "File Name"" (Ignore the quotation marks when entering into terminal), Press return, a new window will open.
After Pressing Return, This will appear.
Now we start the fun
So now is when we will program our exec file to do what we please. In my case I will be making it hide my Installer partition, and my Untitled(Windows) Partition.
So I simply first type in "diskutil unmount '/Volumes/Installer'" Without quotation marks. Also, That last apostrophe after your Partitions name is necessary. Do not get rid of it. After that I want to add the same line of code for my Untitled Partition, So I press Return to go down a line and type in "diskutil unmount '/Volumes/Untitled'"
These are commands that unmount your partitions.
After that we want to add another line of code under them that says "Killall Terminal" without quotations then press enter, It will go to a new line. This command is to simply close terminal when its done.
OK! So now we are ready to compile this as an executable! At the bottom of the nano window you will see it says to press ^x to Exit, press it! It will then give you the options for Yes, No, and cancel. press Y for Yes if you are ready to proceed.
Then it will say "File name to Write" Whatever you named it" Then press Enter to confirm!
So now we have a text file on our desktop, BUT WE ARE NOT DONE YET! Now we have to compile this to an exec file. So with your terminal still open (If you quit just re open and redo the cd Desktop.) We are going to type in "chmod +x "Your Files Name"" Remember to ignore the quotations around the command when typing in terminal, and as for the quotations around your files name, only use if you used quotations originally as I explained in red up there^.
Press enter. You now have a compiled and ready to use command file! Go ahead, double click it and test it out! Now for people who like to keep it clean, I moved it to my User Folder and in System Settings>User Settings> User> Login Items> I added the unix Exec we made to launch with boot.
REMOUNTING YOUR DRIVE
Say for some reason you need to temporarily get back into the drive you want to hide. Just open Disk Utility, Right click the unmounted partition and select Mount!
And thats, it. You have successfully hidden your extra drives.