本帖最后由 KDE 于 2022-5-13 19:04 编辑
需要注意的是RouterOS默认不支持IPV6 DHCP CLIENT 需要把IP地址网关,写入镜像再DD
# 创建内存临时目录 mount -t tmpfs tmpfs /tmp/
# 打开内存临时目录 cd /tmp
# 下载RouterOS镜像到内存临时目录 wget https://download.mikrotik.com/routeros/7.3beta37/chr-7.3beta37.img.zip
# 解压 unzip chr-7.3beta37.img.zip
# 加载镜像 kpartx -av chr-7.3beta37.img
# 挂载镜像第二个分区 mount /dev/mapper/loop0p2 /mnt
# 创建开机启动脚本 cat <<EOF> /mnt/rw/autorun.scr /interface ethernet set [ find default-name=ether1 ] disable-running-check=no /ip service set telnet disabled=yes set ftp disabled=yes set www disabled=yes set ssh disabled=yes set api disabled=yes set api-ssl disabled=yes /ipv6 address add address=IPV6地址/64 advertise=no interface=ether1 /ipv6 route add disabled=no dst-address=::/0 gateway=IPV6网关 routing-table=main /ip dns set servers=2606:4700:4700::1111,2606:4700:4700::100 /ipv6 firewall nat add action=masquerade chain=srcnat /user set 0 password="设置密码" /system reboot EOF
# 让文件系统只读 echo 1 > /proc/sys/kernel/sysrq echo u > /proc/sysrq-trigger
#DD dd if=/tmp/chr-7.3beta37.img of=/dev/硬盘位置 bs=4M status=progress
# 强制重启 echo 1 > /proc/sys/kernel/sysrq echo b > /proc/sysrq-trigger
# 完成
拳打SS 脚踢V2 头顶TJ
|