http://www.linux-ntfs.org/

Q:
How do I read my NTFS (Windows NT/2000/XP/2003) drive in Fedora? (Updated 25 July 2005)

A: Well, now, that's an easy one! You just have to install the NTFS kernel module for your kernel:
  1. Make sure you are using my yum configuration.
  2. Open a terminal.
  3. Become root.
  4. Type:

    yum install kernel-module-ntfs-$(uname -r)

Now you can read your NTFS drives! Unfortunately, you cannot write to them, though.

NOTE: You will have to re-run the above steps every time you install a new kernel, after you reboot with the new kernel.

For information on how to use your NTFS drive, you can read the NTFS FAQ.


Mount NTFS Partitions

11 November 2004

Either recompile your kernel for NTFS read support. (Hard)
Or obtain the matching the proper kernel module. Again make sure
you have the correct version (example similar to: 2.6.9-1.667).
Use the 'uname -rm' command for more information.

Go to http://linux-ntfs.sourceforge.net/rpm/fedora3.html
for the module/rpm.
Go to http://linux-ntfs.sourceforge.net/rpm/instructions.html

for the instructions.

[root@charon root]# uname -rm
2.6.9-1.667 i686

I selected '2.6.9-1.667' 'i686' for my Athlon-XP computer. Both parts MUST match.

[root@charon ~]# rpm -ivh kernel-module-ntfs-2.6.9-1.667-2.1.20-0.fc.1.2.i686.rpm
Preparing... ########################################### [100%]
1:kernel-module-ntfs-2.6.########################################### [100%]

To allow access to NTFS partitions you must (1) check how many partitions
you have, (2) create mount points, (3) mount partitions, and (4) update fstab
to mount at next boot.

Check Partitions

Check how many NTFS partitions you have:

[root@charon ~]# fdisk -lu /dev/hda | grep NTFS
/dev/hda1 * 63 16771859 8385898+ 7 HPFS/NTFS
/dev/hda2 16771860 33543719 8385930 7 HPFS/NTFS
/dev/hda3 33752628 67312349 16779861 7 HPFS/NTFS

Usually the first will be C drive, next D, etc.

Create Mount Points

Instead of /media/, you can also use /mnt/, both will work, but make
sure to make the correct edits in all places.

[root@charon ~]# cd /media/
[root@charon media]# mkdir c_drive
[root@charon media]# mkdir d_drive
[root@charon media]# mkdir e_drive

You don't have to use these names, if you prefer to creat folders such as
movies, documents, or winxp, any name will work (without spaces).

Mount Partitions

Run 'man mount' to fully explain what "-r -o umask=0222" does.

[root@charon media]# mount /dev/hda1 /media/c_drive/ -t ntfs -r -o umask=0222
[root@charon media]# mount /dev/hda2 /media/d_drive/ -t ntfs -r -o umask=0222
[root@charon media]# mount /dev/hda3 /media/e_drive/ -t ntfs -r -o umask=0222

Update /etc/fstab

Open '/etc/fstab' in an editor and add these lines to the END of the file:

/dev/hda1 /media/c_drive ntfs ro,defaults,umask=0222 0 0
/dev/hda2 /media/d_drive ntfs ro,defaults,umask=0222 0 0
/dev/hda3 /media/e_drive ntfs ro,defaults,umask=0222 0 0

eg.

自動加載windows下的分區
我有c,d,e,分別是hda1,hda5,hda6,其中c是ntfs的。
在/mnt下建立目錄
mkdir c
mkdir d
mkdir e
然後修改/etc/fstab
加上下列幾行
/dev/hda1 /mnt/c ntfs iocharset=utf8
/dev/hda5 /mnt/d vfat iocharset=utf8
/dev/hda6 /mnt/e vfat iocharset=utf8
然後重新啟動計算機

小結:現在我可以辦公和讀書了,基本可以代替以前win的工作了.


make kernel for support NTFS

# uname -a
接下來抓source回來。

# apt-get source kernel
這時候可能有很多個,叫你確定在打;或是抓不到,那就去google找同版號的kernel source。

抓回來安裝後(安裝失敗可能是目錄要先建),再patch一下。

# cd /usr/src/redhat/SPECS
# rpmbuild -bp --target=i686 kernel-version.spec
將 kernel source code 搬到 /usr/src/ 目錄底下。

# mv /usr/src/redhat/BUILD/kernel-version/linux- /usr/src/
接下來開始make kernel。

