# Upgrade version (x86)

**URL:** <https://forum.openwrt.org/t/upgrade-version-x86/124663>\
**Category:** Installing and Using OpenWrt\
**Created:** [April 7, 2022, 5:48am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663 "2022-04-07T05:48:10Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![atux\_null](https://forum.openwrt.org/letter_avatar/atux_null/32/6_449c533f586939b6e5f246632a46421f.png) [@atux\_null](https://forum.openwrt.org/u/atux_null)\
**Post date:** [April 7, 2022, 5:48am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/1 "2022-04-07T05:48:10Z")

</div>

i have installed Openwrt in a couple of PCs by using the ` [generic-ext4-combined.img.gz]`.  
How can i upgrade to newer versions, please? What about the config, will it be lost? Do i have to install all packages from scratch?

---

<div class="post-metadata">

**Author:** ![RaylynnKnight](https://forum.openwrt.org/user_avatar/forum.openwrt.org/raylynnknight/32/36902_2.png) [@RaylynnKnight](https://forum.openwrt.org/u/RaylynnKnight)\
**Post date:** [April 7, 2022, 6:09am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/2 "2022-04-07T06:09:46Z")

</div>

There is a wiki page for that [X86 Upgrading](https://openwrt.org/docs/guide-user/installation/openwrt_x86#upgrading).

---

<div class="post-metadata">

**Author:** ![atux\_null](https://forum.openwrt.org/letter_avatar/atux_null/32/6_449c533f586939b6e5f246632a46421f.png) [@atux\_null](https://forum.openwrt.org/u/atux_null)\
**Post date:** [April 7, 2022, 6:37am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/3 "2022-04-07T06:37:43Z")

</div>

i have seen this page but i am kinda lost. do i have to go to `LuCI web interface System → Backup / Flash Firmware → “Flash new firmware image` and upload the `generic-ext4-combined.img.gz` image? or do i have to do something else?

---

<div class="post-metadata">

**Author:** ![rwrjr](https://forum.openwrt.org/letter_avatar/rwrjr/32/6_449c533f586939b6e5f246632a46421f.png) [@rwrjr](https://forum.openwrt.org/u/rwrjr)\
**Post date:** [April 8, 2022, 6:02pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/4 "2022-04-08T18:02:29Z")

</div>

I'm in the same boat as you, ready to upgrade my x86/64 router from 21.02.0 to 21.02.2. The relevant portion of the page @RaylynnKnight linked is the following:

```nohighlight
If you had used a **ext4-combined.img.gz** type of image to install, there are 4 options for upgrading:

1. Write a new **ext4-combined.img.gz** image: this is the simplest option and is identical to first installation: all data, configs, packages and extra partitions will be wiped and you'll have a brand new OpenWrt system with default packages and configs. Then you can reinstall all packages and copy config files back and create extra partitions.
2. Use **sysupgrade** : this is default upgrading procedure, but the least recommended option for x86 machines. Proceed to [Sysupgrade](https://openwrt.org/docs/guide-user/installation/installation_methods/sysupgrade) for details.
3. Extracting boot partition image from **ext4-combined.img.gz** and writing it and **ext4-rootfs.img.gz** , leaving MBR partition table intact.
4. Extracting boot partition image from **ext4-combined.img.gz** and writing it, then uncompressing **rootfs.tar.gz** to existing rootfs partition.

```

The frustrating part is #2. It recommends against using sysupgrade but doesn't explain why. For myself, I'm going with #1, which is basically a re-install but I intend to use the Image Builder this time to hopefully skip the extra package loads and reconfiguration.

Take a look at: [Using the Image Builder](https://openwrt.org/docs/guide-user/additional-software/imagebuilder)

The linked page has very good instructions for starting from the image you want to upgrade to but adding all of the packages you are currently using as well as preserving your current config. I think it is kosher to include your current config files if your doing a minor "point" upgrade such as 21.02.0 to 21.02.2.

I was able to successfully build my image with extra packages and configs. I created a bootable USB drive with Ubuntu BUT also with persistent storage so I could copy my newly built image to the USB drive. This will let me boot into the live Ubuntu image and then dd the custom OpenWRT image to my router.

Now I just need to find a time that both my wife and son don't need the network for about an hour. The good thing about installing on a x86 computer is that you really can't screw it up (brick it). Worst case is just a full install and manual update and config like you did the first time.

Good luck.

---

<div class="post-metadata">

**Author:** ![colo](https://forum.openwrt.org/letter_avatar/colo/32/6_449c533f586939b6e5f246632a46421f.png) [@colo](https://forum.openwrt.org/u/colo)\
**Post date:** [April 8, 2022, 6:31pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/5 "2022-04-08T18:31:46Z")

</div>

I have had OpenWrt on an x86 box with squashfs for more than a year now, and upgrade that installation using `sysupgrade` all the time. Worked fine at least 10 times by now.

If you choose to do that, you might want to roll your own images, or use the awesome Attended Sysupgrade / [https://sysupgrade.openwrt.org/](https://sysupgrade.openwrt.org/) service to save effort on re-installing packages after flashing the new firmware image.

---

<div class="post-metadata">

**Author:** ![rwrjr](https://forum.openwrt.org/letter_avatar/rwrjr/32/6_449c533f586939b6e5f246632a46421f.png) [@rwrjr](https://forum.openwrt.org/u/rwrjr)\
**Post date:** [April 8, 2022, 6:40pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/6 "2022-04-08T18:40:48Z")

</div>

Is there a good explanation of when to use a particular image on x86 routers? Squashfs vs ext4 for example? The instructions I followed for my initial install directed the use of generic-ext4-combined, which is what I did.

The Sysupgrade Server looks pretty cool. Will have to use it the next time.

---

<div class="post-metadata">

**Author:** ![colo](https://forum.openwrt.org/letter_avatar/colo/32/6_449c533f586939b6e5f246632a46421f.png) [@colo](https://forum.openwrt.org/u/colo)\
**Post date:** [April 8, 2022, 6:48pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/7 "2022-04-08T18:48:11Z")

</div>

I took the easy route and asked experienced OpenWrt community members on IRC which fs option I should choose, and went with what advice I got 😉

Iirc, it was said that squashfs offered working factory reset. Beyond that, I do not know what drawbacks one would incur by going for one over the other. Once you get past the BIOS/EFI firmware and bootloader, I think it matters little in practice.

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [April 8, 2022, 6:49pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/8 "2022-04-08T18:49:34Z")

</div>

Squashfs is a compressed FS, it really isn't required on a x86, since there's usually plenty of disk space available.

Here's a post I made about installing another release, parallel to the currently running one, and then just (re)booting into it - [Sysupgrade help for x86\_64 - #14 by frollic](https://forum.openwrt.org/t/sysupgrade-help-for-x86-64/112043/14)

---

<div class="post-metadata">

**Author:** ![slh](https://forum.openwrt.org/user_avatar/forum.openwrt.org/slh/32/113591_2.png) [@slh](https://forum.openwrt.org/u/slh)\
**Post date:** [April 9, 2022, 1:02am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/9 "2022-04-09T01:02:02Z")

</div>

As colo implied, the advantage of squashfs based images is the ability to factory reset the device. If you're asking for advice, that would go in favour of squashfs, but as x86\_64 has other recovering means available (be it attaching monitor & keyboard, replacing the boot disk/ reflashing it externally or taking access from a removable boot medium), it's not a major concern on this platform (but can still come in handy, easier to attach a USB keyboard and typing in `firstboot` blindly, than wheeling in a monitor to a headless system as well).

---

<div class="post-metadata">

**Author:** ![atux\_null](https://forum.openwrt.org/letter_avatar/atux_null/32/6_449c533f586939b6e5f246632a46421f.png) [@atux\_null](https://forum.openwrt.org/u/atux_null)\
**Post date:** [April 9, 2022, 6:16pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/10 "2022-04-09T18:16:42Z")

</div>

my current df -h is

```nohighlight
root@OpenWrt_alix: ~ $ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 252.0M 17.6M 229.3M 7% /
tmpfs 123.7M 1000.0K 122.7M 1% /tmp
/dev/sda1 15.7M 2.4M 13.0M 16% /boot
/dev/sda1 15.7M 2.4M 13.0M 16% /boot
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt_alix: ~ $

```

so if you know an easy way to simply upgrade my system, without loosing the config, packages, etc, please let me know.

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [April 10, 2022, 2:02am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/11 "2022-04-10T02:02:15Z")

</div>

Config can be exported, packages will ways be lost, but can be reinstalled.

---

<div class="post-metadata">

**Author:** ![rwrjr](https://forum.openwrt.org/letter_avatar/rwrjr/32/6_449c533f586939b6e5f246632a46421f.png) [@rwrjr](https://forum.openwrt.org/u/rwrjr)\
**Post date:** [April 10, 2022, 6:55pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/12 "2022-04-10T18:55:48Z")

</div>

As I see it you have two options for a "simpler" upgrade:

1. Use Image Builder to build a custom image that contains all your packages and configs as I mentioned above. It really is quite easy.
2. Try the Attended Sysupgrade app as mentioned by @colo above. Export your config beforehand and import it after the upgrade.

It's probably always a good idea to export your config before any upgrade, just to have it for reference if nothing else.

---

<div class="post-metadata">

**Author:** ![atux\_null](https://forum.openwrt.org/letter_avatar/atux_null/32/6_449c533f586939b6e5f246632a46421f.png) [@atux\_null](https://forum.openwrt.org/u/atux_null)\
**Post date:** [April 19, 2022, 12:06pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/13 "2022-04-19T12:06:30Z")

</div>

thanks a lot for your replies. after taking a backup i did try to simply upgrade the newer image to my system [new version](https://downloads.openwrt.org/releases/21.02.2/targets/x86/geode/openwrt-21.02.2-x86-geode-generic-ext4-combined.img.gz) as it is, without extracting. it worked fine without any issues.  
I do not know if his is a correct way of doing things but it worked for 3 of my systems upgrading from 19.07.07 to 21.02.2. Off course i had to reinstall some packages, but the config has not been lost.

---

<div class="post-metadata">

**Author:** ![grrr2](https://forum.openwrt.org/user_avatar/forum.openwrt.org/grrr2/32/50931_2.png) [@grrr2](https://forum.openwrt.org/u/grrr2)\
**Post date:** [April 19, 2022, 12:45pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/14 "2022-04-19T12:45:25Z")

</div>

hi,

default upgrade mechanism is sysupgrade which works for x86 arch too - good point. due to nature of openwrt build & sysupgrade it means that:

- owrt using binary releases (see \*ext4-combined. **img**.gz for example)
- deploying binary image means it is **overwriting** the partitions tables and the partition content as well! - that's not so good.
- as (sys)upgrade overwrites stuff also means packages installed after fresh install are lost during upgrade process, although the configuration files and if you ask for even the package list will be copied to upgraded image.

as explained by the upgrade wiki there are couple of options, all has limitations. e.g. extracting rootfs.tar.gz can overwrite the root partitions but it may not the best if kernel is changed.

so i think the best option is to create a dual boot partition schema, so create a boot partition, root1 and root2, copy the corresponding kernel to /boot and set grub.cfg as needed.

---

<div class="post-metadata">

**Author:** ![woeisme](https://forum.openwrt.org/user_avatar/forum.openwrt.org/woeisme/32/4840_2.png) [@woeisme](https://forum.openwrt.org/u/woeisme)\
**Post date:** [February 7, 2023, 11:35am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/15 "2023-02-07T11:35:04Z")

</div>

I noticed my system is very much similar to yours. Any idea why the duplicate entries for /boot?

---

<div class="post-metadata">

**Author:** ![d687r02j8g](https://forum.openwrt.org/user_avatar/forum.openwrt.org/d687r02j8g/32/19388_2.png) [@d687r02j8g](https://forum.openwrt.org/u/d687r02j8g)\
**Post date:** [February 7, 2023, 11:40am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/16 "2023-02-07T11:40:02Z")

</div>

Please see the following

> [@/boot is mounted twice](https://forum.openwrt.org/t/boot-is-mounted-twice/149838/6):
>
> Well, there is nothing too-complex to understand here. This mount looks like a duplicate, but it really isn't. What OpenWrt intends to do is to mount a subdirectory of the filesystem stored on /dev/mmcblk0p1 to /boot. This is impossible to make in one go. So, first, they mount the whole filesystem from /dev/mmcblk0p1 to /boot. Then they have access to the subdirectory, but it is at /boot/boot, which is not what they want. Thus they use a second mount (a so-called "bind mount", a special mode wh…

---

<div class="post-metadata">

**Author:** ![woeisme](https://forum.openwrt.org/user_avatar/forum.openwrt.org/woeisme/32/4840_2.png) [@woeisme](https://forum.openwrt.org/u/woeisme)\
**Post date:** [February 7, 2023, 9:15pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/17 "2023-02-07T21:15:20Z")

</div>

I'm curious about this auc tool and how it differs from the image builder. Is it building images?

---

<div class="post-metadata">

**Author:** ![mk24](https://forum.openwrt.org/letter_avatar/mk24/32/6_449c533f586939b6e5f246632a46421f.png) [@mk24](https://forum.openwrt.org/u/mk24)\
**Post date:** [February 7, 2023, 9:31pm UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/18 "2023-02-07T21:31:55Z")

</div>

Yes. auc commands a remote server to run Image Builder. The completed image is then downloaded and installed.

---

<div class="post-metadata">

**Author:** ![psherman](https://forum.openwrt.org/letter_avatar/psherman/32/6_449c533f586939b6e5f246632a46421f.png) [@psherman](https://forum.openwrt.org/u/psherman)\
**Post date:** [February 9, 2023, 12:35am UTC](https://forum.openwrt.org/t/upgrade-version-x86/124663/19 "2023-02-09T00:35:30Z")

</div>

Split this topic on February 9, 2023, 12:35am UTC

A post was split to a new topic: [Using AUC on Unifi U6-Lite](https://forum.openwrt.org/t/using-auc-on-unifi-u6-lite/151077)
