NTFS3 Kernel Module

Technical issues/questions of an intermediate or advanced nature.
User avatar
Blaze
DEV Team
DEV Team
Posts: 3028
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

NTFS3 Kernel Module

Post#16 by Blaze » 21 Sep 2020, 15:24

beny wrote:
17 Sep 2020, 18:38
build the ntfs3 on 5.4.57-porteus can you use the make -d debug seem that file kernel are too old for the ntfs3 build
Seems you are right, because I have faile with my script and kernel 5.4.65

Code: Select all

#!/bin/bash
# ntfs3-dkms driver
# NTFS read-write driver GPL implementation by Paragon Software.
# Current version works with NTFS (including v3.1), normal/compressed/sparse files and supports journal replaying.
# Slackware build script for broadcom-wl-dkms
# base on https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ntfs3-dkms
# ported for Slackware by Blaze
# depends=(dkms)

PRGNAM=ntfs3
VERSION=${VERSION:-v6.0.0}
KERNEL=${KERNEL:-`uname -r`}
BUILD=${BUILD:-1}
TAG=${TAG:-bl}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP $PKG/usr/src/ntfs3-${VERSION} $OUTPUT /usr/src/ntfs3-${VERSION} "${TMP}/${PRGNAM}-${VERSION}"

cd "${TMP}/${PRGNAM}-${VERSION}"

lynx --source https://aur.archlinux.org/cgit/aur.git/plain/dkms.conf?h=ntfs3-dkms > ${TMP}/${PRGNAM}-${VERSION}/dkms.conf
lynx --source https://aur.archlinux.org/cgit/aur.git/plain/Makefile.patch?h=ntfs3-dkms > ${TMP}/${PRGNAM}-${VERSION}/Makefile.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308074/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~1.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308079/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~2.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308077/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~3.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308073/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~4.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308069/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~5.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308070/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~6.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308078/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~7.patch
lynx --source https://lore.kernel.org/patchwork/patch/1308067/raw > ${TMP}/${PRGNAM}-${VERSION}/v6.0.0~8.patch

sed -i 's|$(KVERSION)|KERNEL|g' "${TMP}/${PRGNAM}-${VERSION}/Makefile.patch"
sed -i "s|KERNEL|${KERNEL}|g" "${TMP}/${PRGNAM}-${VERSION}/Makefile.patch"

for patch in "$VERSION~"*
do
    patch -p3 -N -i "$patch"
done
    patch -p1 -N -i "Makefile.patch"

cp -r "${TMP}/${PRGNAM}-${VERSION}" "/usr/src/"
install -Dm644 "${TMP}/${PRGNAM}-${VERSION}/dkms.conf" "/usr/src/ntfs3-${VERSION}/dkms.conf"

cd /usr/src/ntfs3-v6.0.0/
dkms install --no-depmod -m ntfs3 -v $VERSION -k `uname -r`
depmod `uname -r`

#cd "$OUTPUT/$PRGNAM-$VERSION-$KERNEL-$ARCH-$BUILD$TAG"
#/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$KERNEL-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

Code: Select all

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
KVERSION=5.4.65-porteus CONFIG_NTFS3_FS=m make KDIR=/lib/modules/5.4.65-porteus/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.65-porteus (x86_64)
Consult /var/lib/dkms/ntfs3/v6.0.0/build/make.log for more information.

Code: Select all

# cat /var/lib/dkms/ntfs3/v6.0.0/build/make.log
DKMS make.log for ntfs3-v6.0.0 for kernel 5.4.65-porteus (x86_64)
Пн сен 21 18:17:23 MSK 2020
make -C /lib/modules/5.4.65-porteus/build M=/var/lib/dkms/ntfs3/v6.0.0/build modules
make[1]: вход в каталог «/usr/src/linux-5.4.65»
  CC [M]  /var/lib/dkms/ntfs3/v6.0.0/build/bitfunc.o
  CC [M]  /var/lib/dkms/ntfs3/v6.0.0/build/bitmap.o
