How to prevent libreelec to access and mount windows harddisk?

  • hi, i boot libreelec from usb drive.

    in file manager my internal windows partitions are shown.

    how can i prevent libreelec from touching the internal drive?


    this did no work: Remove LibreELEC File Manager Extra Sources

    my blkid list:

    Code
    /dev/mmcblk0p3: LABEL="win" BLOCK_SIZE="512" UUID="EE08F90708F8D017" TYPE="ntfs" PARTUUID="9b5799c0-b0ba-4218-b910-0e4b95ad7aea"
    /dev/mmcblk0p2: UUID="4AF7-16ED" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0239315b-2724-4f84-8936-dfba556c259b"
    /dev/sda2: LABEL="STORAGE" UUID="b30f8c4e-371f-4599-8640-37a1f47a9a28" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="storage" PARTUUID="b77b0954-57e7-4ca0-84dc-c74b9529ca61"
    /dev/sda1: SEC_TYPE="msdos" LABEL_FATBOOT="LIBREELEC" LABEL="LIBREELEC" UUID="0504-4721" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="system" PARTUUID="54cd8a30-7bb5-406d-b80c-3ee7271c94f9"
    /dev/loop0: BLOCK_SIZE="1048576" TYPE="squashfs"
    /dev/mmcblk0p1: PARTUUID="2f201421-a7ec-4ffa-a884-3496c6354b44"

    is it possible to make a rule, something like this: /dev/mmcblk0p*

    so that mmcblk0p1, mmcblk0p2 and mmcblk0p3 are blocked?

  • Code
    cp /usr/lib/udev/rules.d/95-udevil-mount.rules /storage/.config/udev.rules.d

    Clone the udev rules file ^

    Code
    # check for blockdevices, /dev/sd*, /dev/sr*, /dev/mmc*, and /dev/nvme*
    SUBSYSTEM!="block", KERNEL!="sd*|sr*|mmc*|nvme*", GOTO="exit"       <= edit this
    
    # check for blockdevices, /dev/sd*, /dev/sr*, /dev/mmc*, and /dev/nvme*
    SUBSYSTEM!="block", KERNEL!="sd*|sr*|nvme*", GOTO="exit"            <= to this, i.e. drop mmc*

    Then edit the file using nano and change this block towards the top of the file ^ then save/reboot to effect the change.

    The change means for any mmc* blockdevice it skips straight to exit and doesn't process partition mounting. NB: This will also prevent SD cards from ever mounting as those are also mmc* devices. I doubt you need that though.