Hello! I was curious if Attended Sysupgrade could have a toggle to keep edits to grub.cfg. Currently, I believe it only keeps config, but not boot/grub/grub.cfg.
The Problem (with examples)
Some x86 systems get stuck at Grub & fail to boot OpenWRT. Why? Its default grub.cfg has two problematic lines in grub.cfg on serial & terminal output that block boot. Thus Attended Sysupgrade requires a physical keyboard to even boot OpenWRT (otherwise, no ssh, no IP, nothing).
Example 1 (yours truly)
Example 6 (from 2019!)
Example 10 (from 2018!)
What Affected Users Do Today
- Perform Attended Sysupgrade with “keep config” on certain x86 router boxes.
- The router fails to boot into OpenWRT. Nothing is accessible, not even ssh.
- Workaround Step One (required every upgrade): Connect a physical USB keyboard and press enter to boot OpenWRT to move past the Grub bootloader screen (stuck due to serial).
- Workaround Step Two (required every upgrade): Do the physical workaround first to get into OpenWRT→ use nano or a Live USB to comment out the serial lines in grub.cfg.
- Then, your x86 router can boot / reboot directly into OpenWRT without a physical keyboard.
- Until you run another Attended Sysupgrade: where OpenWRT resets grub.cfg to failing-boot-defaults and you need a physical keyboard to boot first → edit grub.cfg on each upgrade.
Possible Solution:
- When users select “keep config” in Attended Sysupgrade, it ought to keep grub.cfg’s edits made by the user. “Keep config” ought not to reset grub.cfg on each Attended Sysupgrade.
The Utopian Future:
- Perform Attended Sysupgrade with “keep config” on certain x86 router boxes.
- Refresh your browser, voila. Done. There is no step 3.
Now, I know very little about OpenWRT. I’m not sure if this is feasible or may have adverse knock-on effects for other users. Perhaps there is a very good reason why grub.cfg is overwritten even in Attended Sysupgrade.
But, if this could be helpful to others (it took five days of troubleshooting to figure this out on my post), I hope this solution could be a good enough workaround: you edit grub.cfg once and your grub.cfg is maintained between upgrades if you tick “keep config”.
