OpenWrt USB Hot Swap automatic mount

Source: Internet
Author: User

  • Adding USB-related support
    Kernel modules-> USB support-> <*> kmod-usb-core.  # #默认已经选了Kernel modules-> USB support-> <*> kmod-usb-ohci.  # #默认已选 Old Usb1.0kernel modules-> USB support-> <*> kmod-usb-uhci.  # # Usb1.1kernel modules-> USB support-> <*> kmod-usb-storage. Kernel modules-> USB support-> <*> Kmod-usb-storage-extras. Kernel modules-> USB support-> <*> kmod-usb2.  # #默认已经选了 USB2.0

  • Adding SCSI support
    Kernel modules-> Block devices-> <*>kmod-scsi-core  # #默认已经选了 usb3.0

  • Add USB Mount
    Base system-> <*>block-mount

  • Add File system support
    Kernel modules-> filesystems-> <*> kmod-fs-ext4 (removable HDD EXT4 format selection) Kernel modules-> filesystems-> <*&G T Kmod-fs-vfat (fat16/fat32 format selection) Kernel modules-> filesystems-> <*> kmod-fs-ntfs (NTFS format selection)

  • Exit Save Make V=99

Auto-mount USB drive: Edit/etc/hotplug.d/block/10-mount write the following
#!/bin/ashcase "$ACTION" Inadd) for I in $ (ls/dev/| grep ' sd[a-z][1-9] ') domkdir-p/mnt/$imount-o Iocharset=utf8,rw/dev /$i/mnt/$iif [$?-ne 0]thenmount-o rw/dev/$i/mnt/$ifidone;; Remove) mount= ' MOUNT | Grep-o '/mnt/sd[a-z][1-9] ' for i in $MOUNTdoumount $iif [$-eq 0]thenrm-r $ifidone;; Esac

OpenWrt USB Hot Swap automatic mount

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.