[RPi5] LE 12.0.0 and NTFS HDD Problem

  • I have major problems with LibreELEC 12.0 RPi5 and NTFS HDD.

    If I connect the HDD while booting, I see the boot.log text above the LibreELEC boot logo.
    The boot often crashed before the Kodi interface and the hard drive is not mounted.

    If I connect the HDD after booting, LibreELEC crashes completely and SSH is no longer possible.

    At first I followed the under voltage problem without success.

    /flash/config.txt
    usb_max_current_enable=1

    rpi-eeprom-config -e
    PSU_MAX_CURRENT=5000

    Then I used an active USB HUB without success.

    The problem seems to be related to RPi5 + NTFS!
    The problem does not occur with LibreELEC 12.0 RPi4 + NTFS!

    This "nofail" change prevents LibreELEC from crashing, but the disk is unmounted.
    cp /etc/udevil/udevil.conf /storage/.config/udevil.conf
    nano /storage/.config/udevil.conf
    default_options_ntfs = nosuid, noexec, nodev, noatime, nofail, fmask=0133, uid=$UID, gid=$GID

    This is my last log with connected HDD while booting
    https://paste.libreelec.tv/master-anchovy.log

    I'm happy about any help

    Sincerely

    Tomy

  • Go to Best Answer
  • This is how the error can be reproduced:

    1) Write a file to NTFS HDD in Windows 11
    2) then LibreELEC 12.0 RPi5 + NTFS HDD = LibreELEC crashes
    3) then LibreELEC 12.0 RPi4 + NTFS HDD = runs without problems
    4) then LibreELEC 12.0 RPi5 + NTFS HDD = runs without problems

    This means that LibreELEC 12.0 RPi4 "heals" the NTFS HDD and then it also runs in the RPi5!

    Sincerely

    Tomy

  • mglae This is my last RPi5 log with connected HDD while booting without 'nofail' option

    I'm happy about any help

    Sincerely

    Tomy

  • So it seem a problem with the 16kB pages kernel. And people recommend to using the 4kB pages kernel.

    External NTFS 8TB HDD does not mount since last update 13.03.24 · Issue #6036 · raspberrypi/linux
    Describe the bug Since the last update from March 13, 2024 my external 8TB WD Elements does not mount. It worked fine until this update. I’ve checked the drive…
    github.com
    Switch to the kernel8.img by default when the page size is 16k bytes · Issue #4346 · raspiblitz/raspiblitz
    Jan 01 18:21:03 raspberrypi systemd[1]: Started fulcrum.service - Fulcrum. Jan 01 18:21:03 raspberrypi Fulcrum[1301304]: <jemalloc>: Unsupported system page…
    github.com

    https://forums.raspberrypi.com/viewtopic.php?t=367545&start=25

    Is it possible in LibreELEC to switch to 4k kernel if i set kernel=kernel8.img in /boot/firmware/config.txt ?

  • chewitt thanks a lot!

    It seem to work now! NTFS HDD will be detected after Windows 11 writhing. :love:

    https://paste.libreelec.tv/true-drake.log

    I will test the next days, but I think this was the solution!

    uname -a
    Linux LibreELEC 6.6.28 #1 SMP Thu Apr 25 11:30:41 UTC 2024 aarch64 GNU/Linux

    touch /storage/.update/.nocompat
    cd /storage/.update
    wget https://chewitt.libreelec.tv/testing/LibreELEC-RPi5.aarch64-12.80.0.tar
    reboot

    uname -a
    Linux LibreELEC 6.6.31 #1 SMP Sun Jun  2 11:58:09 UTC 2024 aarch64 GNU/Linux

  • tomybyte The current working theory among Pi devs is that something related to error validation fails under 16K pages and thus when the filesystem ends up in an 'unclean' state (which happens sometimes in normal use) the driver cannot self-fix the issue. Booting the 4K kernel allows validation to complete resulting in a 'clean' filesystem state again. Once it's clean you should be able to run 16K page kernels; until the filesystem ends up unclean again.

    Store a copy of the image I've shared somewhere (as I will likely overwrite it with a 16K kernel version) and switch to an LE13 nightly which has the default 16K kernel. First proove that you can boot fine with it (we expect this to succeed). Then we wait for NTFS to end up in a dirty state again. Then you can use the 4K image to test the "one 4K boot fixes" theory.

  • Chewitt ok, I will do this.

    Sincerely

    Tomy


    Hi Chewitt,
    I reproduced the error again for you and very importantly, the error occurs every time I copy files on the NTFS HDD in Windows 11.
    The kernel panic error occurs on LibreELEC-RPi5.aarch64-12.0.0.img.gz and on LibreELEC-RPi5.aarch64-13.0-nightly-20240605-9f0418c.img.gz.
    The kernel panic error does not occur on LibreELEC-RPi5.aarch64-12.80.0.tar (chewitt)!
    As soon as the NTFS HDD is started in LibreELEC-RPi5.aarch64-12.80.0.tar (chewitt), the error no longer occurs with the other two images.

    Unfortunately I can't generate any logs because SSH login is not possible.

    Sincerely

    Tomy