Comments (7)
Hello!!
If pstore support is enabled, then it should be fairly possible.
Just
sync
and then, proceed with
echo c >/proc/sysrq-trigger
... if you did the mtk-snand transition, you should have no further issues.
from owrt-ubi-installer.
That's a cool way to force a boot info recovery without physical access to the router.
If I have physical access to the router, can I not also boot into recovery by holding down the reset button while it powers up?
More importantly...
My impression was that, WHENEVER the router boots into recovery, the normal UBIFS root filesystem gets cleared.
This clearing of the UBIFS is what I'm trying to avoid.
I want to boot into recovery, mount the UBIFS without clearing it, modify it and reboot normally.
If the UBIFS is not cleared by booting into recovery, when does it get cleared?
from owrt-ubi-installer.
Hello!!
Maybe you could be interested in FailSafe mode? It can be entered later on in the boot process, see
https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset
That said, you can always play with the u-boot environment to change the device behaviour.
Then, depending on whether you are running an u-boot before openwrt.git commit
349e2b7e658290f967a4aab4fd9d754572f9b0b2
or after, behaviour might change. See that commit's commit message for further details.
I admit I have still some difficulties in following the flow of the environment code.
from owrt-ubi-installer.
failsafe mode should work well for me. Thank you!
Looking at the output for fw_printenv, I see that I'm running U-Boot 2021.04 (Aug 27 2021...)
This includes the definition for:
bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
Will running "boot_recovery" will clear the production UBIFS, or will it leave it intact?
It seems that u-boot has been modified so "boot_first" somehow runs before "bootcmd":
boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
--> This appears to be the logic booting to recovery if the reset button is pressed.
However, what is reading the 'boot_first' env variable?
I can't seem to find any reference to 'boot_first' in the u-boot sources either.
from owrt-ubi-installer.
Will running "boot_recovery" will clear the production UBIFS, or will it leave it intact?
boot_recovery
will not wipe or otherwise destroy the existing rootfs_data nor anything else. only if the recovery image is missing or broken, the bootloader will try to load it via TFTP and then write it to flash. In order to make sure there is enough space, rootfs_data is being deleted at this point. However, this should really only happen in case you somehow broke the recovery image stored in flash by the installer, and even in that case, it should happen only once.
Regarding the logic of the button:
There is a patch which makes the bootloader reset the environment in case it is held down during boot:
Regarding the complete default environment (to answer your question "what is calling boot_first?"), find it here:
https://github.com/openwrt/openwrt/blob/master/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch#L349
from owrt-ubi-installer.
That's a relief. Thanks.
If I understand these u-boot env definitions, one must apply the 300-mt7622-generic-reset-button-ignore-env.patch to enable pressing reset during power up to reach the boot_first definition, as it is only referenced by _firstboot, which deletes itself during the first boot after the env is initialized.
Correct?
If so, is there any reason not to allow booting recovery without reinitializing the U-Boot environment?
I'm thinking of tweaking the defs such that pressing reset during power up boots to recovery without applying the 300-mt7622-generic-reset-button-ignore-env.patch
from owrt-ubi-installer.
from owrt-ubi-installer.
Related Issues (20)
- E7350 Support HOT 4
- The image file is incorrect - when trying to downgrade firmware on Belkin RT3200 HOT 1
- updates to instruction
- Solid white power and internet lights
- Connection establishment takes long time HOT 5
- RT new firmware ver.: Ver. 1.2.00.360516 HOT 11
- [question] What's the current flash procedure HOT 1
- Update Pre-Built Files HOT 2
- OpenWRT UBI Installer for more routers HOT 2
- Attended sysupgrade doesn't upgrade to latest OpenWrt version HOT 14
- Flashed *-ubi-squashfs-sysupgrade.itb, router is non-responsive, power light blinking white HOT 2
- no lights when powering on,am i bricked HOT 16
- Unable to create UBI Installer Images from OpenWrt MAIN SNAPSHOT r25339-35a5e62da7 ImageBuilder HOT 5
- Rookie installs debugging build by accident and cannot reverse it. HOT 3
- 5Ghz wireless devices is miss.
- Stuck on the same production image after commit 6aec3c7 HOT 3
- build config and dts HOT 1
- Belkin RT3200 Stuck in Recovery Mode can only force upgrade (which all fail) HOT 3
- Downgrade from v1.1.1 to v1.0.3 HOT 2
- Restoring Vendor Firmware Failure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owrt-ubi-installer.