Sysupgrade help for x86_64

But doesn't this then bork the mount of /boot with both menuentrys? I guess maybe it would still work as long as you leave the PARTUUID the default value? For both root volumes?

Once I'm comfortable running the scripts I'm working on I guess it doesn't much matter if it auto-mounts boot for me using the normal boot process. The current hard-coded detection of a fixed PARTUUID to then mount boot seems... a unique way to do it. Not that I'm offering a better solution at this time than an out-of-band script. :slight_smile:

this is my current grub.cfg which seems to work (for me), so i guess it does not bork anything as i am using this system to reply:

$ cat /boot/grub/grub.cfg
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 --rtscts=off
terminal_input console serial; terminal_output console serial

set default="2"
set timeout="5"
set root='(hd0,gpt1)'

menuentry "OpenWrt-21.02.3-sda2" {
        linux /boot/vmlinuz root=/dev/sda2 rootwait   console=tty0 console=ttyS0                                             ,115200n8 noinitrd
}
menuentry "OpenWrt-21.02.5-sda3" {
        linux /boot/openwrt-21.02.5-x86-64-generic-kernel.bin root=/dev/sda3 roo                                             twait   console=tty0 console=ttyS0,115200n8 noinitrd
}
menuentry "OpenWrt-22.03.2-sda4" {
        linux /boot/openwrt-22.03.2-x86-64-generic-kernel.bin root=/dev/sda4 roo                                             twait   console=tty0 console=ttyS0,115200n8 noinitrd
}
menuentry "OpenWrt (failsafe) on sda2" {
        linux /boot/vmlinuz failsafe=true root=/dev/sda2 rootwait   console=tty0                                              console=ttyS0,115200n8 noinitrd
1 Like

I use partition names too, so much easier, if you need to do frequent changes to the OS or grub.

You both certainly can't be wrong. :slight_smile: Well sweet baby jesus, one less thing to worry about. I just adjusted my currently booting grub menuentry to be root=/dev/sda3 and yep, boots just fine like I expected, but also automatically mounts /dev/sda1 to boot with the proper mount --bind remount. Excellent!

I think @grrr2 is just trying to make us envious with three root partitions... Showoff.

1 Like

I guess the Attended Sysupgrade method doesn't preserve partitions layout and do the same as dd a combined image to the disk with MBR and altogether wiping everything? Is there a way to ask Attended Sysupgrade to build an image upgrade, download but not install? I can't see that option in man/help pages. I could then extract the rootfs partition image myself, dd it to a partition, extract the new kernel file to /boot and change menuentry.

You can use https://firmware-selector.openwrt.org/
Kr
K

What's the point of this post?

Method of building an image via the Attended Sysupgrade package and firmware selector isn't the same.

the end result should be though ... ?

Tell me if you know, instead of playing around. Unless you don't know either?

ask nicely, unless you don't know how to ?

add the packages you've got installed to the firmware-selector, get an image with them (pre)installed ?

It's still not how both works and still not relevant to my primary question.

Does the firmware selector pick all my currently installed packages? I doubt that, unless you pick them from opkg list-installed yourself and put them all in the box there. Do the firmware selector has online CLI? Nope it doesn't. Don't forget then, you need a secondary PC with a GUI for that. Does it also know about my current config and restores it? No it doesn't. On top of that, try to build an image with all your currently installed packages occupying along with the root more than the 104MB, lucky you getting an image this way. You've been here for centuries but coming with a such nonsense answer. Take a brake or better stay on topic.

indeed, it doesn't answer your question, but provides a possible workaround ...

that's why you were told to paste them there ...

that would be the link provided by @Underworld.

indeed

AFAIK you'll need squashfs.

you already found you AUC doesn't ?

think the only way of achieving all you want, is to use https://openwrt.org/docs/guide-user/additional-software/imagebuilder, again, not on openwrt.

another workaround, on a very high level, could be to move the
/etc/config folder to /boot.

since you don't want to dd the combined image, but manually copy/replace the kernel and dd the rootfs, the partition containing the kernel binary and grub remains untouched.

only problem I see, is a race condition between the mounting of /boot and the services.
in a worst case scenario, the services have to be started manually, during boot.

you also have to make sure you softlink the /etc/config to /boot dir during an upgrade, or the old config will not be there after you've booted.

I only tried to help. If you belive my answer was not respectful enough - dissregard it. However if you are typing in the forum you have access to browser and it is an option.

I understand and appreciate it.
The firmware selector is a good tool and to my knowledge AUC using it as a backend to generate images but it works slightly different to AUC as it's not picking all currently installed images and preserve config automatically, if chosen. You have to do a list of your installed packages and put them there.

The firmware selector and auc are completely independent. They both use the ASU build server to create their respective images (as does LuCI Attended Sysupgrade). Details on the build server backend here: https://sysupgrade.openwrt.org/ui/

hello, according to the script you post , i guess if i want to upgrade the linux kernel, the only things i should do is copy the 'openwrt-x86-64-generic-kernel.bin' file in my compile root directory "bin/targets/x86/64" to the x86 openwrt system's boot directoy, that is to override the vmlinuz file?

yes, unless you have multiple installs/versions, on separate partitions, except for /boot on sda1, which is shared by all installs.

/boot with all kernels on sda1
/ of openwrt ver X on sda2
/ of openwrt ver Y on sda3