Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

16.4. Accessing a Windows Partition

I have a dual-boot system with Red Hat Linux and Windows 98. Is there a way to access my Windows partition while I am running Linux?

You can access another partition on your system (for example, a Windows partition), in two different ways.

You should first determine where your Windows partition is located by determining what physical hard disk your Windows partition is located in (such as the primary master IDE drive or the the first SCSI drive). To find this information, you can use the Hardware Browser, which lists detailed information about the hardware in your Red Hat Linux system.

To start the Hardware Browser, choose Main Menu => System Tools => Hardware Browser. Figure 16-1 shows Hardware Browser in action.

Figure 16-1. Hardware Browser hard disk device listing

Select Hard Drives from the panel and find your Windows partition from the Disk Information displayed. Windows partitions normally use the FAT or FAT32 file system type. This file system type can be mounted and read within Linux; however, if your Windows partition uses NTFS, then you cannot mount and read from it as Red Hat Linux does not support NTFS file systems. Note the Device information for your Windows partition, as this is the device that you mount to access your Windows data.

Once you have determined where your Windows partition is located on your hard drive, log in as root (type su and then enter the root password) at a shell prompt.

Create a directory in which the Windows partition will be mounted by typing the following command. For example:

mkdir /mnt/windows

Before you can access the partition, you will need to mount it in the directory you just created. As root, type the following command at a shell prompt (where /dev/hda1 is the Windows partition you found via Hardware Browser):

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

You may then logout of root user mode and access your Windows data by changing into the mounted Windows partition:

cd /mnt/windows

To automatically mount a Windows partition every time you boot your Red Hat Linux system, you must modify the /etc/fstab file, which configures all file systems and disk device mounting options.

At a shell prompt, su to root, following the above example.

Next, open the /etc/fstab in a text editor by typing (for example):

gedit /etc/fstab

Add the following on a new line (replacing /dev/hda1 with the Windows partition you found via Hardware Browser):

/dev/hda1 /mnt/windows vfat auto,umask=0 0 0

Save the file and exit your text editor.

The next time the system is rebooted, the /etc/fstab file is read, and the Windows partition is automatically mounted in the directory /mnt/windows. To access the partition at a shell prompt, type the command cd /mnt/windows. To navigate through directories or files with spaces, surround the name of the directory or file with quotation marks, as in ls "Program Files".

 
 
  Published under the terms of the GNU General Public License Design by Interspire