Linux mounting is quite common, So I studied Linux mounting and shared it with you here. I hope it will be useful to you. Linux mounting can improve the ease of use performance. Next we will talk about Linux mounting.
Linux mounting windows hard drive (NTFS/FAT32)
Run the following command on the terminal:
- [root@localhost ~]#uname -r
- 2.6.18-92.el5
- [root@localhost ~]#rpm -q –queryformat “%{ARCH}\n” kernel
- I686
Above can see Linux Mount system kernel is what version, so as to determine their desired corresponding version of the ntfs patch according to the above information and then enter the corresponding download page http://linux-ntfs.org/doku.php? Id = redhat: start download the patch and the above script prompts me that the information is 2.6.18-92. el5. Because my system is centos5.2, select RedHat Enterprise 5 (Tikanga ).
- 2.6.18-92.1.13.el5 i686 i686-xen x86_64 x86_64-xen FlatCap, Roger Olson
- 2.6.18-92.1.10.el5 i686 i686-xen x86_64 x86_64-xen FlatCap, Roger Olson
- 2.6.18-92.1.6.el5 i686 i686-xen x86_64 x86_64-xen FlatCap, Roger Olson
- 2.6.18-92.1.1.el5 i686 i686-xen x86_64 x86_64-xen FlatCap, Roger Olson
- 2.6.18-92.el5 i686 i686-xen x86_64 x86_64-xen FlatCap, Roger Olson
Mount Windows partitions in Linux
1. Manual Linux mounting
In Linux mounting, you can also read Windows partitions, including fat32 and ntfs. First, you need to know the name of the hard disk partition under Linux mounting. For example, in Windows, the C drive is generally hda1, the D Drive is hda5, And the e drive is hda6. For details, see the relevant documentation.
To mount Windows partitions, you must first determine that the locale of your Linux system includes the language and character encoding information used by the system ). Common locale in Chinese Linux is zh_CN.gb2312, zh_CN.gbk, zh_CN.gb18030 and zh_CN.UTF-8.
In the default installation, locale for Debian Linux and Mandriva Linux is zh_CN.gb2312, while locale for Ubuntu Linux and Fedora Linux is a zh_CN.UTF-8. It is best not to change locale at will, otherwise there will be a lot of garbled characters. To view the locale of the system, run the following command on the terminal:
Echo $ LANG
Secondly, you need to know the format of your windows partition. This can be seen in the partition attributes of windows, which are generally in the fat32 and ntfs formats.
Suppose your locale is a zh_CN.UTF-8 and you want to mount a windows partition in the/dev/hda1 fat32 format to the/mnt/C directory if this directory does not exist, create a new one manually ), you can enter the following command in the terminal (sudo must be added before this command in Ubuntu): mount-t vfat/dev/hda1/mnt/C-o iocharset = utf8
If your locale is not a zh_CN.UTF-8, change the utf8 command above to gb2312; if the windows partition is in ntfs format, change the vfat command above to ntfs. In this way, only root partitions in ntfs format can be read. If you want normal users to read partitions, you need to add the umask = 022 option, as shown below: mount-t ntfs/dev/hda1/mnt/C-o iocharset = utf8, umask = 022
Similarly, if you want to allow all users to read and modify the mounted partition, you can change umask = 022 to umask = 0. Detaching a partition is much easier: umount/dev/hda1 sometimes prompts that the partition is busy when detaching the partition). You can use the following command to check which process is using this partition: fuser-cu/dev/hda1 if the output on the screen is/dev/hda1: 8463 m (UDF), you can use this command to check the program name of the process: ps 8463 then you can run this command to end the process: kill-9 8463 so that you can unmount the partition normally.
2. Automatic Linux mounting
To enable the Linux mounting system to automatically mount windows partitions at startup, you can write the preceding command to the/etc/fstab file. The following is an example:
- # /etc/fstab: static file system information.
- #
- #[file system] [mount point] [type] [options] [dump] [pass]
- proc /proc proc defaults 0 0
- /dev/hda9 / ext3 defaults 0 1
- /dev/hda13 none swap sw 0 0
- /dev/hdc /media/cdrom iso9660 ro,user,noauto 0 0
- /dev/fd0 /media/floppy auto rw,user,noauto 0 0
- /dev/hda10 /mnt/debian ext3 defaults 0 0
- /dev/hda1 /mnt/C ntfs utf8,umask=022 0 0
- /dev/hda5 /mnt/D vfat utf8,umask=0 0 0
Install patches on Linux
- [Root @ localhost ~] # Rpm-ivh kernel-module-ntfs-2.6.18-92.el5-2.1.27-0.rr.10.11.i686.rpm
- Preparing... ######################################## ### [100%]
- 1: kernel-module-ntfs-2.6. ######################################## ### [100%]
- [Root @ localhost ~] #/Sbin/modprobe ntfs # loading into the kernel
- [Root @ localhost ~] # Dmesg | grep NTFS # display log information. Note the case sensitivity.
- NTFS driver 2.1.20 [Flags: R/w module].
Check whether the NTFS module is supported after installation:
- [root@localhost ~]#cat /proc/filesystems
- nodev autofs
Check whether the ntfs module is loaded. Then, the driver is loaded and the ntfs partition can be mounted. [root @ localhost ~] # Fdisk-l view partition information
- Disk /dev/sda: 320.0 GB, 320072933376 bytes
- 255 heads, 63 sectors/track, 38913 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
-
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 13 104391 83 Linux
- /dev/sda22551 38912 292077765 f W95 Ext’d (LBA)
- /dev/sda52551 17848 122881153+ 7 HPFS/NTFS
- /dev/sda6 17849 31871 112639716 7 HPFS/NTFS
- /dev/sda7 31872 38912 56556801 8e Linux LVM
SATA Hard Disk: sdaX, IDE Hard Disk: hdaX
Start mounting NTFS partitions
[Root @ localhost ~] # Mount-t ntfs/dev/sda5/mnt/d and mount the NTFS partition/dev/sda5 to the/mnt/d directory.
Mount the FAT32 Partition
[Root @ localhost ~] # Mount-t vfat/dev/sda5/mnt/d and mount the FAT partition/dev/sda5 to the/mnt/d directory.
- Linux Mount Methods
- Linux YUM is built on an ftp server as the source
- CentOS VM supports RedHat AS3/AS4/AS5Linux Operating System
- Linux and Mac platform Dev branch updated to 5.0.307.5
- Ubuntu Linux fish and bear's paw are both really fast