# cd /usr/src/linux-version
# make mrproper
# cp configs/kernel-version-i686.config .config
# vi Makefile (修改 EXTRAVERSION = -prep , 如改成 EXTRAVERSION = -1.681_FC3)
# make oldconfig
# make menuconfig (把preempt mode打開,nvidia rivafb關掉,ntfs read打開)
# make
# make modules_install
# make install
重開機看看可不可以work。


mount NTFS driver steps

# cat /etc/redhat-release
# uname -r
# rpm -q --queryformat "%{ARCH} " kernel
# rpm -ihv kernel-ntfs-2.4.18-14.i686.rpm
# modprobe ntfs (or # /sbin/modprobe ntfs)
# /sbin/fdisk -l
# mkdir /mnt/windows
# mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222


# rpm -ivh kernel-module-ntfs-2.6.11-1.35_FC3-2.1.22-0.rr.6.3.i686.rpm


Install NTFS driver

If you need access to NT file systems you'll probably want to download the Linux ntfs driver. There is a site that maintains pre-built modules for all released Fedora kernels at http://linux-ntfs.sourceforge.net/rpm/fedora2.html. A pre-built ntfs module usually appears just a few days after a new Fedora kernel gets released. Be sure to match your kernel version and processor type. If you're not sure what version you're running do this:

# uname -r -p
For example if you're using the latest kernel (as of this writing) which is 2.6.5-1.358 and the i686 (even if it's an AMD) processor then you will want to download and install it as such:
# rpm -ihv kernel-ntfs-2.6.5-1.358.i686.rpm
Once installed the ntfs driver will be a dynamically loadable module and you can mount NT file systems with mount -t ntfs -o nls=utf8 /dev/hdXX /mnt .

 

關於Fedora Core 4.0 對ntfs文件系統的支持的解決辦法

提示:ntfs 文件系統是Windows操作系統的文件系統,在Redhat/Fedora中,一般不是默認支持的。解決這個問題,大多是通過安裝RPM補丁包,或者重編內核。由於重編內核比較複雜,對新手來說比較困難。所以建議新手用 RPM補丁包的方法來解決:

linux-ntfs項目主頁:

http://linux-ntfs.sourceforge.net/info/ntfs-zh.html

Fedora core 4.0 NTFS 支持的RPM 包

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

如何選擇:我們通過uname -a 來判斷,比如:
[beinan@S01 ~]$ uname -a

首先我們要判斷自己系統的內核,內核版本要一定看好。切記:

對於大多數X86 32的機器,也就是我們常用的PC機,大多用:

i686的包:類似這樣的:

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

注意:smp是多處理器的內核,比如i686-smp,如果您不是雙處理器,請不要用這樣的內核;如果您uname a 出來的值,有smp字樣的,就是要用這個i686smp的包:

下載rpm 包後,要放在linux的分區中;

然後 :

#rpm -ivh filename.rpm

比如 :

#rpm ivh kernelmodule-ntfs-2.6.11–1.1369_FC4–2.1.22–0.rr.6.0.i686.rpm

如果加載安裝ntfs 到linux系統中,請看以前的帖子:就是mount 命令,說一下吧。

參考:fat 的方法:大同小異;

http://www.linuxsir.org/bbs/showthread.php?t=3393

讓系統自動加載ntfs

用下面這個命令來判斷我們的windows分區,這個命令能把所有硬盤上的分區都能列出來。這個命令比較強,哈。。最適合不知道自己的硬盤情況的弟兄。。。

[root@LinuxSir root]# fdisk -l

如果只列一個硬盤的可用下面這個命令,下面這兩條命令,第一條是列第一個硬盤的,第二個是列第二個硬盤的,這兩條命令和 fdisk -l結合起來,配合來用,效果最佳。我以我的硬盤來說。。。。也能用第一個命令。。這個比較簡單,試一下就知道了

#fdisk -l /dev/hda

#fdisk -l /dev/hdb

Disk /dev/hda: 255 heads, 63 sectors, 4865 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1147 9213246 7 HPFS/NTFS
/dev/hda2 1148 4864 29856802+ f Win95 Ext『d (LBA)
/dev/hda5 1148 2039 7164958+ 7 HPFS/NTFS
/dev/hda6 2040 2804 6144831 b Win95 FAT32
/dev/hda7 2805 3824 8193118+ b Win95 FAT32
/dev/hda8 3825 3830 48163+ 83 Linux
/dev/hda9 3831 4799 7783461 83 Linux
/dev/hda10 4800 4864 522081 82 Linux swap

從這上面,我們可以看來,/dev/hda6和/dev/hda5就是win下的ntfs分區。

第 二;我們加載windows的分區,是不是在linux下有個文件夾可以放下去?這樣理解就對了。我們可以用下面的方法來操作。我在這個例子中,把 /hda5的內容,我想放到WinE這個文件夾。另一個則是WinF,這個文件夾的命名,可以用你喜歡的。但修改/etc/fstab的內容時,也要用這 個文件夾,也就是統一起來。。

#mkdir /mnt/WinE

#mkdir /mnt/WinF

注意大小寫。。

或用鼠標點kde自帶的瀏覽器在地址欄上輸入:
/mnt
就能進入/mnt這個目錄了。。
然後就按鼠標的右鍵來建目錄,這個簡單吧。。。哈。。

然後,我們來修改/etc目錄下的fstab

/dev/hda5 /mnt/WinE ntfs umask=0,nls=utf8 0 0 0 0

如果出現亂碼,請根據自己系統的locale來設置,比如 utf-8之類的。看情況吧。

如果手工mount分區如何做呢?
事前要建好目錄,比如在/mnt目錄下建一個tmp目錄

#mkdir /mnt/tmp
然後就是mount了,mount也應該有個目的地吧,那我們就把目的地定為/mnt/tmp
比如我們mount /dev/hda5
如下:

#mount -o nls=utf8 /dev/hda5 /mnt/tmp

 

How can i see my fat32 or ntfs drive in linux ( fedora core 3 ) ?

ntfs mounting

Before you can read the NTFS/FAT files on your hard drive you have to

mount the device.

here's a step by step guide.

first you have to know what the hard drive is called.
usually hda or hdb with a number after it identifying the partition of the drive.

mine is hda1 for the windows installed drive.

start up a command line console

su ---> to log in as the root.

fdisk /dev/hd? ---> to find out more about your hard drive.

when Command (m for help): press p

this will show you more settings about your device.

press q to quit.

create a directory where you want the drive to show up.

/home/Desktop/ntfs/

now mount the drive.

mount -t ntfs /dev/hd?# /home/Desktop/ntfs/
or
mount -t fat /dev/hd?# /home/Desktop/ntfs/

will do the trick

try man mount to get more details about the mount command.

you will have to log in as the root to use GUI to access the files this way.

NTFS and FAT32 on Fedora Core 3

NTFS support is experimental in Linux and you can only read data on an NTFS partition - not write.

Go to this site: http://linux-ntfs.sourceforge.net/rpm/instructions.html
for information. It is simply an rpm kernel module you must load.

For FAT32, it should be already in the kernel by default. My FAT32 partition is /dev/hda6. I created a mount point directory (/mnt/win_e) and added this line to my /etc/fstab file:

/dev/hda6 /mnt/win_e vfat iocharset=iso8859-1,codepage=850,umask=0 0 0

yours may be different depending on which partition your FAT32 is.
And DO A BACKUP before you mess with fstab. (and save a copy of the original fstab) If you screw it up, your machine may not boot.
make sure you've got support for the file system(s) compiled into your kernel (or as a module).
then put the appropriate entry in your mtab and/or fstab.
you can probably find all you need doing a `man fstab` or `man mtab`

 


在Fedora core 4.0 加載NTFS和FAT32分區詳述

提要:本文主要介紹ntfs文件系統分區及fat32格式分區的掛載方法:簡單的說就是讓Linux能讀取Windows系統下的分區;


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
正文:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


一、最基本的幾個命令;


1、查看磁盤分區情況的命令fdisk -l ;

比如:

