Accessing a Windows Partition

Q: How Do I Access My Windows Partition?

I've got a dual-boot system with Red Hat Linux and Windows 98. Is there a way I can gain access to my Windows partition while I'm running Linux?

A: Two Ways to Access Windows Partition.

You can gain access to another partition on your system -- for example, a Windows partition -- by typing a line similar to the following:

mount -t vfat /dev/hda1 /mnt/vfat
	      

The foregoing assumes that your Windows partition is on your first hard drive, in the first partition (/dev/hda1). Also, before typing the above command, as root, you should create a mount point called /mnt/vfat (Using the command mkdir /mnt/vfat) to hold the data.

Another method of mounting a Windows partition is by entering the correct fields in the /etc/fstab file. One of the easiest ways to enter these fields is through Linuxconf.

Open an Xterm window. If you're in your user account, su to root by typing

su
Password:yourrootpassword
	      

Now, create a mount point for your Windows partition, by typing

mkdir /mnt/vfat
	      

Next, while you're still root, start Linuxconf by typing linuxconf at the prompt.

Scroll down in the "tree view," or left panel of Linuxconf, to the entry marked File Systems, and click on the + to expand the tree.

Now, click on the entry Access local drive. In the right panel, you'll see a list of the currently mounted filesystems. (Your new mount point isn't there because you haven't added it yet. That's coming up…)

Click on the Add button. A tab, marked Volume specification will appear. In the first tabbed entry, called Base, you'll be presented with a series of boxes to fill out, either by typing or by selecting from a drop-down list. Here's what the boxes represent:

Partition: The physical location of your Windows partition (for example, /dev/hda1 for the first partition on the first hard drive);

Type: The filesystem type. A Windows 98 partition, for example, would be vfat;

Mount point: The name of the mount point you'd chosen earlier (for example /mnt/vfat).

There are a few other options, as well, from various tabbed windows; these concern setting permissions for allowing users to access the partition, choosing whether to prevent the partition from being mounted at boot time, and other choices. Some options to pay particular attention to include:

"Dos options": Both "default user id" and "default group id" should be set to your user account if you want to be able to access while you're logged in as user (rather than having to su to root, which is the default mode); "translation mode" should be set to "AUTO" for most purposes, rather than specify either "text" or "binary"; "default permission" specifies whether those with access to the partition can read, write to and/or execute files and directories on the partition. You might select a setting of 755, which allows read, write and execute for the user, and read and execute permissions to the group and others.

"Options": Unless you specify that you do not want the partition to be mounted when you boot your system, it isn't necessary to select the "User mountable" option in this tab.

Make your selections -- if you become stuck, choose the Help button for additional pointers.

When you're finished, select the Mount button to check your new partition. You should see verification that the partition has been successfully mounted.

Now, click on the Accept button. Your new filesystem will be added to /etc/fstab.

To acces the partition now, type cd /mnt/vfat, and to navigate through Windows 98's "long filename" directories, surround the directory in quotation marks, as in ls "Program Files".