How to mount Windows partitions and U disk on Linux systems

Source: Internet
Author: User

  1. Supports NTFS partitions

If your Windows partition is formatted with NTFS, you can do this by compiling the kernel in order to enable Linux to support NTFS, but the easiest way is to install the NTFS-enabled RPM package.

Right-click and select here to open the terminal in the shortcut menu. Enter UNAME-A in the terminal to view the kernel version, download the corresponding kernel rpm, my rh9 is kernel-ntfs-2.4.20-8.i686.rpm. Enter in the terminal

  Code:

RPM-IVH kernel-ntfs-2.4.20-8.i686.rpm

Can. (RPM is the command to install the RPM package, parameter I is to display the information about the software package, V to show the command to execute the process, h for the package installation when the mark is listed)

  2. Mount Windows partition

In the partitioning representation of Linux, HDD for HD, first hard drive for HDA, second for HDB. A hard drive can be divided into four primary partitions, DOS primary partitions, DOS extended partitions, Linux root partitions and Linux swap partitions are primary partitions, and 4 primary partitions are represented by numbers. If it's the first hard drive, Hda1,hda2,hda3 and hda4. You can also divide logical partitions on the extended partition, and the labels are sorted from 5 to the next. In Windows C disk is a DOS primary partition, is the hda1,d disk is generally the first logical partition on the DOS extended partition, is the HDA5, E is hda6,f for HDA7 and so on. Under Linux, you can mount a Windows partition to a folder (this folder is called a mount point), and then you can access Windows partitions through this folder, just like a shortcut.

  If C disk is mounted

First create a new directory in the/mnt/directory Winc

In the terminal input

  Code:

Mount-t Vfat/dev/hda1/mnt/winc-o codepage=936 iocharset=936

(Where-T is the specified device file system, VFAT represents the Windows FAT16 and FAT32 file system format,-o specifies options for loading the file system, and option codepage=936 iocharset= 936 is to enable Linux to properly display the Mount partition in Chinese)

If you want to automatically load Windows partitions every time you turn on, you can modify the Fstab file under/etc/, in the form

  Code:

/dev/hda1/mnt/winc VFAT defaults,codepage=936,iocharset=cp936

Restart after saving.

My fstab content is as follows

  Code:

label=//ext3 Defaults 1 1

None/dev/pts devpts gid=5,mode=620 0 0

NONE/PROC proc Defaults 0 0

NONE/DEV/SHM TMPFS Defaults 0 0

/DEV/HDB2 Swap Defaults 0 0

/dev/cdrom/mnt/cdrom udf,iso9660 Noauto,owner,kudzu,ro 0 0

/dev/fd0/mnt/floppy Auto Noauto,owner,kudzu 0 0

/dev/sda1/mnt/usb vfat noauto 0 0

/dev/hda1/mnt/winc NTFS defaults 0 0

/dev/hda5/mnt/wind vfat defaults,codepage=936,iocharset=cp936 0 0

/dev/hda6/mnt/wine vfat defaults,codepage=936,iocharset=cp936 0 0

/dev/hda7/mnt/winf NTFS defaults 0 0

Also, use the mount-t iso9660-o loop name. ISO mount points can be used directly with ISO files, while 8 requires virtual optical drives like Windows.

  3. Mount U Disk

Under the Linux u disk is as a SCSI device, Mount U disk before the first confirm U disk device name, in the terminal input Dmesg|more view, my is sda1

Set up mount point/mnt/usb

and use

  Code:

Mount-t Vfat/dev/sda1/mnt/usb

Mount, or by adding in the Fstab

  Code:

/dev/sda1/mnt/usb VFAT Defaults 0 0

Boot automatically mount, but with defaults parameters, if the boot when the U disk did not plug in, it will be an error.

So I was in fstab to add/dev/sda1/mnt/usb vfat noauto 0 0, and then on the desktop to create a new hard disk device link, in the link properties of the Device tab select the device for/DEV/SDA1 (/MNT/USB) semi-automatic mount. When you want to use a U disk, Just click on the link to do it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.