Load NTFs and FAT32 partitions in Fedora Core 4.0

Source: Internet
Author: User
I. Basic commands;


1. Command fdisk-L for viewing disk partitions;

For example:[root@localhost beinan]# /sbin/fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 7751 39728745 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux

Through the above, we can know that/dev/hda1 is in NTFS format;/dev/hda2 is in FAT32 format;


2. mount command;

Is the mount command for Disk Partitions. If the kernel supports this, the mount command can mount almost all file systems, such as reiserfs; ext2; ext3; NTFS; FAT32; JFS; in Linux, we usually use reiserfs, ext3, and ext3. in windows, we mainly use NTFS, FAT32, and fat;

Usage of mounting a disk partition:
Mount-T file format-O option parameter disk partition mount point directory name

In this case, the newbie may not quite understand what is the file format, what is the Directory Name of the mount point, and how to load a partition to Linux. Do we have to store it somewhere? For example, Mount/dev/hda1 to the/mnt/winc directory. First, check whether winc exists in the/mnt directory. If there is no winc, create one; of course, the directory name of the mount point is customized by yourself. It is best to use English;

The following is an example. This is the case with the new brother Xianzhi;

3. Command for DF-lH disk usage; this is important;

[Root @ localhost beinan] # DF-lH
Filesystem capacity in use available % mount point
/Dev/hda8 11g 5.9g 4.5g 57%/
/Dev/SHM 236 M 0 236 m 0%/dev/SHM
/Dev/hda1 5.9g 3.2g 2.7g 55%/mnt/winc
/Dev/hda2 16g 8.1g 7.7g 52%/mnt/wind
/Dev/hda5 7.9g 5.8g 2.1g 74%/mnt/slack


4. file and directory permissions;

I have written this in the Forum and have time to sort it out. I know that umask = 000 can be read and written by any user. Some things are easy to understand, and it is OK to execute a few more commands.

5. kernel version;
[root@localhost beinan]# uname -a
Linux localhost.localdomain 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux

I learned from the above that the current kernel version is 2.6.11-1.1369 _ FC4

6. The command to obtain the root user is Su.
[Beinan @ localhost ~] $ Su
Password: enter your root password here. Even if you enter the password, it will not be displayed. to install the RPM package, you must use the root Super permission;
[Root @ localhost beinan] #


Ii. NTFS file system Loading;


1. First, we need to confirm the kernel of the system. We need to download Kernel patches that support NTFS Based on the kernel version of the system;

We have learned from fdisk-l that/dev/hda1 is an NTFS partition. How can we load it? In Fedora Core 4.0, NTFS loading is not supported by the system by default. We can only install the NTFS plug-in or compile the kernel of a third-party kernel. The plug-in is the most convenient for compiling the kernel, is also the simplest;

 

[root@localhost beinan]# uname -a
Linux localhost.localdomain 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux

Be sure to check carefully. It is 2.6.11-1.1369_fc4, Which is i686 and does not contain SMP. SMP supports multi-processor kernels. If you use this kernel, download the SMP version;

Where can we download it?

Kernel NTFS project in http://linux-ntfs.sourceforge.net

The RPM package of the kernel NTFS of Fedora Core 4.0 is as follows:

Http://linux-ntfs.sourceforge.net/rpm/fedora4.html

Based on the kernel information above, we want to download 2.6.11-1.1369 _ FC4 i686. The download should be:

Kernel-module-ntfs-2.6.11-1.1369_FC4-2.1.22-0.rr.6.0.i686.rpm

Address: http://prdownloads.sourceforge.net/linux-ntfs/kernel-module-ntfs-2.6.11-1.1369_FC4-2.1.22-0.rr.6.0.i686.rpm

Select an image to download:

Install the kernel NTFS module:

[root@localhost beinan]# rpm -ivh kernel-module-ntfs*


2. Determine which partition is in NTFS format and load the NTFS partition;
[root@localhost beinan]# /sbin/fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 7751 39728745 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux

We have installed the kernel NTFS mode and now enters the NTFS partition loading process. From the above view, we know that/dev/hda1 is in NTFS format;

1] create a directory for the mount point. For example, create a winc directory under the/mnt/directory:

