Boot CampWhen I switched to mac, I did so with equal amounts excitement and reluctance. I’ve grown familiar with my windows-only software, and as a web designer, it would be irresponsible to completely ditch Windows and IE (as much as I wish I could). Inevitably, I made a Windows XP partition, and came to hate the added clutter on my desktop due to the (NTFS formatted) XP drive showing on my desktop. I have no reason for it to be there, so why would I want it to mount? Sure, you could just unmount it on startup, but that’s just an extra step on startup, and I don’t know about you, but that just makes me feel like I’m back to Windows. Knowing that OS X was based on BSD/UNIX, I knew I had a tool available to me to help clear my desktop: fstab.

fstab is what UNIX-based operating systems use to manage auto-mounting of drives. It is in the fstab file that you can specify what drives are mounted, how they are mounted, and in our case- which drives should NOT be mounted. Unfortunately, you can’t just tell fstab “hey, don’t mount my XP volume.” However telling it what to do is not much harder.

  • The first thing you’ll have to do is fire up your terminal and type diskutil list:

    $ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *298.1 Gi disk0
    1: EFI 200.0 Mi disk0s1
    2: Apple_HFS Macintosh HD 265.9 Gi disk0s2
    3: Microsoft Basic Data 31.9 Gi disk0s3
    /dev/disk1
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *298.1 Gi disk1
    1: EFI 200.0 Mi disk1s1
    2: Apple_HFS Time Machine 297.8 Gi disk1s2

    This will report on the status of all of your disks, returning essential information. What you’re looking for is the one labeled “Microsoft Basic Data” Followed by the name of the volume (Usually Windows, but if it’s left “Untitled”- like mine is- it won’t show up here).

  • Once you’ve found the identifier (in my case, it’s disk0s3, you’ll need to type another command to get more info on the disk: diskutil info disk0s3 (where “disk0s3″ is the identifier found above):

    $ diskutil info disk0s3
    Device Identifier: disk0s3
    Device Node: /dev/disk0s3
    Part Of Whole: disk0
    Device / Media Name: Untitled

    Volume Name:
    Mount Point:
    File System: NTFS

    Partition Type: Microsoft Basic Data
    Bootable: Is bootable
    Media Type: Generic
    Protocol: SATA
    SMART Status: Verified
    Volume UUID: A59D682A-B749-4CE9-9CB3-7E89BC93B520

    Total Size: 31.9 Gi (34247852032 B) (66890336 512-byte blocks)
    Free Space: 0.0 B (0 B) (0 512-byte blocks)

    Read Only: No
    Ejectable: No
    Whole: No
    Internal: Yes

    What you’re looking for is the Volume UUID, which (in my case) is A59D682A-B749-4CE9-9CB3-7E89BC93B520.

  • All that’s left now is to add the following line into your fstab file:
    UUID=A59D682A-B749-4CE9-9CB3-7E89BC93B520 none ntfs ro,noatuo 0 0
    You can do this using pico, just by typing:
    sudo pico /etc/fstab
    and then pasting the above line into the file, making sure to replace my UUID with yours. Once you’re done, press Ctrl-X and save the file, then reboot.

A QUICK WARNING
This will also remove the drive from the startup disks list in your system preferences. In order to boot into Windows, you’ll have to hold down the “Alt” key after hearing the startup chime when you turn your mac on. There have been reports of this method of booting into Windows not working when using a non-apple keyboard.
Also, make sure you take great caution when editing the fstab file. If you were to accidentally enter the wrong UUID, you may not be able to boot into OS X. This is because the fstab file determines which partitions/drives are mounted at startup, and if you enter your OS X disk UUID…well, you won’t have a drive to boot to. Similarly, if you enter your Time Machine UUID, you won’t be able to run backups until you remove the line from fstab and reboot.

Related posts: