Upgrading an OpenWrt 18.06.1 x86_64 ext4 image to 18.06.2

Before proceeding, power off your OpenWrt 18.06.1 ext4 system and create a backup image.

Upgrade all non-core packages

You know the drill. If a netifd update is available, upgrade it first. Upgrading netifd will restart the network interface daemon, and if netifd is upgraded together with other packages, they will fail to download while the network interfaces are being re-initialized.

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg list-upgradable
root@OpenWrt:~# opkg upgrade netifd
root@OpenWrt:~# opkg list-upgradable | cut -d ' ' -f 1 | xargs opkg upgrade

Upgrade core packages

  1. Kernel
    root@OpenWrt:~# opkg install curl
    root@OpenWrt:~# mount -o remount,rw /boot
    root@OpenWrt:~# cd /boot
    root@OpenWrt:/boot# mv vmlinuz vmlinuz-4.14.63
    root@OpenWrt:/boot# curl -R -o vmlinuz https://downloads.openwrt.org/releases/18.06.2/targets/x86/64/openwrt-18.06.2-x86-64-vmlinuz
    root@OpenWrt:/boot# cd
    root@OpenWrt:~# curl -R -O https://downloads.openwrt.org/releases/18.06.2/targets/x86/64/packages/kernel_4.14.95-1-83ad3e3d0a55dcd3f120c5ac4bdc92ba_x86_64.ipk
    root@OpenWrt:~# opkg install kernel_4.14.95-1-83ad3e3d0a55dcd3f120c5ac4bdc92ba_x86_64.ipk
    
  2. Edit /etc/opkg/distfeeds.conf
    root@OpenWrt:~# sed -i.1 's/18.06.1/18.06.2/g' /etc/opkg/distfeeds.conf
    root@OpenWrt:~# opkg update
    
  3. Upgrade the base-files package

    Remove the execution permissions of /lib/functions.sh so that the init scripts included in base-files won’t be invoked by its prerm script before upgrading.

    root@OpenWrt:~# chmod -x /lib/functions.sh
    root@OpenWrt:~# opkg upgrade base-files
    
  4. Reconfigure your DNS setting in /etc/resolv.conf

  5. Upgrade all other core packages

    root@OpenWrt:~# opkg list-upgradable | cut -d ' ' -f 1 | xargs opkg upgrade
    

You’re now ready to reboot into your upgraded OpenWrt 18.06.2 system.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.