InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 03-22-2008, 10:41 PM
Voyn1x's Avatar
Voyn1x Voyn1x is offline
 
Join Date: Jan 2008
Location: United Kingdom
Posts: 554
This tutorial is great for keeping your desktop tidy by unmounting drives you don't need regular access to. For example this could be your Windows drive, Tiger partition etc. I thought this could be added to the wiki, i'm sure others would find this useful

First get the UUID of a volume you wish to stop mounting - this can be seen in Disk Utility (click the Info button and find the Universal Unique Identifier).

Now that you have a UUID for the volume to hide during the mount process, from an admin account create your /etc/fstab file (in Leopard this file doesn't exist by default):

From Leopard on you need to use vifs to create and edit /etc/fstab, or at least you should*.

Code:
sudo vifs
Add a line with the UUID for your volume and the mounting point information, for example:

Code:
# Identifier,  mount point,  fs type,  options
UUID=F0E430C1-5558-3BB3-9FA9-6904B663FEEA  none  hfs  rw,noauto
The Identifier is used to identify the volume.

The mount point is the directory used when the volume is mounted; set none to use the pre-defined OS X directory, i.e. ./Volumes/

The fs type describes the type of the filesystem; use hfs for a Mac volume, use ntfs if it's a NTFS formatted PC volume. The field options describes the mount options associated with the filesystem. 'noauto' will force the volume not to be mounted automatically; and last, use 'rw' or 'ro' for a read-write or read-only disk.

One thing to note is that FAT32 and NTFS formatted volumes are not assigned a UUID. You'll have to use LABEL instead of UUID and change the fs type to 'msdos' or 'ntfs'. NTFS volumes are mounted read only under os x, so you'll also have to change the option from 'rw' to 'ro'.

eg.

FAT32
Code:
LABEL=<drive name> none msdos rw,noauto
NTFS
Code:
LABEL=<drive name> none ntfs ro,noauto
Save the file and reboot (for internal drives) or unmount, disconnect and reconnect the volume (for external drives). Now the system should not mount the partition identified in fstab. You can still manually mount the volume in Disk Utility, or via the command line (and for a volume containing a boot system, rebooting from it).

Also, you might find that /etc/fstab is ignored and your partition still mounts. Two things you can try:*
  1. Code:
    sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool true
  2. Instead of using "none" for the mountpoint use the normal location i.e. /Volumes/WindowsXP along with the ro,noauto options.
Reply With Quote
  #2  
Old 03-25-2008, 02:07 AM
agrafuese agrafuese is offline
Panther
 
Join Date: Feb 2008
Posts: 162
Hey good tip. I used to do this when I had other drives in my system, but I never knew about the UUID method. I only ever used the name of the volume in the command, but that's not as good because it could always change (accidentally or intentionally). It's also a hassle because you have to type in space characters if your volume name has a space in it. Thanks.
Reply With Quote
  #3  
Old 03-25-2008, 02:13 AM
roisoft's Avatar
roisoft roisoft is offline
 
Join Date: Jan 2008
Location: Spain
Posts: 450
you can use "boot uuid=xxxx-xxx-xxxx..." like an kernel flag in boot.plist for boot leopard from a software raid for example.
Reply With Quote
  #4  
Old 03-25-2008, 02:59 AM
bhast2 bhast2 is offline
Tiger
 
Join Date: Jan 2008
Location: USA
Posts: 396
can you do this if you have leopard and vista on the same hd
Reply With Quote
  #5  
Old 03-25-2008, 03:22 AM
agrafuese agrafuese is offline
Panther
 
Join Date: Feb 2008
Posts: 162
Unmounting at startup? Yes.
Reply With Quote
  #6  
Old 03-25-2008, 06:16 AM
bhast2 bhast2 is offline
Tiger
 
Join Date: Jan 2008
Location: USA
Posts: 396
so where is the uuid number because i can't find it for my windows partition???

cause this is all it show in disk utility
Name : disk0s2
Type : Volume

Disk Identifier : disk0s2
Mount Point : /Volumes/Untitled
File System : Windows NT Filesystem 3G
Connection Bus : ATA
Device Tree : /PCI0@0/SAT1@8/PRI0@0/@0:2
Writable : Yes
Capacity : 100.7 GB (108,162,580,480 Bytes)
Free Space : 69.6 GB (74,690,961,408 Bytes)
Used : 31.2 GB (33,471,614,976 Bytes)
Number of Files : 81,378
Number of Folders : 0
Owners Enabled : Yes
Can Turn Owners Off : No
Can Repair Permissions : No
Can Be Verified : Yes
Can Be Repaired : Yes
Can Be Formatted : Yes
Bootable : No
Supports Journaling : No
Journaled : No
Disk Number : 0
Partition Number : 2
Reply With Quote
  #7  
Old 03-25-2008, 06:21 AM
Ianxxx Ianxxx is offline
Leopard
 
Join Date: Jan 2008
Posts: 645
you have to click on menu at top of screen, then file, then get info
Reply With Quote
  #8  
Old 03-25-2008, 06:34 AM
bhast2 bhast2 is offline
Tiger
 
Join Date: Jan 2008
Location: USA
Posts: 396
that is what i am clicking and that is what it shows
ok it will show it for my leopard partition but there isn't one for my windows partition
Leo partition
Name : Leo
Type : Volume

Disk Identifier : disk0s3
Mount Point : /
File System : Mac OS Extended (Journaled)
Connection Bus : ATA
Device Tree : /PCI0@0/SAT1@8/PRI0@0/@0:3
Writable : Yes
Universal Unique Identifier : CBA0AF8F-B8BE-37BF-B765-78C3C0CAF3D9
Capacity : 197.0 GB (211,566,379,008 Bytes)
Free Space : 183.7 GB (197,253,259,264 Bytes)
Used : 13.3 GB (14,313,119,744 Bytes)
Number of Files : 380,148
Number of Folders : 93,242
Owners Enabled : Yes
Can Turn Owners Off : Yes
Can Repair Permissions : Yes
Can Be Verified : Yes
Can Be Repaired : Yes
Can Be Formatted : Yes
Bootable : Yes
Supports Journaling : Yes
Journaled : Yes
Disk Number : 0
Partition Number : 3

windows partition
Name : disk0s2
Type : Volume

Disk Identifier : disk0s2
Mount Point : /Volumes/Untitled
File System : Windows NT Filesystem 3G
Connection Bus : ATA
Device Tree : /PCI0@0/SAT1@8/PRI0@0/@0:2
Writable : Yes
IT SHOULD BE RIGHT HERE BUT IT IS MISSING
Capacity : 100.7 GB (108,162,580,480 Bytes)
Free Space : 69.6 GB (74,690,961,408 Bytes)
Used : 31.2 GB (33,471,614,976 Bytes)
Number of Files : 81,378
Number of Folders : 0
Owners Enabled : Yes
Can Turn Owners Off : No
Can Repair Permissions : No
Can Be Verified : Yes
Can Be Repaired : Yes
Can Be Formatted : Yes
Bootable : No
Supports Journaling : No
Journaled : No
Disk Number : 0
Partition Number : 2

Quote:
[cite] Ianxxx:[/cite]you have to click on menu at top of screen, then file, then get info
Reply With Quote
  #9  
Old 03-25-2008, 06:36 AM
Ianxxx Ianxxx is offline
Leopard
 
Join Date: Jan 2008
Posts: 645
On partition not drive
Strange comes up between Writable : Yes
and
Capacity : 100.7 GB (108,162,580,480 Bytes)
Reply With Quote
  #10  
Old 03-25-2008, 06:42 AM
Ianxxx Ianxxx is offline
Leopard
 
Join Date: Jan 2008
Posts: 645
try in terminal
diskutil info diskXsY



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.

Reply With Quote
Reply