[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

通過上面的我們可以知道 /dev/hda1 是NTFS格式;/dev/hda2是FAT32格式;


2、mount 命令;

就是磁盤分區的掛載命令,如 果內核支持的話,mount 命令能掛載幾乎所有的文件系統,比如 reiserfs;ext2;ext3;ntfs;fat32;jfs等等;在Linux系統中,我們常用的主要有reiserfs;ext3; ext3;在Windows系統中,我們主要用的是NTFS;FAT32;FAT等;

mount 掛載磁盤分區的用法:
mount -t 文件格式 -o 選項參數 磁盤分區 掛載點目錄名

這 樣說可能新手不太明白,什麼是文件格式,什麼是掛載點目錄名,我們要把一個分區加載到Linux,是不是得有個存放在地方?比如我們把/dev/hda1 掛載到/mnt/winc目錄中;首先我們要看是不是winc是否存在於/mnt目建錄中;如果沒有winc,我們必須建一個;當然掛載點目錄名是自己隨 便起命名的,最好用英文;

例子在後面舉了,新手弟兄先知道有這回事就行了;

3、df -lh 磁盤使用情況的命令;這個重要吧;

[root@localhost beinan]# df -lh
Filesystem 容量 已用 可用 已用% 掛載點
/dev/hda8 11G 5.9G 4.5G 57% /
/dev/shm 236M 0 236M 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、文件和目錄的權限;

這個在論壇中,我寫過,有時間整理上來;知道umask=000是任何用戶都能讀寫執行的就行了。有些東西慢慢就明白了,多執行幾個命令就OK了。

5、內核的版本;

[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

通過上面得知我目前用的內核的版本是 2.6.11-1.1369_FC4

6.獲取root用戶的命令是su

[beinan@localhost ~]$ su
Password: 在這裡輸入您的root密碼,即使輸入了,也不會顯示出來;我們要安裝RPM包,要用到root的超級權限;
[root@localhost beinan]#


二、NTFS文件系統的加載;


1、我們要首先確認系統的內核;我們要根據系統的內核版本來下載支持ntfs的內核補丁;

我們在前面已經通過fdisk -l 得知/dev/hda1 是NTFS分區;我們如何加載它呢?在Fedora core 4.0 中,系統默認是不支持NTFS加載的;我們只能安裝第三方kernel的ntfs插件或者編內核來實現,相對於編譯內核來說,插件是最方便的,也是最簡單 的;

 

[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

一定要看仔細,是2.6.11-1.1369_FC4,是i686的,沒有帶smp字樣的,smp是支持多處理器的內核,如果您用這樣的內核,就要下載相應版本的smp的;

我們到哪去下載呢?

kernel ntfs 項目在 http://linux-ntfs.sourceforge.net

Fedora core 4.0的kernel NTFS的RPM包在:

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

根據上面內核的信息,我們要下載:2.6.11-1.1369_FC4 i686的,下載的應該是:

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

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

在這裡選一個鏡像下載:

安裝kernel ntfs模塊:

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


2.判斷哪個分區是NTFS格式,加載NTFS分區;

[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

我們已經把kernel ntfs的模式安裝好了,現在進入NTFS的分區的加載過程;通過上面的查看,我們知道/dev/hda1是NTFS格式的;

1]我們要建一個掛載點的目錄,比如是在/mnt/目錄下建一個winc的目錄:

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

2]把/dev/hda1 掛載到 /mnt/winc中,這樣我們如果查看/dev/hda1磁盤內容時,就會在/mnt/winc中找得到;

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

註:-t ntfs 說明文件系統的格式是ntfs的;-o是選項 ,選項有什麼呢?有nls=utf8 ,意思是Native Language Support(本地語言支持)是utf8,也就是大家常說的語言編碼;Fedora core 4.0 默認的語言編碼就是utf8的,這樣能顯示出中文來;umask=000表示所有的用戶組都可讀可寫,但因為NTFS在Linux中寫入不安全,所以只能 讀,不能寫入;如果想寫入,只能自己編內核來實現;但意義並不是太大;

是不是掛載好了呢?

[root@localhost beinan]# df -lh
Filesystem 容量 已用 可用 已用% 掛載點
/dev/hda8 11G 5.9G 4.5G 57% /
/dev/shm 236M 0 236M 0% /dev/shm
/dev/hda1 5.9G 3.2G 2.7G 55% /mnt/winc

看來是掛載好了;我們進入 /mnt/winc就知道是不是有內容了;
[root@localhost beinan]# cd /mnt/winc
[root@localhost beinan]# ls


3]如何開機自動加載NTFS文件系統的分區;

我們要根據磁盤的位置,上面我們看到了是/dev/hda1,對不對?所以我在/etc/fstab文件中找加如下的一行;
/dev/hda1 /mnt/winc ntfs umask=000,nls=utf8


4]如何將這個磁盤分區放在GNOME或者KDE的桌面上呢?

在KDE下,只需要點一下鼠標,在桌面的空白處按鼠標右鍵就可以找得到了;不多說了,太簡單;

在GNOME下也是極簡單的:

比如我是以beinan這個用戶登入的系統,想在放在 beinan 這個用戶的GNOME桌面上;

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


三、FAT32文件系統的分區的加載;

通過fdisk -l ,我們也知道了 /dev/hda2是FAT32格式的;
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)

Linux對FAT32的支持是可讀可寫的,所以沒有必要再安裝什麼模塊之類的;

1.我們要建一個掛載點的目錄,比如是在/mnt/目錄下建一個wind的目錄:

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


2.掛載 /dev/hda2 到/mnt/wind上

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

看一下是不是掛載好了?
[root@localhost beinan]# df -lh
Filesystem 容量 已用 可用 已用% 掛載點
/dev/hda8 11G 5.9G 4.5G 57% /
/dev/shm 236M 0 236M 0% /dev/shm
/dev/hda1 5.9G 3.2G 2.7G 55% /mnt/winc
/dev/hda2 16G 8.1G 7.7G 52% /mnt/wind

看來是掛載好了;應該進去看看;
[root@localhost beinan]#cd /mnt/wind
[root@localhost beinan]#ls -lh
drwxrwxrwx 3 root root 8.0K 7月 27 11:45 抓圖
drwxrwxrwx 2 root root 8.0K 8月 12 10:21 測試文件
drwxrwxrwx 4 root root 8.0K 7月 27 11:45 電腦硬件
drwxrwxrwx 5 root root 8.0K 7月 27 11:45 網際快車

中文支持沒有問題;這是我機器中的;

3.如何開機自動加載NTFS文件系統的分區;

我們要根據磁盤的位置,上面我們看到了是/dev/hda1,對不對?所以我在/etc/fstab文件中找加如下的一行;
/dev/hda2 /mnt/wind ntfs umask=000,nls=utf8


4]如何將這個磁盤分區放在GNOME或者KDE的桌面上呢?

在KDE下,只需要點一下鼠標,在桌面的空白處按鼠標右鍵就可以找得到了;不多說了,太簡單;

在GNOME下也是極簡單的:

比如我是以beinan這個用戶登入的系統,想在放在 beinan 這個用戶的GNOME桌面上;

 

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


三、對於文本文件亂碼處理;


比如我們看到有些文本文件內容是亂碼,我們可以用gedit 打開,然後另存為utf8格式就OK了;

後記:雖然寫的詳細,但我不敢保證所有初學者都能會操作,但我感覺80%初學者還是按步驟操作不會有問題;

 

掛載 NTFS 磁區

註:除非您的電腦內有 NTFS 磁區,否則這個章節,對您是沒有作用的,趕緊跳過吧

 

 

su -

#變成 root

fdisk -l

#看一下磁區狀況,筆者硬碟的「/dev/hda1」是 NTFS 磁區

uname -mr

#檢查自己核心的版本,和硬體架構

 

 

到「http://linux-ntfs.sourceforge.net/rpm/fedora3.html」網站,下載符合自己狀況的 NTFS rpm

 

註:

在上一張圖的時候,不是有輸入「uname -mr」,在這裡就是要下載符合那個結果的 NTFS rpm

 

 

從國網中心下載

 

註:

http://sourceforge.net/」SourceForge.net 是世界上最大的開放源碼軟體計畫集中網站,有空的話可以常來逛逛

 

 

等一下子,會自動出現這個下載的視窗

 

 

安裝

 

 

 

mkdir /media/c

#建一個資料夾,好掛載 NTFS 磁區

mount /dev/hda1 /media/c

#掛載

cd /media/c

#進入 NTFS 磁區

ls

#嘿嘿,可以看到 C 槽的資料了

gedit /etc/fstab

#修改 fstab,好一開機就掛載

 

 

複製「/dev/hda6   /mdedia/d   vfat   defaults     0 0」這一行

 

註:

這行就是 Windows 的 D 槽,所以在這裡要再強調一次,若您的硬碟內沒有 Windows 磁區的話,就趕快跳過這個章節吧

 

 

然後將剛剛複製的資料,貼上去,然後修改如上圖

/dev/hda1   /media/c     ntfs     defaults          0 0

# /dev/hda1 表示 NTFS 磁區的代號

# /media/c 表示要掛載的資料夾

# ntfs 表示磁區的格式

 

註:

這樣修改的話,每次開機,C 槽會自動掛載在 /media/c,如果沒有要這樣的話,就不用修改 fstab 了

 

 

 

mount -a

#重新掛載

 

好了,現在輪到 D 槽了

 

 

當我們進到「/media/d」的時候,按右鍵,咦~~~~不能新增資料夾,也不能新增文件

 

 

 

/dev/hda6     /media/d        vfat      defaults,umask=000     0 0

#修改「/etc/fstab」,如圖新增「,umask=000」

 

 

哈哈,可以新增資料夾了,可是要新增文件的時候.................

 

 

 

/dev/hda6     /media/d        vfat      defaults,umask=000,iocharset=cp950     0 0

好,在後面再新增「,iocharset=cp950」

 

 

 

gedit /etc/sysconfig/i18n

#修改 i18n

 

 

將「UTF-8」取代為「Big5

 

 

總共有兩個地方會被取代,然後請「重新開機」

 

 

終於可以新增資料夾、文件了

 

 

 

locale

#看一下系統的 locale 設定

ln -s /media/d Desktop/

#在桌面上設個超連結,好方便使用

 

 

以後在桌面上就可以直接存取 D 槽的檔案了



讓Redhat Fedora Core release2支持NTFS讀取

下面三條命令以root或其他用戶身份運行:
1、終端輸入cat /etc/redhat-release查看發行版本;我的版本是Fedora Core release 2 (Tettnang)。
2、終端輸入uname -r查看內核版本;我的版本2.6.5-1.358。
3、終端輸入rpm -q --queryformat "%{ARCH}\n" kernel查看處理器類型;我的是i686;
如果查詢內核後面有後綴smp、bigmem、hugemem等,需替換kernel,例如:後綴為smp,則用kernel-smp代替查詢處理器類型命令中的kernel。

後面的命令必須以root身份運行:
4、在http://linux-ntfs.sourceforge.net/rpm/downloads.html根據剛才查詢到的發行版本、內核版本和處理器類型下載相應的RPM包;我下載的相應文件為http://prdownloads.sourceforge.net/linux-ntfs/kernel-ntfs-2.6.5-1.358.i686.rpm
5、運行rpm -ihv kernel-ntfs-2.6.5-1.358.i686.rpm,安裝此RPM包。
6、運行/sbin/modprobe ntfs加載內核模塊。
7、運行dmesg | grep NTFS,可以查看NTFS驅動版本。
8、現在可以運行cat /proc/filesystems看到已經支持ntfs文件系統了。

註:
1、NTFS驅動模塊不保證寫兼容,所以建議掛載NTFS分區時,使用-r參數,以只讀模式掛載NTFS分區。
2、卸載NTFS驅動:
a、rpm -qa | grep -i ntfs查看安裝的rpm包,例如kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2
b、rpm -e kernel-module-ntfs-2.6.9-1.667smp-2.1.20-0.fc.1.2卸載此rpm包。

相關文章

 

Dual boot Fedora Linux and Windows XP, resizing NTFS

Howto resize Windows XP NTFS partition non-destructively, install Feodra Core and create a boot menu for both operating systems.

All tools used are free except Windows XP. Windows XP is a good platform for gaming and legacy software, for other purposes I recommend Linux. To follow this tutorial, you should be comfortable with installing operating systems, partitioning hard disks and burning cdroms from iso images.

(c) 2004 Tero Karvinen

Resize Windows XP NTFS parition

Backup your documents from NTFS partitition. If you are not administering the computer yourself, ask permission from IT-department for resizing hard disk partitions. If you want to be able to shring the partition to minimum possible size, you can optionally defragment the NTFS partition using Windows defragmenting tool included in Windows XP.

Ntfsresize can shrink Windows XP partition. It is included in Knoppix 2004. Download knoppix (KNOPPIX_V3.3-200?-??-??-EN.iso 700 MB iso image) and burn it to a cd. Boot computer from that cd.

Start qtparted. Select Main menu: Knoppix: Root shell. Type qtparted &. Select your hard disk (/dev/hda), and select Windows XP NTFS partition, which probably takes almost the whole disk. From context menu (click right mouse button), select "Resize...". Make the partition about a half smaller, click Ok. Save by clicking disk icon from toolbar. Qtparted automatically does everything needed to resize the partition (runs ntfsresize and the actual partitioning program).

After the operation, your hard disk will have a Windows XP NTFS partition (about half a disk) and free, unpartitioned space (about the other half). Save by clicking the disk icon on top left, and choose yes to commit the changes. Repartitioning can take 10 minutes or more.

