did search around a bit (no info on rpi4 wiki page or i missed?) but i'm really not sure:
i flashed official 21.02 image (rpi-4-squashfs-factory.img) to an usb stick (4gb) but it does not boot (rpi has correct firmware with usb boot, working with rasp os), would editing cmdline.txt to
be the correct way to go? my guess was that since originally it looks on second partition of sd card pointing to second partition of usb would be correct? would this mess up future sysupgrades (with official rpi-4-squashfs-sysupgrade.img)?? or should i include this change somehow maybe with imagebuilder??
target/linux/bcm27xx/image/config.txt
# Place your custom settings here.
over_voltage=2
arm_freq=1750
generated image with my configuration files (mainly for wireless management)
make image PROFILE="rpi-4" PACKAGES="my packages list" FILES="files/"
and wrote (dd) the factory image to usb stick and it's booting/working correctly. i made some changes to the files directory and generated a new image, flashed the sysupgrade image out of curiosity with out retaining settings and it's working correctly but my guess is that it's not "resetting" the configuration (maybe luci or the sysupgade process is trying to erase from sdcard not usb?) so i performed a factory reset from luci and that worked, everything was correctly configured as per my files in image.
I'd personally go with root=PARTUUID=5452574f-02 for pure flexibility - then, it won't matter if you write that image to an SD card - it'll work - also, if you add a second USB drive, I'm not sure how reliable/consistent drive device naming is ... i.e. is the boot drive guaranteed to be /dev/sda?
Since OpenWRT "disk id" is hard coded to 5452574f (That's TRWO in ascii) it should be a safe bet
Oh! ok! i didn't catch your suggestion in your first post but this make a lot of sense i did change to root=PARTUUID=5452574f-02 and rasp boots fine, only "strange" thing left is sysupgrade -n from terminal or not retaining setting from luci still keeps settings and have to perform a factory reset after sysupgrade.. the config difference for testing in the new sysupgrade image are correctly in place after reset.. guess i can live with that.
i think i'm facing the opposite, i want to lose all settings.. flashing sysupgrade image does not delete all settings ( -n from terminal or not retaining setting from luci), have to perform a factory reset after flash.. who knows
all packages are included in image and fully working personal configuration is included in image with imagabuilder "files" option, so the image i'm flashing is fully working out of the box no need to save configuration/re-configure whatsoever.. i can also test as much as i want and just factory reset to my working config when i'm done.. i'm not starting from scratch but from a perfectly working image