Skip to content

Magisk module to mount one or more filesystems (e.g. CIFS/SMB, NFS, etc.)

Notifications You must be signed in to change notification settings

Mzdyl/multi-mount

 
 

Repository files navigation

Multi-Mount

Description

This Magisk module mounts one or more filesystems (e.g. CIFS/SMB, NFS, etc.) at boot.

The module's description in Magisk Manager will dynamically update to show successfully mounted targets.

Requirements

  • Magisk v20.4+
  • Kernel support for filesystem(s) to be mounted (hint: grep cifs /proc/filesystems)

Instructions

  1. Create a directory named .multi-mount inside your internal storage (/sdcard/).

  2. Inside /sdcard/.multi-mount, create one or more config files with filenames ending in .conf. Each config file corresponds to a distinct mount configuration.

  3. Populate each config file according to the following example:

    mount_options="-t cifs -o vers=2.0,username=user,password=pass"
    mount_source="//host/share"
    mount_target="/mnt/cifs-share"
    mount_max_retries=20
    mount_retry_interval=15s
    
  4. Install the module via Magisk Manager, then reboot.

Manual Trigger

Notes

  • Every distinct mount requires its own config file (e.g. cifs-1.conf, cifs-2.conf, etc.).
  • Config files are read at boot and during a manual trigger.
  • For a network share to be mounted, the network must be reachable within the timeframe defined by mount_max_retries and mount_retry_interval.
  • If mounting a CIFS share fails, try specifying a different CIFS version (e.g., vers=1.0, vers=3.0).

中文说明

描述

这是一个 Magisk 模块,用于在开机时挂载一个或多个文件系统(如 CIFS/SMB, NFS 等)。

模块在 Magisk Manager 中的描述会自动更新,以显示成功挂载的路径。

要求

  • Magisk v20.4+
  • 内核支持您需要挂载的文件系统 (提示: 可用 grep cifs /proc/filesystems 命令检查内核是否支持 cifs)

使用说明

  1. 在你的内置存储空间 (/sdcard/) 中创建一个名为 .multi-mount 的文件夹。

  2. /sdcard/.multi-mount 文件夹中,创建一个或多个以 .conf 结尾的配置文件。每个文件对应一个独立的挂载配置。

  3. 根据以下示例格式填写每个配置文件:

    mount_options="-t cifs -o vers=2.0,username=user,password=pass"
    mount_source="//host/share"
    mount_target="/mnt/cifs-share"
    mount_max_retries=20
    mount_retry_interval=15s
    
  4. 通过 Magisk Manager 安装此模块,然后重启设备。

手动触发

注意事项

  • 每个独立的挂载点都需要一个独立的配置文件 (例如 cifs-1.conf, cifs-2.conf 等)。
  • 模块会在开机时和手动触发时读取配置文件。
  • 要想成功挂载网络共享,必须在 mount_max_retriesmount_retry_interval 定义的时间范围内连接到网络。
  • 如果 CIFS 挂载失败,可以尝试指定一个不同的 CIFS 版本 (例如 vers=1.0, vers=3.0)。

About

Magisk module to mount one or more filesystems (e.g. CIFS/SMB, NFS, etc.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%