[Root @ localhost beinan] # mkdir/mnt/winc

2] Mount/dev/hda1 to/mnt/winc, so that if we view the/dev/hda1 disk content, we will find it in/mnt/winc;

[root@localhost beinan]# mount -t ntfs -o nls=utf8,umask=000 /dev/hda1 /mnt/winc

Note:-t ntfs indicates that the file system format is NTFS;-O is an option. What are the options? NLS = utf8 indicates that native language support (supported by local languages) is utf8, which is also commonly used language encoding. Fedora Core 4.0 uses utf8 as the default language encoding, in this way, Chinese characters are displayed. umask = 000 indicates that all user groups can read and write data. However, because NTFS is not secure in Linux, it can only be read and cannot be written. If you want to write data, you can only compile the kernel for implementation, but the meaning is not too great;

Is it mounted?

[Root @ localhost beinan] # DF-lH
Filesystem capacity in use available % mount point
/Dev/hda8 11g 5.9g 4.5g 57%/
/Dev/SHM 236 M 0 236 m 0%/dev/SHM
/Dev/hda1 5.9g 3.2g 2.7g 55%/mnt/winc

It seems that the mounting is complete; we can go to/mnt/winc to see if there is any content;[root@localhost beinan]# cd /mnt/winc
[root@localhost beinan]# ls


3] How to automatically load NTFS file system partitions at startup;

Based on the disk location, we can see/dev/hda1 above, right? Therefore, add the following line to the/etc/fstab file;/dev/hda1 /mnt/winc ntfs umask=000,nls=utf8


4] How can I put this disk partition on the gnome or KDE Desktop?

In Kde, you just need to click the mouse and right-click the blank area on the desktop to find it. It's too simple to talk about it;

It is also very simple in GNOME:

For example, if I log on to the beinan system as a user and want to put it on the GNOME Desktop OF THE beinan user;

[beinan@localhost ~]$ ln -s /mnt/winc/ ~beinan/Desktop/winc


3. Loading partitions of the FAT32 File System;

Through fdisk-l, we also know that/dev/hda2 is in FAT32 format;/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)

The support for FAT32 in Linux is readable and writable, so there is no need to install any modules or the like;

1. Create a directory for the mount point. For example, create a directory for wind under the/mnt/directory:

[root@localhost beinan]# mkdir /mnt/wind


2. Mount/dev/hda2 to/mnt/wind.
[root@localhost beinan]# mount -t vfat -o iocharset=utf8,umask=000 /dev/hda2 /mnt/wind/

Check whether the mounting is complete?[Root @ localhost beinan] # DF-lH
Filesystem capacity in use available % mount point
/Dev/hda8 11g 5.9g 4.5g 57%/
/Dev/SHM 236 M 0 236 m 0%/dev/SHM
/Dev/hda1 5.9g 3.2g 2.7g 55%/mnt/winc
/Dev/hda2 16g 8.1g 7.7g 52%/mnt/wind

It seems that the mounting is complete. You should check it in;[Root @ localhost beinan] # cd/mnt/wind
[Root @ localhost beinan] # ls-lH
Drwxrwxrwx 3 Root 8.0 K 11:45 capture
Drwxrwxrwx 2 root Root 8.0 K test file August 12 10:21
Drwxrwxrwx 4 Root 8.0 K July 27 11:45 computer hardware
Drwxrwxrwx 5 root Root 8.0 K July 27 11:45 Internet Express

There is no problem with Chinese support; this is in my machine;

3. How to automatically load the partition of the FAT file system at startup;

Based on the disk location, we can see/dev/hda1 above, right? Therefore, add the following line to the/etc/fstab file;/dev/hda2 /mnt/wind vfat umask=000,nls=utf8


4] How can I put this disk partition on the gnome or KDE Desktop?

In Kde, you just need to click the mouse and right-click the blank area on the desktop to find it. It's too simple to talk about it;

It is also very simple in GNOME:

For example, if I log on to the beinan system as a user and want to put it on the GNOME Desktop OF THE beinan user;

 

[beinan@localhost ~]$ ln -s /mnt/wind/ ~beinan/Desktop/wind


4. Garbled text files;

For example, we can see that some text files are garbled. You can use gedit to open them and save them as utf8 format;

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.