Thursday, January 7, 2016

Successfully mounting NTFS partitions

If you followed, you should be aware of the fact that Fredrik Wikstrom had been porting filesysbox.library (a FUSE compatible filesystem layer) to AROS for a while and, after some testing, he finally uploaded it (along with a NTFS and an exFAT handlers) to the Archives. Well, the very good news about this are that 1) they work quite well, fastly and reliably, and 2) the NTFS3g handler allows to access NTFS partitions at boot time. There are only a few steps to follow:

1. copy filesysbox.library to LIBS
2. copy the NTFS-3g and exFAT handlers to L
3. "edit L:automount-config and change ntfs-handler to ntfs3g-handler"
4. reboot your AROS system

(step 3 had been kindly suggested by Neil Cafferkey)

This will unfortunately work for internal drives only. Mounting a NTFS formatted USB drive will require some further effort, which basically consists in creating a new text file in DEVS:DOSDrivers and call it, for instance, NTFS0. This file will include these lines

FileSystem     = ntfs3g-handler
DosType        = 0x4e544653
Device         = usbscsi.device
Unit           = 0
BlockSize      = 512
Surfaces       = 1
BlocksPerTrack = 1
LowCyl         = 0
HighCyl        = 976773166
Reserved       = 0
/* Control        = ro */
Activate       = 1

Then, a "mount NTFS0:" command given from the shell should complete the effort.

As Fredrik pointed out, "this is for a 500GB MBR-less USB harddrive formatted as NTFS. When LowCyl is 0 HighCyl is ignored and the entire disk size as reported by TD_GETGEOMETRY is used instead. Control can be specified with ro for a read-only mount". This NTFS0 DOSDriver will be included into next Icaros Desktop as well, along with all other necessary files. You may also change the Device option - for instance using diskimage.device - to specify another location to seek for NTFS partitions. In the screen below, you should see my Icaros test virtual machine successfully reading the two NTFS partitions from a Windows 10 system disk: it has been attached to this VM in order to test it and I could read, write and compare files without issues, at fairly more than decent speeds.

Icaros Desktop successfully mounting and reading two Windows 10 NTFS partitions. Disk had been detached from another test virtual machine, and attached to Icaros' test virtual machine under VMware.