New x86 box, ext4-combined vs squashfs?

Hello everyone,

I have recently got a fujitsu futro s920 with a AMD GX-222GC and 4gb of ram, added an Intel PRO/1000 dual nic card and got my new 1gbit router.

When installing i came across the realisation that there are 2 options, squash-fs and ext4, and each had advantages and downsides.
I chose squshfs because i wanted to be able to sysupgrade without stress, to restore defaults and basically do everything all my cheap flashed openwrt routers were able to do .
Now my question is, is there a simpler way of getting a x86 openwrt router with sysupgrade, ability to restore defaults and maybe not have to resize partitions without squashfs?

I am more than certain that my understanding is not complete, i don't understand why you would use the ext4(combined) method if you wouldn't be able to upgrade.
The reason behind the question is that i would like to be sure that i made the correct decision and maybe optimise stuff here and there.
Thank you for any help or explanation :slight_smile:

consider Sysupgrade help for x86_64 - #14 by frollic
then use the online image builder to create a rootfs image containing the packages you need (the guide assumes you're using the standard one, but you can wget a customized image too).
copy the config from the live partition, to the partition of the new version (just mount the new one in the current one)
reboot into the new openwrt, once done.

if you have a fairly static setup, use root=/dev/sdX instead of root=PARTUUID=, in grub.

put it all in a script, and save it in /boot, since it never gets overwritten.
wget the image, zcat it onto the partition, and trigger the script.

you could just as easily run two squashfs partitions, instead of ext4, and they should
be easier to extend, if they're not resized on a live system.

just don't use the combined images, they will always reset your partition layout.

Hi I know you mien well, but to a noobie you could be talking about picking up Dog poop or scrubbing your back in the shower. There is no reel explanation here.
Like where you say "boot in to the new one" What does that mien. new what? Just what are we doing? Thanks for taking the time to answer and I am not trying to be a asshole.

with the poo ?
kinky ..... :wink:

it all relates back to the 1st link.

old = current version
new = the one you want to run instead

Good god the discussion escalated quickly, we are talking dog poop and stuff, kinkyWRT.
I am by no means a noob, i have a proxmox cluster at home and a lot of other network dependent devices that needed a sturdy router, i am familiar with openwrt , more than I am with pfsense or opnsense or vyos....the list goes on.
The reason for the question is because i liek to automate updates using ansible, preferably with the gitops way of doing things, and i wanted to know if this could be done with openwrt as well.
I kinda got a plan, and i also found some ansible modules for openwrt.
@frollic Thank you for the reply and explanations
@tapper thank you for making me spit my coffee :)))))

1 Like

https://openwrt.org/docs/guide-user/advanced/sysupgrade_extras might help too.

If, like me, you run a custom build, the ext4 is much easier. I have one boot partition and two partitions for root filesystems.

To upgrade, I nuke the unused 2nd root partition and untar just the ext4 root filesystem. Then copy the new kernel to the boot partition and edit the grub config to add a new entry. This way I can upgrade without trashing my running system and can drop back to it if needed.

The upgrade takes just a short few minutes as my build system pulls the config off my live router and bakes it into the image I untar

1 Like

if you keep the name of the kernel unchanged, the only thing you have to modify in grub, is the default boot entry.

Not if I want to keep the old kernel so I can boot the prior version of OpenWRT I had installed

EDIT: I should have specified that my build has extensive kernel mods in it (a port of Intel's Quick Assist drivers) that I sometimes fiddle with, so it's desirable I keep at least one known-to-be-working-properly kernel

i assume you have one kernel per root fs/partition ?
if you keep those kernel names static, there's no need to change grub.

or I just fail to understand how you work with the two you've got.

I have a single boot partition. The grub always has two entries, one for each of the custom builds I have installed. I have an install script that adds the grub entry and removes the old one in the grub config

obviously ...

then why change them ?

if you always use (for example) kernel.part1 and kernel.part2 as file names for the kernel,
and root=/dev/sda2 and root=/dev/sda3 in grub, you don't have to change grub at all,
exepct for the default boot entry setting.

Ahhh....there's actually a good reason for that. I identify my kernels by the git release otherwise I have to boot it and look in /etc/openwrt_release to work out what version I'm booting. This way, I know which version it is even before I boot it. My grub.cfg should make it clear

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 --rtscts=off
terminal_input console serial; terminal_output console serial

set default="0"
set timeout="10"
set root='(hd0,msdos1)'

menuentry "OpenWrt master (/dev/sda2) r16346+14-87046e87e2" {
        linux /boot/openwrt-master-snapshot-x86-64-vmlinuz-r16346+14-87046e87e2 root=/dev/sda2 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd intel_idle.max_cstate=4
}
menuentry "OpenWrt master (/dev/sda3) r15724+10-1f559cafe5" {
        linux /boot/openwrt-master-snapshot-x86-64-vmlinuz-r15724+10-1f559cafe5 root=/dev/sda3 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd intel_idle.max_cstate=4
}

not how I would have solved it, but that's at least a logical explenation, thnx :wink:

I'm open to suggestion if you have an easier way to do it that accomplishes the same thing (although with a script it's trivial to do anyway)

i'd just make a softlink with the git kernel file name to the static kernel name, and keep the grub static :stuck_out_tongue:
but now I'm only splitting hairs.

Yeah, that would work but then it wouldn't show the git release number in the grub menu, so I'd still have to boot it to know what version I'm running, either looking at the kernel name or checking /etc/openwrt_release

Yeah, I just assumed you didn't check, I know I never do, but I only use stable releases.

Yeah, mine's anything BUT the stable version. I work with master and ten years ago, it used to have 94 commits on top of the base repo, although over time a lot of those commits have become unnecessary as the issues were fixed and now I have 14 custom commits.

Perhaps more importantly, my kernel has a port of Intel's Quick Assist technology in it - this includes an extensive amount of kernel code, including 5 kernel modules and a whole bunch of userspace stuff. It's easy to break things when tinkering with kernel code, so knowing what version I'm booting is quite important to me when testing new builds.