openwrt:install-usb-hdd
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| openwrt:install-usb-hdd [2013/03/19 00:42] – [USB HDD をマウント] admin | openwrt:install-usb-hdd [2013/11/20 23:48] (現在) – [Fstab の設定] admin | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== | + | ====== |
| - | * OpenWrt: ATTITUDE ADJUSTMENT (12.09-rc1, r34185) | + | * OpenWrt: ATTITUDE ADJUSTMENT (12.09, |
| ===== 作業内容 ===== | ===== 作業内容 ===== | ||
| 行 16: | 行 16: | ||
| ===== USB のドライバをインストール ===== | ===== USB のドライバをインストール ===== | ||
| - | USB 1.1, 2.0, 3.0 でインストールするパッケージが異なるが、USB 2.0 の HDD を使用する予定なので | + | 公式の wiki には |
| - | + | ||
| - | * [[http:// | + | |
| - | + | ||
| - | < | + | |
| - | # opkg update | + | |
| - | # opkg install kmod-usb2 | + | |
| - | Package kmod-usb2 (3.3.8-1) installed in root is up to date. | + | |
| - | # insmod ehci-hcd | + | |
| - | insmod: can't insert ' | + | |
| - | </ | + | |
| - | + | ||
| - | エラーが出た。。。 USB 1.1 もインストールしないとだめ? | + | |
| - | + | ||
| - | < | + | |
| - | # opkg install kmod-usb-uhci | + | |
| - | Installing kmod-usb-uhci (3.3.8-1) to root... | + | |
| - | Downloading http:// | + | |
| - | Configuring kmod-usb-uhci. | + | |
| - | + | ||
| - | # insmod usbcore | + | |
| - | insmod: can't insert ' | + | |
| - | # insmod uhci | + | |
| - | </ | + | |
| - | + | ||
| - | + | ||
| - | あれ?kmod-usb-core が入ってないとか? | + | |
| - | + | ||
| - | uhci は正常にインストールされたっぽい。 | + | |
| - | + | ||
| - | < | + | |
| - | # opkg list | grep usb-core | + | |
| - | kmod-usb-core - 3.3.8-1 - Kernel support for USB | + | |
| - | </ | + | |
| - | + | ||
| - | 入ってるし。更新が必要なのかな? | + | |
| - | + | ||
| - | < | + | |
| - | # opkg install kmod-usb-core | + | |
| - | Package kmod-usb-core (3.3.8-1) installed in root is up to date. | + | |
| - | </ | + | |
| - | + | ||
| - | 最新バージョンだった。 | + | |
| < | < | ||
| # lsmod | grep " | # lsmod | grep " | ||
| - | uhci_hcd | ||
| ohci_hcd | ohci_hcd | ||
| ledtrig_usbdev | ledtrig_usbdev | ||
| ehci_hcd | ehci_hcd | ||
| - | usbcore | + | usbcore |
| usb_common | usb_common | ||
| nls_base | nls_base | ||
| 行 79: | 行 36: | ||
| USB HDD は接続した状態で作業した。 | USB HDD は接続した状態で作業した。 | ||
| + | < | ||
| + | # opkg update | ||
| + | </ | ||
| < | < | ||
| # opkg install kmod-usb-storage block-mount kmod-fs-ext4 | # opkg install kmod-usb-storage block-mount kmod-fs-ext4 | ||
| Installing kmod-usb-storage (3.3.8-1) to root... | Installing kmod-usb-storage (3.3.8-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing kmod-scsi-core (3.3.8-1) to root... | Installing kmod-scsi-core (3.3.8-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing block-mount (0.2.0-9) to root... | Installing block-mount (0.2.0-9) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing blkid (2.21.2-1) to root... | Installing blkid (2.21.2-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing libblkid (2.21.2-1) to root... | Installing libblkid (2.21.2-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing libuuid (2.21.2-1) to root... | Installing libuuid (2.21.2-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing swap-utils (2.21.2-1) to root... | Installing swap-utils (2.21.2-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing kmod-fs-ext4 (3.3.8-1) to root... | Installing kmod-fs-ext4 (3.3.8-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Installing kmod-lib-crc16 (3.3.8-1) to root... | Installing kmod-lib-crc16 (3.3.8-1) to root... | ||
| - | Downloading http:// | + | Downloading http:// |
| Configuring kmod-scsi-core. | Configuring kmod-scsi-core. | ||
| Configuring kmod-usb-storage. | Configuring kmod-usb-storage. | ||
| 行 113: | 行 73: | ||
| < | < | ||
| - | root@OpenWrt: | + | # ls /dev/sd* |
| - | bus mtd1ro | + | ls: /dev/sd*: No such file or directory |
| - | console | + | |
| - | full | + | |
| - | kmsg | + | |
| - | log mtd3ro | + | |
| - | mem mtd4 | + | |
| - | mtd0 | + | |
| - | mtd0ro | + | |
| - | mtd1 | + | |
| </ | </ | ||
| 行 129: | 行 81: | ||
| < | < | ||
| - | bsg mtd1ro | + | # ls /dev/sd* |
| - | bus mtd2 | + | /dev/sda /dev/sda1 |
| - | console | + | |
| - | full | + | |
| - | kmsg | + | |
| - | log mtd4 | + | |
| - | mem mtd4ro | + | |
| - | mtd0 | + | |
| - | mtd0ro | + | |
| - | mtd1 | + | |
| </ | </ | ||
| 行 147: | 行 91: | ||
| < | < | ||
| # mkdir -p / | # mkdir -p / | ||
| - | # # mount -t ext4 /dev/sda1 /mnt/usb-sidk/ -o rw,sync | + | # mount -t ext4 /dev/sda1 /mnt/usb-disk/ -o rw,sync |
| </ | </ | ||
| - | |||
| ===== Fstab の設定 ===== | ===== Fstab の設定 ===== | ||
| + | 以下のパーティション構成にした。 | ||
| - | fstab が ubuntu とは違う。 | + | * sda1: メインパーティション。Samba や Netatalk で使う予定。 |
| - | [[http:// | + | fstab が ubuntu とは違うみたい。[[http:// |
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | # vi / | ||
| + | </ | ||
| + | |||
| + | デフォルトの設定をちょっと変えてこのようにしてみた。 | ||
| + | |||
| + | < | ||
| + | config global automount | ||
| + | option from_fstab 1 | ||
| + | option anon_mount 1 | ||
| + | |||
| + | config global autoswap | ||
| + | | ||
| + | option from_fstab 1 | ||
| + | option anon_swap 0 | ||
| + | |||
| + | config mount | ||
| + | option target | ||
| + | option uuid | ||
| + | option fstype | ||
| + | option options | ||
| + | option enabled | ||
| + | option enabled_fsck 0 | ||
| + | |||
| + | config swap | ||
| + | option device | ||
| + | option enabled | ||
| + | </ | ||
| + | |||
| + | Netatalk で拡張属性をファイルシステムで保存したいので、 user_xattr をオプションとして設定。 | ||
| + | |||
| + | ブート時に毎回マウントする場合。 | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | </ | ||
| + | |||
| + | 今すぐマウントする場合。 | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | </ | ||
| + | |||
| + | fstab を変更した後に設定を有効にする場合。 | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | </ | ||
| + | |||
| + | ブート時にマウントするように設定後、マウントを行う。 | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | # / | ||
| + | # df | ||
| + | Filesystem | ||
| + | rootfs | ||
| + | / | ||
| + | tmpfs 63340 | ||
| + | tmpfs 512 | ||
| + | / | ||
| + | overlayfs:/ | ||
| + | / | ||
| + | </ | ||
openwrt/install-usb-hdd.1363621367.txt.gz · 最終更新: 2013/03/19 00:42 by admin
