CentOS: accedere alle partizioni NTFS
Capita a volte di dover accedere a partizioni Windows (NTFS) da Linux ma non tutte le distribuzioni supportano nativamente la lettura/scrittura di queste partizioni. CentOS in particolare non ha il supporto a queste partizioni ne dentro il kernel ne dentro il repository ufficiale.
E’ comunque possibile accedere alle partizioni di Windows mediante il pacchetto fuse disponibile sul repository di rpmforge. Per maggiori informazioni su come aggiungere ed abilitare un repository aggiuntivo per CentOS, potete consultare questo link:
http://www.morzello.com/dblog/articolo.asp?articolo=68
Nell’esempio che segue, vedremo come montare una partizione ntfs in una cartella di linux come ad esempio /mnt/usb.
Per prima cosa, verifichiamo la tavola delle partizioni del disco. Nel nostro caso si tratta di un disco usb esterno:
fdisk -l /dev/sdb Disk /dev/sdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 15298 122881153+ 6 FAT16 /dev/sdb2 15299 22947 61440592+ 7 HPFS/NTFS
Nel caso volessimo montare la seconda partizione senza supporto, riceveremmo un messaggio simile a questo:
mount /dev/sdb2 /mnt/usb mount: unknown filesystem type 'ntfs'
Per risolvere il problema procediamo dunque all’installazione dei pacchetti necessari dal repository di rpmforge:
yum install fuse fuse-ntfs-3g Loaded plugins: fastestmirror, priorities Determining fastest mirrors * addons: ftp.uni-bayreuth.de * base: ftp.uni-bayreuth.de * extras: ftp.uni-bayreuth.de * rpmforge: apt.sw.be * updates: ftp.hosteurope.de addons | 951 B 00:00 base | 2.1 kB 00:00 extras | 2.1 kB 00:00 rpmforge | 1.1 kB 00:00 updates | 1.9 kB 00:00 updates/primary_db | 554 kB 00:00 478 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package fuse.i386 0:2.7.4-8.el5 set to be updated ---> Package fuse-ntfs-3g.i386 0:2009.11.14-1.el5.rf set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: fuse i386 2.7.4-8.el5 base 83 k fuse-ntfs-3g i386 2009.11.14-1.el5.rf rpmforge 552 k Transaction Summary ================================================================================ Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 635 k Is this ok [y/N]: y Downloading Packages: (1/2): fuse-2.7.4-8.el5.i386.rpm | 83 kB 00:00 (2/2): fuse-ntfs-3g-2009.11.14-1.el5.rf.i386.rpm | 552 kB 00:00 -------------------------------------------------------------------------------- Total 352 kB/s | 635 kB 00:01 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : fuse 1/2 Installing : fuse-ntfs-3g 2/2 Installed: fuse.i386 0:2.7.4-8.el5 fuse-ntfs-3g.i386 0:2009.11.14-1.el5.rf Complete!
Ora è possibile ripetere il comando mount come mostrato in precedenza.
Alla prossima.