/var/lib/dkms/ntfs3/v6.0.0/build/bitmap.c: В функции «wnd_rescan»:
/var/lib/dkms/ntfs3/v6.0.0/build/bitmap.c:558:4: ошибка: неявная декларация функции «page_cache_readahead_unbounded» [-Werror=implicit-function-declaration]
  558 |    page_cache_readahead_unbounded(mapping, NULL,
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: некоторые предупреждения считаются ошибками
make[2]: *** [scripts/Makefile.build:266: /var/lib/dkms/ntfs3/v6.0.0/build/bitmap.o] Ошибка 1
make[1]: *** [Makefile:1729: /var/lib/dkms/ntfs3/v6.0.0/build] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-5.4.65»
make: *** [Makefile:14: all] Ошибка 2
The same error NTFS3 Kernel Module (Пост beny #78750)

But, you can use (tweak) my script for build ntfs3 module on a new kernel ;)
Linux 5.4.57-porteus #1 SMP Sun Aug 9 09:03:28 UTC 2020 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

beny
Full of knowledge
Full of knowledge
Posts: 916
Joined: 02 Jan 2011, 11:33
Location: italy

NTFS3 Kernel Module

Post#17 by beny » 22 Sep 2020, 09:00

hi, seem we have to wait for aufs patch for the 5.8x kernel to build for porteus,with arch or current no problem with dkms or not but lts kernel is out of the build

User avatar
Blaze
DEV Team
DEV Team
Posts: 3028
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

NTFS3 Kernel Module

Post#18 by Blaze » 22 Sep 2020, 10:41

beny,

Code: Select all

+ dkms install --no-depmod -m ntfs3 -v v6.0.0 -k 5.7.19-porteus

Creating symlink /var/lib/dkms/ntfs3/v6.0.0/source ->
                 /usr/src/ntfs3-v6.0.0

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
KVERSION=5.7.19-porteus CONFIG_NTFS3_FS=m make KDIR=/lib/modules/5.7.19-porteus/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.7.19-porteus (x86_64)
Consult /var/lib/dkms/ntfs3/v6.0.0/build/make.log for more information.

Code: Select all

# cat /var/lib/dkms/ntfs3/v6.0.0/build/make.log
DKMS make.log for ntfs3-v6.0.0 for kernel 5.7.19-porteus (x86_64)
Вт сен 22 13:39:47 MSK 2020
make -C /lib/modules/5.7.19-porteus/build M=/var/lib/dkms/ntfs3/v6.0.0/build modules
make[1]: вход в каталог «/usr/src/linux-5.7.19»
make[2]: Предупреждение: время изменения файла «include/config/auto.conf» находится в будущем (7945)
  CC [M]  /var/lib/dkms/ntfs3/v6.0.0/build/bitfunc.o
  CC [M]  /var/lib/dkms/ntfs3/v6.0.0/build/bitmap.o
/var/lib/dkms/ntfs3/v6.0.0/build/bitmap.c: В функции «wnd_rescan»:
/var/lib/dkms/ntfs3/v6.0.0/build/bitmap.c:558:4: ошибка: неявная декларация функции «page_cache_readahead_unbounded» [-Werror=implicit-function-declaration]
  558 |    page_cache_readahead_unbounded(mapping, NULL,
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: некоторые предупреждения считаются ошибками
make[2]: *** [scripts/Makefile.build:267: /var/lib/dkms/ntfs3/v6.0.0/build/bitmap.o] Ошибка 1
make[1]: *** [Makefile:1732: /var/lib/dkms/ntfs3/v6.0.0/build] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-5.7.19»
make: *** [Makefile:14: all] Ошибка 2
Linux 5.4.57-porteus #1 SMP Sun Aug 9 09:03:28 UTC 2020 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
babam
Samurai
Samurai
Posts: 139
Joined: 16 Nov 2016, 10:30
Distribution: Porteus Xfce 3.2.2
Location: Rainy city

NTFS3 Kernel Module

Post#19 by babam » 20 Oct 2020, 07:09

Here is NTFS3 for Porteus 5.0 RC2 (Kernel 5.4.57) https://github.com/LGA1150/ntfs3-oot

Code: Select all

# mount -t ntfs3 /dev/sdXX /mnt/sdXX -o noatime,nodiratime,suid,dev,exec,async,uid=1000,gid=100,umask=022,fmask=022,dmask=022,discard,nls=utf8,prealloc
Sorry, my English is bad.

User avatar
babam
Samurai
Samurai
Posts: 139
Joined: 16 Nov 2016, 10:30
Distribution: Porteus Xfce 3.2.2
Location: Rainy city

NTFS3 Kernel Module

Post#20 by babam » 26 Oct 2020, 05:56

Pros:
1. Very fast, much faster than ntfs-3g.
2. Prevents fragmentation when writing files, whereas ntfs-3g generates a lot of fragmentation.
3. Low in CPU and RAM usage.

Cons:
1. NTFS3 has not been tested for stability, reliability and security. NTFS-3G has been tested for stability and safety.
Sorry, my English is bad.

Post Reply