0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenWrt USB

Last updated at Posted at 2023-08-12

:warning:Japanese notation

こちらに統合しました

PowerShellSSHアクセス

ssh root@192.168.1.1
ssh root@192.168.1.1のショートカット作成(デスクトップ)
powershell
$DESKTOP = ([Environment]::GetFolderPath("Desktop") + "\192.168.1.1.lnk")
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$DESKTOP")
$Shortcut.TargetPath = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
$Shortcut.Arguments = '-windowstyle hidden -ExecutionPolicy RemoteSigned "Start-Process ssh root@192.168.1.1"'
$Shortcut.IconLocation = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe,0"
$Shortcut.WorkingDirectory = "."
$Shortcut.Save()

  • 強制的に貼り付け
  • yes

SSHログイン出来ない場合:exclamation:

known_hostsクリア

  • C:\Users\yourusername\.ssh\known_hosts ※Windows隠しファイル
powershell
Clear-Content .ssh\known_hosts -Force


OpenSSHのインストール
※Windows 10 Fall Creators Update(1709)以降標準搭載

  • 機能の確認
powershell
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'

  • 機能のインストール
powershell
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0


USB

ベース

opkg update
opkg install block-mount
opkg install kmod-usb-storage
opkg install kmod-usb-storage-uas
opkg install usbutils
opkg install gdisk
opkg install libblkid1
# USBポート_LEDトリガー
opkg install kmod-usb-ledtrig-usbport
opkg install luci-app-ledtrig-usbport
# reboot

ファイルシステム

opkg update
# FAT32
opkg install dosfstools
opkg install kmod-fs-vfat
# ext4
opkg install e2fsprogs
opkg install kmod-fs-ext4
# f2fs
opkg install f2fs-tools
opkg install kmod-fs-f2fs
# exFAT
opkg install exfat-fsck
opkg install kmod-fs-exfat
# NTFS
opkg install ntfs-3g
opkg install kmod-fs-ntfs3
# HFS & HFS+
opkg install hfsfsck
opkg install kmod-fs-hfs
opkg install kmod-fs-hfsplus

ハードディスクアイドル

opkg update
opkg install hdparm
opkg install hd-idle
opkg install luci-app-hd-idle
opkg install luci-i18n-hd-idle-ja

USBドライブフォーマット

  • フラッシュメモリー(メモリースティック等)
mkfs.f2fs /dev/sda1

  • ハードディスク
mkfs.ext4 /dev/sda1

カスタムフィード

ディスクインフォ

#! /bin/sh
# custom feed (log viewer, cpu status, cpu perf, temp status, Internet detector, disk info)
if [ -e ${UPDATE} ]; then
opkg update
UPDATE="1"
fi
mkdir -p /etc/config-software
wget --no-check-certificate -O /etc/config-software/pacage_list https://github.com/gSpotx2f/packages-openwrt/raw/master/current/
PACAGE_LIST=`cat  /etc/config-software/pacage_list |sed -ne '/ <script type/,/<\/script>/p' |sed -e 's/<[^>]*>//g'`
DISKA_INFO=`echo ${PACAGE_LIST} | awk '{print substr($0,index($0,"current/luci-app-disks-info") ,44)}'`
wget --no-check-certificate -O /tmp/luci-app-disks-info_all.ipk https://github.com/gSpotx2f/packages-openwrt/raw/master/${DISKA_INFO}
opkg install /tmp/luci-app-disks-info_all.ipk
rm /tmp/luci-app-disks-info_all.ipk

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?