Install Fedora Core

Download Fedora Linux 1 "Yarrow" iso images (600+ MB each) disc 1 - disc 2 - disc 3 - and burn the images to cds.

Boot from Fedora Core disc 1. Install Fedora Core normally. Installer detects Windows XP automatically, and creates a boot menu item for it. In bootloader configuration you can change the name of Windows XP menu item from "DOS" to "Windows XP". You can also choose which operating system is booted up by default.

  • (Boot loader: enter).
  • Media check: (Optional. All disks should say "PASSED. It is OK to install from this media).
  • Language (during installation): English.
  • Keyboard: Finnish.
  • Mouse: (whatever is autodetected, usually ps2, ps2 wheel mouse or usb wheel mouse), emulate 3 buttons.
  • Installation type: Workstation. (Only chooses the default set of software to be installed)
  • Disk partitioning: Automatically partition, keep all partitions and use existing free space.
  • Boot loader configuration (defaults ok, boot menu item for Windows XP is autogenerated, you can choose default operating system to boot and change menu item names).
  • Network configuration: Automatically via DHCP.
  • Firewall configuration: Enabled (Defaults ok. Client programs work automatically. Do not allow incoming traffic and do not trust any devices).
  • Language support: (defaults ok: Default English, support English).
  • Time Zone: Europe/Helsinki, System Clock Uses UTC.
  • Root password: secret passphrase, unlimited length. Use big/small letters, numbers, special chars (!%/()=?_...) but not scandinavian characters like äö.
  • Package Selection (defaults).
  • About to install (nothing has been done yet, pressing Alt-Ctrl-Del would reboot and cancel install). Click next to proceed installing.

Installation of Fedora Core 1 takes about 40 minutes, and you must change cds twice.

Create Boot Disk: No. X Window System configuration: (defaults usually Ok). Machine reboots. Add user: Login: eight characters, no caps, eg: tkarvine. Type password twice. (use this user to log in later, not root). Date: add the date. Sounds: (defaults ok). Register: No. Install additional: No.

Now you can log in.

Check for both operating systems, Windows XP and Fedora Linux, that you can boot, browse web pages, write documents and (optionally) print them. Windows XP checks hard disk the first time you log in after repartitioning.

Congratulations, you have repartitioned your hard disk and installed Fedora Core dual boot! Read my articles to learn more about linux.

Fedora Core 2 and other Linux 2.6 distributions

Fedora Core 2 and other distributions using Linux kernel version 2.6 alter the partition table so that Windows no longer recognizes those partitions. This problem does not show with every installation of Fedora Core 2, and it never occurs with Fedora Core 1. The problem is annoying but fixable without data loss. This worked for me: boot to Knoppix 3.3 (Linux 2.4), sfdisk -l. Check the correct geometry: CHS Cylinders Heads Sectors. (There are also other sources to check the correct geometry, such as printings on hard disks and sometimes bios.) Rewrite the partition table to reflect the correct geometry, using your own values for /dev/hda, C H and S.

sfdisk -d /dev/hda |sfdisk --no-reread -C 16037 -H 255 -S 63 /dev/hda

Reboot computer. You should be able to boot both Windows and Linux. Windows will likely check hard disks on first boot.

See also: Kanat-Alexander 2004: Fedora Faq: "I installed Fedora Core 2, and now I can't boot into Windows!" and Aboutboul 2004 on fedora-devel-list atta redhat.com: "Prevention and Recovery of XP Dual Boot Problems"

About this document

Tested on 2004-04-02 with Fedora Core 1 Yarrow, Knoppix 2004-02-16, Windows XP Pro (ghost installed) and HP-Compaq d530 CMT. Also, all hardware worked in both operating systems in d530, including the integrated Broadcom Netextreme Gbit/s network adapter.

Todo: Screenshots of qtparted resizing ntfs, installing Fedora Core, boot menu. Photo of a computer running Linux. How to run WinhaPro (an old grading system) in Linux?

Copyright 2004-04-02 (initial release) 2004-04-29 (integrated comments from Chris) 2004-05-17 (fc install to a list, copyedit) 2004-08-24 (knoppix link fix, copyedit), 2004-09-19 (fc2 partitioning fix) Tero Karvinen. All rights reserved. XHTML Basic 1.0 - top

arrow
arrow
    全站熱搜

    Bluelove1968 發表在 痞客邦 留言(0) 人氣()