How to access Windows partitions under Linux

  



Friends who like Linux generally install Red Hat Linux and Windows 98 on their hard disks. The question that everyone often asks is how to access the Windows partition under Linux. Now let's discuss how to solve this problem.

There are two ways to access partitions of another system in your system.

First, assume that the Windows partition is on the first IDE hard drive and is the first partition (/dev/hdal).

Open the Xterm window. If you are still under the user account, use the "su" command to go to the root user:

su

Password: your root password

Then create an assembly point to save For Windows partition data, type:

mkdir /mnt/vfat

To access the partition with the Xterm root user, type the following:

mount -t vfat /dev/Hdal /mnt/vfat

Another way to access a Windows partition is to enter the correct fields in the file /etc/fstab. The easiest way to enter these fields is to use Linuxconf.

Open the Xterm window. If you are still under the user account, use "su" to go to the root user. The method is the same as above.

Now create a fixed point for the Windows partition, type:

mkdir /mnt/vfat

Next, still under the root user, type "linuxconf" at the prompt , start Linuxconf. Move the "tree view" or the scroll bar on the left side of the Linuxconf, move down to the entry labeled "File Systems" and click "+" to expand the tree structure.

Then click on "Access local drive". In the right panel, you can see a list of currently mounted file systems. (The new assembly point is not inside because you haven't added it yet. See below.)

Click the "Add" button and the display will be labeled "Volume specification" )" tab. In the first prominent entry (named Base), there is a series of boxes to fill in, or type in the content or select from the drop-down menu. Here is the box:

Partition: The physical location of the Windows partition (for example, the first partition of the first hard disk is /dev/hdal);

Type : File system type. The file system type of the Windows 98 partition is vfat.

Mount point: The name of the assembly point you selected (such as /mnt/vfat).

DOS and LINUX command comparison study table

Since Linux's graphical interface is mainly operated under the shell, learning Linux commands is especially important. But Linux commands are not easy to remember. The following table is a list of commands and simple examples for Linux and DOS. If you need more information, you can use the man command under Linux.

Execution Content MS-DOS Linux Example

Copy File Copy cp cp thisfile.txt /home/thisdirectory

Move file move mv mv thisfile.txt /home/thisdirectory< Br>

Column directory dir ls Ls

Clear screen cls clear Clear

Close window exit exit Exit

Set date date Date

Delete File del rm rm thisfile.txt

screen output echo echo this message

file editor edit pico pico thisfile.txt

file comparison fc diff diff file1 file2

Find find grep grep this word or phrase thisfile.txt

Format floppy format a: mke2fs /sbin/mke2fs /dev/fd0

(if the floppy drive is A:) or Mformat (/dev/fd0 is equivalent to DOS below A:)

Online command help command /? man man command

build directory md mkdir mkdir directory

split screen display more Less less thisfile.txt

Rename ren mv mv thisfile.txt thatfile.txt

View system path chdir pwd Pwd

Conversion path cd pathname cd pathname cd /directory/directory

Rewind to parent directory cd .. cd .. cd ..

Display time Time date date

Display memory free space mem free free

Different windows have different options for setting the user's access to the partition and selecting whether to stop the partition assembly at startup. And other options. Options that require special attention include:

Dos option: If you want the user account to access the partition, then "default user id" and "default group id" should be set. For the user account (so that you don't need to use the "su" command to return to the root user as the default); the translation mode (translation mode) should be set to "auto" in most cases, instead of being specified as "text" or "binary"; default permission (default permission) specifies whether access to the partition has read, write, and permission to execute files and directories on the partition. You can choose the setting value of 755, which means that the user has read, write and execute permissions, while the group and other have read and execute permissions.

Option: You do not have to select the "User mountable" option in this tab unless you specify the Not Mount at boot time.

Select each option and press the "Help" button if you have questions.

When finished, select the "Mount" icon to check the new partition and verify that the partition has been successfully assembled.

Now click on the "Accept" button and the new file system will be added to /etc/fstab.

To access the partition, type "cd /mnt/vfat". To navigate through the long file name directory of Windows 98, you should put a quotation mark in the directory, for example, ls "Program Files".

Through the above two methods, you can access the contents of Windows under Linux to solve the problem of file sharing.



Copyright © Windows knowledge All Rights Reserved