Last active
May 5, 2020 11:48
-
-
Save arairait/e56f214b03efebba4a28 to your computer and use it in GitHub Desktop.
NASなどのARM LinuxでCIFSマウントする方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
マウント用コマンドのインストール。 | |
# apt-get install cifs-utils | |
これでmount.cifsが入ったはず。確認する。 | |
# which mount.cifs | |
/sbin/mount.cifs | |
OK。 | |
マウントしてみる。 | |
# mount -t cifs -o username=hoge,password=hoge //server/share /mnt/windows | |
mount error: cifs filesystem not supported by the system | |
カーネルモジュールのcifs.koがない。 | |
本当に無いか確認。 | |
# ls /lib/modules/`uname -r`/kernel/fs/cifs | |
ls: cannot access /lib/modules/3.3.4/kernel/fs/cifs: No such file or directory | |
ない。 | |
cifs.koをビルドしよう。 | |
Linux 3.3.4 のソースをダウンロードする。 | |
# cd /usr/src | |
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.3.4.tar.bz2 | |
# tar jxvf linux-3.3.4.tar.bz2 | |
# cd linux-3.3.4 | |
コンフィグレーション | |
# make menuconfig | |
デフォルトだとCIFSはメニューに現れないので注意。 | |
[*] Enable loadable module support | |
Networking Support - Networking Optiions - [*] TCP/IP networking | |
File Systems - Networking File Systems - <M> CIFS support | |
# make prepare | |
# make scripts | |
# make | |
: | |
CC fs/cifs/cifs.mod.o | |
LD [M] fs/cifs/cifs.ko | |
CC fs/nls/nls_base.mod.o | |
LD [M] fs/nls/nls_base.ko | |
: | |
できた。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment