OpenWrt (x86) 安装全攻略,适用于LEDE/DD-WRT/Gargoyle-router/高恪/爱快等[已更新] 作者: 邪恶海盗 时间: 2020-03-17,03:03 分类: 系统研究 惯例,先来个安装成功的图: ![请输入图片描述][1] 写在最前: 由于各大软x86路由厂商少有提供.iso光盘镜像,所以就有了这篇文章,仅供参考 一. 硬盘安装 1.将硬盘挂在Windows/WinPE下,使用映像写入工具如DiskImage等将.img映像写入硬盘,然后装回目标计算机启动(省略) 2.将硬盘挂在Linux下,使用DD命令将.img写入硬盘,然后装回目标计算机启动(省略) 二. 网络(PXE启动)安装 使用PXE网启安装,参见http://www.hidao.org/529.html (已修正,但原图未更新) 三. 使用U盘启动安装(无需破坏数据) 注:此示例使用VMware Player虚拟机来模拟目标计算机,使用一个1G容量的虚拟硬盘来模拟U盘,使用openwrt.img演示,使用Grub4DOS引导,其它引导方式请自测,原理相同 1. 将U盘插入电脑,运行BootIce,选择目标磁盘为U盘 ![请输入图片描述][2] 2. 点击"主引导记录",设置主引导记录为Grub4DOS,按图示操作"写入磁盘" ![请输入图片描述][3] 3. 将准备好的grldr文件和openwrt.img(原文件名openwrt-19.07.2-x86-64-combined-ext4.img.gz)硬盘映像复制到U盘根目录和/images目录(重要),完成后磁盘结构如图 ![请输入图片描述][4] 4. 将U盘插入目标计算机并设置优先启动,如无误则U盘启动成功(注:不支持UEFI启动) ![请输入图片描述][5] 5. 执行'菜单2-引导openwrt.img安装' ![请输入图片描述][6] -a. 输入映像名称,回车默认为/images/openwrt.img(输入xxx.img.gz硬盘映像也支持) -b. 确定指定的映像已找到后,按任意键将映像加载到虚拟硬盘(hd30) ![请输入图片描述][7] -c. 映像加载成功,自动搜索本机磁盘 -d. 输入想要写入的目标磁盘,回车默认为(hd1)并列出信息(由于之前写入过,所以这里的格式是ext2fs) ![请输入图片描述][8] -e. 输入确定密码,准备写入操作 ![请输入图片描述][9] -f. 写入成功,列出目标磁盘信息(报错可能是虚拟机不支持,不影响) 7. 如果以上操作无误,将成功进入 Openwrt 引导程序 ![请输入图片描述][10] 8. Openwrt 启动成功 ![请输入图片描述][11] 所需文件bootice/grldr下载地址:[Openwrt_Install_ByUSB_Files][16](兼容PXE,输入gocloud.img可引导安装高恪) [1]: http://hidao.org/wp-content/uploads/2020/03/17/boot2.jpg [2]: http://hidao.org/wp-content/uploads/2020/03/17/bootice1.jpg [3]: http://hidao.org/wp-content/uploads/2020/03/17/bootice2.jpg [4]: http://hidao.org/wp-content/uploads/2020/03/17/disk1.jpg [5]: http://hidao.org/wp-content/uploads/2020/03/17/g4d1.jpg [6]: http://hidao.org/wp-content/uploads/2020/03/17/g4d2.jpg [7]: http://hidao.org/wp-content/uploads/2020/03/17/g4d3.jpg [8]: http://hidao.org/wp-content/uploads/2020/03/17/g4d4.jpg [9]: http://hidao.org/wp-content/uploads/2020/03/17/g4d5.jpg [10]: http://hidao.org/wp-content/uploads/2020/03/17/boot1.jpg [11]: http://hidao.org/wp-content/uploads/2020/03/17/boot2.jpg [16]: http://hidao.ys168.com 标签: openwrt, grub4dos, 高恪, u盘启动, dd-wrt, lede