Dual Booters: Mounting Windows Partitions or Drives

 < Day Day Up > 



If you are a dual booter, meaning that you have both Windows and Linux installed on your hard disk, you may well want to be able to transfer files back and forth between your Windows and Linux partitions or disks. This is useful, for example, if you want to copy some of your Windows fonts to your Linux system, as you will learn to do in the following chapter. To do this, you have to mount your Windows partition or drive.

Now don’t start hollering that your Windows partition is not a USB device; I know that. However, the process of setting up your system so that you can easily mount your Windows partition or drive is essentially the same as the one you learned for mounting USB drives.

Locating Your Windows Partition or Drive

Just as with USB storage devices, the first thing you have to do is locate your Windows drive or partition with the Hardware Browser. Go to your Main menu and select System Tools > Hardware Browser, and then type your root password when requested to do so. Once the Hardware Browser opens up, click Hard Drives in the left panel.

Next, look for your Windows partition, which will most likely be hda1. Once you’ve done this, check under the Type column to see what the file system format is for the partition. If it is fat16 or fat32, you will have no problem. If, however, it is ntfs (which is the default file system for Windows NT, 2000, and XP) you are out of luck and will have to forgo this process, as Linux doesn’t let you, as of yet, mount NTFS partitions, and not without good reason. Linux kernel support for NTFS is still buggy, thus endangering the integrity of such partitions or drives.

If you have a FAT16 or FAT32 partition, jot down the information for that partition. In the case of the example shown earlier in Figure 12-3 on page 166, the necessary info would be: /dev/hda1 fat32. Once you’ve done that, you can go on to edit the fstab file.

Adding Your Windows Partition or Drive to the fstab File

Open a Terminal window, become root, and then type gedit /etc/fstab and press ENTER. When the fstab file opens in Gedit, add a new entry to the bottom of the list by typing the following:

/dev/hda1  /mnt/windows  vfat  defaults,users,noauto 0 0

Of course, if your device location is different, change the entry accordingly. You might also want to change noauto to auto. If you do this, a desktop icon for your Windows partition or drive will appear each time you log in, thus eliminating the mount step each time you start your machine. When all is as you want it, click the Save button, and quit Gedit.

Creating a Mountpoint

Now that your fstab has been edited, it is time to create the mountpoint that you listed in your fstab entry. Go back to your Terminal, which should still be in root mode, and type mkdir /mnt/windows and press ENTER.

Mounting Your Windows Partition or Disk

You can mount your Windows partition or drive in essentially the same manner as was described for USB storage devices. Right-click anywhere on your desktop, and then, in the pop-up menu, select Disks > windows. A desktop icon for your Windows partition or drive will then appear.

Double-clicking your Windows partition desktop icon will open a Nautilus window. You can then drag files to and from the Windows partition.

If you changed noauto to auto in your Windows partition fstab entry, you won’t have to do anything the next time you start up your machine, as your Windows partition will be mounted automatically on startup, and the Windows partition desktop icon will appear automatically.

Unmounting Your Windows Partition or Disk

Unmounting your Windows partition or disk is done in the same manner as unmounting USB storage devices. Close any open Nautilus windows for the partition, and then right-click the desktop icon for the Windows partition or drive and select Unmount Volume from the pop-up menu.



 < Day Day Up > 



Linux for Non-Geeks. A Hands-On, Project-Based, Take-It-Slow Guidebook
Linux for Non-Geeks: A Hands-On, Project-Based, Take-It-Slow Guidebook
ISBN: 1593270348
EAN: 2147483647
Year: 2003
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net