Linksys AC Series Router Configuration Tips for OpenWRT: Difference between revisions
| Line 91: | Line 91: | ||
Here's what's happening "behind the scenes" when the the power switch is cycled in the above fashion. The observations were made with a TTL / Serial / USB cable attached to the header on a router board. | Here's what's happening "behind the scenes" when the the power switch is cycled in the above fashion. The observations were made with a TTL / Serial / USB cable attached to the header on a router board. | ||
* The Marvell firmware starts the boot process (equivalent to the BIOS of a PC) | *The Marvell firmware starts the boot process (equivalent to the BIOS of a PC) | ||
* There is a 2-3 second pause where one can press a key on the command console to instruct the router to boot into a very basic environment for loading firmware (sort of equivalent to a BIOS setup utility on a PC) | *There is a 2-3 second pause where one can press a key on the command console to instruct the router to boot into a very basic environment for loading firmware (sort of equivalent to a BIOS setup utility on a PC) | ||
* Before the 2-3 second window described above expires (and the boot process continues) is when the power button is turned off. | *Before the 2-3 second window described above expires (and the boot process continues) is when the power button is turned off. | ||
Below are a few of lines of information displayed during the boot process;<syntaxhighlight lang="text"> | Below are a few of lines of information displayed during the boot process;<syntaxhighlight lang="text"> | ||
| Line 222: | Line 222: | ||
Additionally, if flashing DD-WRT (there's a reason) to the other partition, per this site: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318917&sid=ead6f3133aa640d078354c986b7c3981 and experimenting, it just does not seem possible to flash any recent version of DD-WRT to the other partition that works and doesn't create a "kernel panic" when booting. The solution? | Additionally, if flashing DD-WRT (there's a reason) to the other partition, per this site: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318917&sid=ead6f3133aa640d078354c986b7c3981 and experimenting, it just does not seem possible to flash any recent version of DD-WRT to the other partition that works and doesn't create a "kernel panic" when booting. The solution? | ||
* From an OpenWRT partition, flash the other partition with OpenWRT | *From an OpenWRT partition, flash the other partition with OpenWRT | ||
* Get an old firmware version of DD-WRT (Linksys Factory to DD-WRT), version 37xxx or below, sometime in 2018, and flash that | *Get an old firmware version of DD-WRT (Linksys Factory to DD-WRT), version 37xxx or below, sometime in 2018, and flash that | ||
* The router won't reboot properly, but give it a minute or so to make sure the image is copied, then turn the router off, then on. It will then boot to DD-WRT | *The router won't reboot properly, but give it a minute or so to make sure the image is copied, then turn the router off, then on. It will then boot to DD-WRT | ||
* Note, if using Firefox or any other browser to access the DD-WRT GUI, it will probably keep redirecting to the LuCI GUI. Clear the browsing history or open a private tab in Firefox to solve that issue. | *Note, if using Firefox or any other browser to access the DD-WRT GUI, it will probably keep redirecting to the LuCI GUI. Clear the browsing history or open a private tab in Firefox to solve that issue. | ||
* Get a more recent version of DD-WRT (upgrade version), flash that, good to go with OpenWRT on one partition and DD-WRT on the other. | *Get a more recent version of DD-WRT (upgrade version), flash that, good to go with OpenWRT on one partition and DD-WRT on the other. | ||
OK, why DD-WRT? Well, as it turns out, DD-WRT has a bunch of development tools that OpenWRT does not. That means it is much, much easier to compile one's own sofware (packages, not firmware) on a router. This includes perl packages, etc. And, as tested, the binary / executables on DD-WRT are completely functional on OpenWRT as long as all the dependencies are in place. It is even possible to have a huge chunk of DD-WRT software in the /opt Directory available on OpenWRT. The easiest way to not run into conflicts is to only install software that is not available in OpenWRT in the /opt Directory. That way environment paths can be set up to search /opt first, then the normal OpenWRT binary / executables. | OK, why DD-WRT? Well, as it turns out, DD-WRT has a bunch of development tools that OpenWRT does not. That means it is much, much easier to compile one's own sofware (packages, not firmware) on a router. This includes perl packages, etc. And, as tested, the binary / executables on DD-WRT are completely functional on OpenWRT as long as all the dependencies are in place. It is even possible to have a huge chunk of DD-WRT software in the /opt Directory available on OpenWRT. The easiest way to not run into conflicts is to only install software that is not available in OpenWRT in the /opt Directory. That way environment paths can be set up to search /opt first, then the normal OpenWRT binary / executables. | ||
| Line 305: | Line 305: | ||
*opkg update | *opkg update | ||
*opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb-storage kmod-usb2 kmod-usb3 ntfs-3g usbutils gdisk cfdisk tune2fs kmod-fs-exfat dosfstools kmod-fs-vfat f2fs-tools kmod-fs-f2fs lsblk ntfs-3g-utils fdisk sfdisk wipefs | *opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb-storage kmod-usb2 kmod-usb3 ntfs-3g usbutils gdisk cfdisk tune2fs kmod-fs-exfat dosfstools kmod-fs-vfat f2fs-tools kmod-fs-f2fs lsblk ntfs-3g-utils fdisk sfdisk wipefs blkidmkfs | ||
Please note, all of the above packages are not necessary. But they do represent a broad range of tools that are very useful. And since they don't take up a lot of space, it's worth installing them. They don't run as active services or anything either, so no extra RAM or CPU usage unless one types the command. Reboot after installing all of the above software. | Please note, all of the above packages are not necessary. But they do represent a broad range of tools that are very useful. And since they don't take up a lot of space, it's worth installing them. They don't run as active services or anything either, so no extra RAM or CPU usage unless one types the command. Reboot after installing all of the above software. | ||
| Line 451: | Line 451: | ||
====Viewing Available Internal Partitions and Information==== | ====Viewing Available Internal Partitions and Information==== | ||
'''''NOTE: Most of the below information in this section is from the perspective of OpenWRT. DD-WRT has a slightly different "perspective" on the layout.''''' | |||
See https://openwrt.org/toh/linksys/linksys_wrt1900ac, https://openwrt.org/toh/linksys/linksys_wrt1900acs, and https://openwrt.org/toh/linksys/linksys_wrt3200acm for Flash Memory Layouts of each AC Router Model. The Flash Memory (non-volatile RAM / NVRAM) Layout is directly comparable to Partitions on a Personal Computer's disk drive or SSD. | See https://openwrt.org/toh/linksys/linksys_wrt1900ac, https://openwrt.org/toh/linksys/linksys_wrt1900acs, and https://openwrt.org/toh/linksys/linksys_wrt3200acm for Flash Memory Layouts of each AC Router Model. The Flash Memory (non-volatile RAM / NVRAM) Layout is directly comparable to Partitions on a Personal Computer's disk drive or SSD. | ||
| Line 509: | Line 511: | ||
Remember, the flash memory layout of the AC Series was created by Linksys, not Marvell. And as noted by some, it seems a bit wasteful in how it was utilized. | Remember, the flash memory layout of the AC Series was created by Linksys, not Marvell. And as noted by some, it seems a bit wasteful in how it was utilized. | ||
The below information illustrates the difference in "perspective" between OpenWRT and DD-WRT in terms of how each of them "sees" the underlying partitions. The below information was obtained from a router with OpenWRT on partition 1 and DD-WRT on partition 2. The naming of the first four partitions is similar. The naming difference on mtd4 - mtd7 is a difference in naming conventions between the two firmwares. But notice the last "2 or 3" partitions... DD-WRT makes use of the "unused" mtd8 (from OpenWRT perspective) and divides it into two partitions (mtd8 and mtd9), nvram and dd-wrt. | |||
There is no explanation for the size differences. <syntaxhighlight lang="text"> | |||
---OpenWRT (cat /proc/mtd) | |||
dev: size erasesize name | |||
mtd0: 00200000 00020000 "u-boot" | |||
mtd1: 00040000 00020000 "u_env" | |||
mtd2: 00040000 00020000 "s_env" | |||
mtd3: 00100000 00020000 "devinfo" | |||
mtd4: 02800000 00020000 "kernel1" | |||
mtd5: 02200000 00020000 "ubi" | |||
mtd6: 02800000 00020000 "kernel2" | |||
mtd7: 02200000 00020000 "rootfs2" | |||
mtd8: 02600000 00020000 "syscfg" | |||
mtd9: 00680000 00020000 "unused_area" | |||
--DDWRT (cat /proc/mtd) | |||
dev: size erasesize name | |||
mtd0: 00200000 00020000 "u-boot" | |||
mtd1: 00040000 00020000 "u_env" | |||
mtd2: 00040000 00020000 "s_env" | |||
mtd3: 00100000 00020000 "devinfo" | |||
mtd4: 02800000 00020000 "linux" | |||
mtd5: 02500000 00020000 "rootfs" | |||
mtd6: 02700000 00020000 "linux2" | |||
mtd7: 02400000 00020000 "ubi" | |||
mtd8: 00040000 00020000 "nvram" | |||
mtd9: 02500000 00020000 "ddwrt" | |||
mtd10: 00680000 00020000 "unused_area" | |||
</syntaxhighlight> | |||
====Mounting Internal Partitions==== | ====Mounting Internal Partitions==== | ||