Bookmark

Upgrading OpenWrt with LuCI and CLI without accidental configuration loss

Upgrading OpenWrt writes firmware. “Keep configuration” does not mean that every package and local change will remain valid. Before using LuCI or the CLI, confirm the model/target, image, release, and recovery path.

Prepare and back up

1
2
3
4
ubus call system board
cat /etc/openwrt_release
df -h
sysupgrade -b /tmp/config-backup.tar.gz

Copy the backup off the router. A configuration archive is not a full flash dump and cannot restore a damaged bootloader or ART partition. For an important device, prepare the model-specific UART or recovery method.

Upgrade through LuCI

  1. Download the correct -sysupgrade.bin for the current board from OpenWrt .
  2. Verify the checksum/signature using the release instructions.
  3. Open System > Backup / Flash Firmware.
  4. Upload the image, then recheck the filename and board detected by LuCI.
  5. Keep the configuration only when the target/release is compatible and an off-device backup exists.
  6. Click Continue, review the final confirmation, and start the flash.
  7. Do not remove power or interrupt management while the device reboots.
  8. Reconnect at the old address, or follow the model's default/recovery address when required.

Upgrade from the CLI

Copy the image to /tmp, verify its path, and use sysupgrade:

1
2
sysupgrade -T /tmp/openwrt-<target>-<profile>-sysupgrade.bin
sysupgrade -c /tmp/openwrt-<target>-<profile>-sysupgrade.bin

-c keeps the current configuration; do not use it when the old configuration is incompatible with the new release. To start clean, omit -c and restore selected settings after testing. Do not use -F/--force unless the target documentation explicitly requires it.

After the reboot

1
2
3
4
ubus call system board
cat /etc/openwrt_release
df -h
logread | tail -80

Test WAN, LAN, DHCP, DNS, Wi-Fi, firewall, and important packages. If the retained configuration causes trouble, use the model recovery path or reset and restore sections from the backup one at a time; do not copy an entire old /etc/config tree into an incompatible image.

Source


0 Bình luận

Góp Ý / Bình Luận / Đánh giá