优酷路由宝YK |
您所在的位置:网站首页 › 电影英雄无悔简介50字怎么写 › 优酷路由宝YK |
优酷路由宝YK-L1路由器刷老毛子
1 刷入固件
思路: 查询路由器参数 根据路由器参数选择刷入不同bootloader 引导(或称引导程序)在计算机中是计算控制系统的一个初始化过程。引导过程可以是“硬引导”,如:开机通电后硬件诊断;也可以是“软引导”,此时会跳过开机自启。一些系统中软启动过程中,RAM可以不清零。软启动和硬启动都可以通过硬件发起,如按下电源开关;也可以通过软件命令来进行。当正常、有效的运行环境达到后,启动完成。 引导装载程序是计算机开机自检完成后装载操作系统或者其他系统软件的计算机程序。自检完成后运行引导装载程序,然后再加载并运行软件。引导装载程序可以从硬盘装载到主内存中。一些老计算机中,引导装载程序可以从打孔卡、穿孔纸带、或者磁带中加载到主内存中。启动装载程序加载且执行完成启动的程序。和POST程序相似,启动设备代码可以存储在永久存储体位置中,也可以为硬连线的形式。 当代通用计算机中,启动过程通常包含开机自检(POST)、初始化周边设备、然后加载操作系统。一些嵌入式系统直接运行存储在ROM中的可执行程序。 引导在英文中为“boot”,是bootstrap的缩写,源自于短语“Pull oneself up by one's bootstraps”,即“靠自己振作起来”。如果大部分软件需要通过其他已运行的程序加载到计算机中,则必须存在一个将初始软件加载到计算机中的机制。 PC:BIOS, UEFI, coreboot, GNU GRUB Embedded Devices:Das U-Boot, RedBoot, CFE, Adam2, brnboot, bootbase, jboot, myloader, pp_boot, yamon, Breed根据路由器参数选择刷入不同第三方路由器固件 下面以优酷路由宝YOUKU YK1为例子 1.1 查询YK-L1参数 优酷路由宝Openwrt Techdata: YOUKU YK1 1.2 刷入BreedBoot and Recovery Environment for Embedded Devices (BREED) A multi-task bootloader with real-time firmware upgrading progress. 下载地址 YK-L1选择breed-mt7620-youku-yk1.bin 1.3 Padavan国内可使用恩山无线论坛维护的padavan YK-L1选择RT-N14U-GPIO-1-youku1-128M_3.4.3.9-099.trx 2 如何配置Entware⚠️该部分主要针对Padavan老毛子用户 Entware是一个高级软件包管理器,它使您可以轻松地将交叉编译的Linux应用程序通过Internet安装和卸载到设备上。这是OpenWRT软件存储库,使用相当现代的工具链进行了编译。它使用了Optware中不提供的新功能。 这是Entware可用的软件包列表(也可使用opkg list查询)。 2.1 终端应用程序的安装和使用首先,打开浏览器,在左下方窗格中选择高级设置->管理->系统,然后选择要使用的服务器。请注意,强烈建议仅将SSH用作外部连接的服务器。因为Telnet是不安全的协议,并且SSH是它的替代品。但是,对于专用(内部)网络使用,安全性不是必需的。 adm-system-en在上面的示例中,选择了SSH作为首选方法。选择您要使用的选项,然后应用以将设置保存到路由器。 您需要一个终端客户端才能与路由器建立连接。终端应用程序是用于文本输入和显示输出的串行计算机接口。有许多不同的应用程序。您应该根据自己的操作系统选择一个。 2.1.1 Windows XP,Vista和Windows 7用户的指导PuTTY是Windows和Unix的Telnet和SSH的免费实现。下载安装程序,然后安装应用程序。安装后,只需很少的配置即可访问路由器。要开始会话,您将需要输入一些基本参数。在“Session”中,选择“Host name”,输入router的IP地址。从与路由器配置的协议匹配的“Connection type”中选择要使用的登录协议。然后,选择“Translation”,并确保为字符集字段配置了UTF-8。 putty_932x448重要说明:使用终端连接时,切勿将登录名和密码保存到任何客户端 完成正确的配置后,选择配置窗口右下方的“打开”按钮,PuTTY将使用正确的协议启动与路由器的连接。 2.1.2 MacOS用户的指导打开Finder,然后转到Applications => Utilities。双击Terminal 1ssh admin@ip_address 2.2 USB磁盘格式化基于Linux的系统使用EXTended文件系统。建议使用容量超过512MB的外部磁盘(HDD,闪存),并使用EXT2,EXT3或EXT4文件系统进行格式化。推荐使用EXT4文件系统。 注意:可以但不建议在Linux上使用NTFS磁盘。这些说明将基于推荐的Linux文件系统 2.2.1 对于Windows XP,Vista或Windows 7用户下载并安装EaseUS Partition Master Home Edition。 在这里,您可以找到带有说明和屏幕截图的详细过程。 2.2.2 对于MacOS用户您可以使用MacFuse。请按照本指南安装程序。 2.2.3 使用路由器格式化磁盘驱动器插入USB磁盘,然后等待USB指示灯点亮。指示灯指示驱动器已安装后,您就可以开始使用USB驱动器了。 思路: 删除旧分区表; 创建“ DOS”分区表; 添加一个分区; 用'ext4'格式化它; 提交所有结果。打开一个终端会话,然后连接到您的路由器。系统将提示您输入路由器的密码。输入用户密码。 建立连接后,您将看到BusyBox问候语和提示。 term_greet在使用提示符输入命令之前,请检查是否未通过Web界面安装磁盘。 webiface1-en在此示例中,磁盘仍处于安装状态,在继续操作之前需要将其卸下。在“安全移除磁盘”选项中按“移除”以卸载连接的驱动器。 警告!如果光盘驱动器仍安装在网络接口中,请勿继续! img要检查驱动器上存在哪些分区: 123456789101112cat /proc/partitionsmajor minor #blocks name 31 0 192 mtdblock0 31 1 64 mtdblock1 31 2 64 mtdblock2 31 3 1228 mtdblock3 31 4 6579 mtdblock4 31 5 64 mtdblock5 31 6 7872 mtdblock6 8 0 7910400 sda 8 1 7908626 sda1由于可以将两个USB驱动器连接到不同路由器 USB端口,因此USB驱动器可以是sda或sdb。 正如您在示例中看到的那样,一个驱动器是sda,它有一个分区是sda1。 12345678fdisk -lu /dev/sdaDisk /dev/sda: 8100 MB, 8100249600 bytes175 heads, 12 sectors/track, 7533 cylinders, total 15820800 sectorsUnits = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System/dev/sda1 2048 15819299 7908626 83 Linux创建一个新的分区表并将其格式化。注意,您将需要在卷volume(fdisk /dev/sda)而不是分区partition(fdisk /dev/sda1)上执行磁盘操作! 补充知识 Cylinder-head-sector 550px-Hard_drive_geometry_-English-_2019-05-30.svg 2.2.3.1 如果不需要交换分区请使用“ fdisk”创建一个新分区。(输入fdisk -u /dev/sda用于扇区sector而不是圆柱体cylinders) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051fdisk /dev/sdaThe number of cylinders for this disk is set to 7533.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)Command (m for help): mCommand Actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionl list known partition typesn add a new partitiono create a new empty DOS partition tablep print the partition tableq quit without saving changess create a new empty Sun disklabelt change a partition's system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)Command (m for help): dSelected partition 1Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-7533, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-7533, default 7533): Using default value 7533Command (m for help): pDisk /dev/sda: 8100 MB, 8100249600 bytes175 heads, 12 sectors/track, 7533 cylindersUnits = cylinders of 2100 * 512 = 1075200 bytes Device Boot Start End Blocks Id System/dev/sda1 1 7533 7908626 83 LinuxCommand (m for help): wThe partition table has been altered.Calling ioctl() to re-read partition table检查分区以查看是否已创建。 12345678fdisk -lu /dev/sdaDisk /dev/sda: 8100 MB, 8100249600 bytes175 heads, 12 sectors/track, 7533 cylinders, total 15820800 sectorsUnits = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System/dev/sda1 2048 15819299 7908626 83 Linux现在卸载驱动器:ejusb 现在使用卷标“ Main”格式化分区。将来,该分区将使用该标签安装在系统中。 123456789101112131415161718192021mkfs.ext4 -m 0 -L Main /dev/sda1mke2fs 1.42.8 (20-Jun-2013)Filesystem label=MainOS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks7808 inodes, 1977156 blocks0 blocks (0.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=202584883261 block groups32768 blocks per group, 32768 fragments per group128 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done注意:如果格式化容量超过256 TB的USB驱动器,则可以使用命令mkfs.ext4 -m 0 -T largefile -L Main /dev/sda1 注意:超级用户使用了5%的磁盘容量。 拔下磁盘,然后再次插入以创建以下目录,或者使用下面的这两个命令。 12mkdir /media/Mainmount -t ext4 /dev/sda1 /media/Main 2.2.3.2 如果需要交换分区并且打算使用BitTorrent客户端等应用程序或需要大量内存的应用程序(下载管理器,“微型服务器”等),则可能需要SWAP分区。另外,当使用媒体服务器UPnP / DLNA时,建议存在SWAP分区,这是在数据库创建媒体内容的过程中消耗了大量RAM的。 重要的提示!不建议在USB硬盘驱动器上创建交换文件或分区。如果USB磁盘未正确拔出(例如,路由器突然断电或其他原因),则可能导致系统崩溃。 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061fdisk -u /dev/sdaCommand (m for help): mCommand Actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionl list known partition typesn add a new partitiono create a new empty DOS partition tablep print the partition tableq quit without saving changess create a new empty Sun disklabelt change a partition's system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)Command (m for help): dSelected partition 1Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First sector (2048-15820799, default 2048): Using default value 2048Last sector or +size or +sizeM or +sizeK (2048-15820799, default 15820799): +256MCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 2First sector (502049-15820799, default 502049): Using default value 502049Last sector or +size or +sizeM or +sizeK (502049-15820799, default 15820799): Using default value 15820799Command (m for help): tPartition number (1-4): 1Hex code (type L to list codes): 82Changed system type of partition 1 to 82 (Linux swap)Command (m for help): pDisk /dev/sda: 8100 MB, 8100249600 bytes175 heads, 12 sectors/track, 7533 cylinders, total 15820800 sectorsUnits = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System/dev/sda1 2048 502048 250000+ 82 Linux swapPartition 1 does not end on cylinder boundary/dev/sda2 502049 15820799 7659375+ 83 LinuxPartition 2 does not end on cylinder boundaryCommand (m for help): wThe partition table has been altered.Calling ioctl() to re-read partition table现在卸载驱动器:ejusb 现在使用卷标“ Main”格式化分区。 123456789101112131415161718192021mkfs.ext4 -m 0 -L Main /dev/sda2mke2fs 1.42.8 (20-Jun-2013)Filesystem label=MainOS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks7552 inodes, 1914843 blocks0 blocks (0.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=196293427259 block groups32768 blocks per group, 32768 fragments per group128 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done注意:如果格式化容量超过256TB 的USB驱动器,则可以使用命令mkfs.ext4 -m 0 -T largefile -L Main /dev/sda1 并创建交换空间: 12mkswap /dev/sda1Setting up swapspace version 1, size = 255996416 bytes交换分区将在启动时或插入USB磁盘时自动安装。 2.3 使用Entware如果尚未插入USB驱动器,请立即进行操作。打开终端(PuTTY),然后登录路由器。下一步是创建一个新目录。 检查是否通过终端安装了磁盘。 123456789101112131415mountrootfs on / type rootfs (rw)/dev/root on / type squashfs (ro,relatime)proc on /proc type proc (rw,relatime)sysfs on /sys type sysfs (rw,relatime)usbfs on /proc/bus/usb type usbfs (rw,relatime)tmpfs on /dev type tmpfs (rw,relatime,size=8k)tmpfs on /etc type tmpfs (rw,noatime,size=2048k)tmpfs on /home type tmpfs (rw,relatime,size=1024k)tmpfs on /media type tmpfs (rw,relatime,size=8k)tmpfs on /mnt type tmpfs (rw,relatime,size=8k)tmpfs on /tmp type tmpfs (rw,relatime,size=24576k)tmpfs on /var type tmpfs (rw,relatime,size=4096k)devpts on /dev/pts type devpts (rw,relatime,mode=600)/dev/sda1 on /media/Main type ext4 (rw,noatime,data=ordered)现在创建新目录opt 1mkdir /media/Main/opt现在,卸下磁盘驱动器:ejusb 转到高级设置-> USB应用程序->通用设置。将“允许运行Optware”切换为“ Entware”,然后最后按“应用”以保存设置。 img拔下USB驱动器,然后再次插入。等待USB指示灯指示可以使用路由器上的驱动器,然后在终端中使用“ mount”命令检查驱动器的输出。 12345678910111213141516mountrootfs on / type rootfs (rw)/dev/root on / type squashfs (ro,relatime)proc on /proc type proc (rw,relatime)sysfs on /sys type sysfs (rw,relatime)usbfs on /proc/bus/usb type usbfs (rw,relatime)tmpfs on /dev type tmpfs (rw,relatime,size=8k)tmpfs on /etc type tmpfs (rw,noatime,size=2048k)tmpfs on /home type tmpfs (rw,relatime,size=1024k)tmpfs on /media type tmpfs (rw,relatime,size=8k)tmpfs on /mnt type tmpfs (rw,relatime,size=8k)tmpfs on /tmp type tmpfs (rw,relatime,size=24576k)tmpfs on /var type tmpfs (rw,relatime,size=4096k)devpts on /dev/pts type devpts (rw,relatime,mode=600)/dev/sda1 on /media/Main type ext4 (rw,noatime,data=ordered)/dev/sda1 on /opt type ext4 (rw,noatime,data=ordered)如您所见,/ dev / sda1分区已安装到/ media / Main,下一行显示/ media / Main / opt已安装到/ opt。 同样,如果您有交换分区/ dev / sda1,您将看到另一个输出: 12345678910111213141516mountrootfs on / type rootfs (rw)/dev/root on / type squashfs (ro,relatime)proc on /proc type proc (rw,relatime)sysfs on /sys type sysfs (rw,relatime)usbfs on /proc/bus/usb type usbfs (rw,relatime)tmpfs on /dev type tmpfs (rw,relatime,size=8k)tmpfs on /etc type tmpfs (rw,noatime,size=2048k)tmpfs on /home type tmpfs (rw,relatime,size=1024k)tmpfs on /media type tmpfs (rw,relatime,size=8k)tmpfs on /mnt type tmpfs (rw,relatime,size=8k)tmpfs on /tmp type tmpfs (rw,relatime,size=24576k)tmpfs on /var type tmpfs (rw,relatime,size=4096k)devpts on /dev/pts type devpts (rw,relatime,mode=600)/dev/sda2 on /media/Main type ext4 (rw,noatime,data=ordered)/dev/sda2 on /opt type ext4 (rw,noatime,data=ordered)警告!除非将其安全地移除或通过端子拆卸,否则切勿拔出磁盘的插头! 2.4 安装应用程序的方法注意!在安装任何应用程序之前,强烈建议您更新有关存储库的信息!: 12opkg updateopkg upgrade要从Entware存储库安装应用程序,请使用: 1opkg install { app_name }此命令将安装具有其依赖项的应用程序。 注意:切勿自己从磁盘上的/opt目录中删除任何东西。采用: 1opkg remove { app_name }例如,如果您需要Midnight Commander,请使用: 12opkg updateopkg install mc这将安装Midnight Commander。 用opkg list看到的应用程序库avaliable整个列表。要获取更多信息,请使用opkg --help。 Entware具有按名称和软件包描述进行搜索的功能: 1opkg find "*game*" 2.4 安装xUpnpd 12opkg updateopkg install xupnpd启动xUpnpd: 1/opt/etc/init.d/S94xupnpd start安装xUpnpd之后,您可以在/opt/share/xupnpd目录中编辑它的配置(可以通过WEB-interface进行编辑)。 注意:任何应用程序的所有配置文件都必须保存为UNIX风格!!!! 例如,您可以安装Midnight Commander并从中编辑所有配置文件。 如果您希望某个应用程序在启动时启动,请检查脚本的第一个字母,该脚本在/opt/etc/init.d中对其进行调用。应该是“ S”。 12ls -a /opt/etc/init.d. .. S01system S10iptables S94xupnpd rc.func rc.unslung重要!!当您安装任何应用程序时,请始终使用脚本中的内容检查该应用程序是否可以完全停止/opt/etc/init.d 它。如果该应用程序不能停止运行,则您在磁盘(例如文件系统)上的信息可能会严重损坏! |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |