fredx181 wrote: ↑Wed Mar 09, 2022 8:57 am
So probably, second entry in loopback.cfg should be:
Code: Select all
menuentry "KLV-Airedale-beta4 (RAM2)" {
linux /vmlinuz findiso=${iso_path} w_bootfrom=${iso_path} w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM2 net.ifnames=0
initrd /initrd.gz
}
Only thing is that save2flash doesn't work then, scripts expect w_changes=RAM2, so I think it should check for w_changes1=RAM2 too. Or perhaps checking for /mnt/layers/uc_ro is the best ?
I haven't looked at any of this since last time months ago so you are hurting my brain.
I come to hate SGD2 - it is a pain for nothing and complicated WDL initrd/init code and thus risked its stability. Amazingly WDL initrd/init (with w_init) still seems to work more generally. As for the SGD2 bits - thankfully they just get bypassed when not specified as iso... I think the code basically works though.
I don't use findiso at all in WDL, so above, for loopback.cfg, should simply be:
Code: Select all
menuentry "KLV-Airedale-beta4 (RAM2)" {
linux /vmlinuz w_bootfrom=${iso_path} w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM2 net.ifnames=0
initrd /initrd.gz
}
w_changes is basically used to specify main upper_changes folder, but I allow that to be anywhere, so with:
w_changes=LABEL=SG2DISOS=/BOOTISOS
that is specify media upper_changes will be in that /BOOTISOS location, but then if you want to also use a RAM mode well couldn't use w_changes to specify that (since already used) hence for that 'alternative' location (than bootmnt) for upper_changes I needed other variable so called it w_changes1 for that special case. Hence w_changes1=RAM2 is correct above. So for SG2D you would indeed need to modify your rsync script accordingly. One way would be to detect w_changes1 usage; whether you could rely on /mnt/layers/uc_ro I'm not so sure (if it was left behind on shutdown but not using RAM2 mode next time, you would have a problem...).
Regarding that other grub stanza you mention:
Code: Select all
menuentry "KLV-Airedale-beta4- LABEL bootfrom - changes RAM2 mode" {
linux /vmlinuz w_bootfrom=LABEL=SG2DISOS=/BOOTISOS/KLV-Airedale-beta4.iso net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM2
initrd /initrd.gz
}
That really hurts my brain, but I think that will not work with SG2D. Rather the w_bootfrom=LABEL..., from very hazy memory, seems like might be to do with booting iso direct from grub2 menu (not involving SG2D per se) but I'm kind of guessing because I can't remember how to even do that any more. You gave an example last time, but I'd have to search for it to work out what works for that and what doesn't. I do note I made a comment in the WDL initrd/init script that suggests LABEL could be used for direct grub2 boot:
# but direct grub2 boot from isofile can optionally
# use WDL UUID or LABEL method to ascertain bootmnt
# instead of needing _find_bootmnt search
but really I'm currently brain dead and SG2D just pains me (Ventoy even more so since it is very different again). WDL initrd, as I've said was designed for 'old-style, normal' put the bits in a directory on their own type of frugal install and frankly that's best for me (and my hurt brain). I certainly don't want to complicate the initrd/init further just for the sake of SG2D - but I think it works with that top grub stanza anyway (but yes, your rsync script will need adjusted to deal with that - see... more work and just because of SG2D that some wrongly imagine would just work with some simple savespec file attached - em, no - life is not so easy - depends how your initrd/init works and WDL one is very flexible but simplistic in that it does not do a lot of auto searching and expects user to specify where everything is (which didn't work with SG2D as you know).
Main issue when booting from iso is that the boot occurs then from a loop mount (mounted to /mnt/iso) and that iso could be on any partition and in WDL you can put your external upper_changes anywhere you like! so w_changes is needed to say where it is (and w_changes1 is then needed to say what RAM mode you are wishing to use if any...). So WDL initrd flexibility makes it hard to handle SG2D's stupidity... but it can at least be done. So can Ventoy but different again. I prefer just to forget both of them though!!!
Last time all this was discussed was on this following thread -> this was quick post re: Ventoy without any detail: viewtopic.php?p=40482#p40482
Also re w_changes1: viewtopic.php?p=40257#p40257
and viewtopic.php?p=40258#p40258
In that I mention loopback.cfg (which is on skel initrd download post - see WDL Cheatsheet link in my signature and find it from that). But here is what I put in suggested items for loopback.cfg back then (I knew better what I was doing re SG2D at the time of course - but forget most all of it now...):
Code: Select all
menuentry "WDL-Void-xfce4-rc3 - changes RAM0 mode" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes=RAM0 net.ifnames=0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - changes RAM0 mode w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes=RAM0 net.ifnames=0 w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - changes on media/BOOTISOS" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes=LABEL=SG2DISOS=/BOOTISOS net.ifnames=0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes on media/BOOTISOS" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes on media/BOOTISOS w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - changes via named partition (location unreliable)" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes=/mnt/sdb2/WDL net.ifnames=0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - changes via named partition (location unreliable) w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes=/mnt/sda2/WDL net.ifnames=0 w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM0 mode" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=RAM0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM0 mode w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=RAM0 w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM2 mode" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM2
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM2 mode w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM2 w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM1 mode" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM1
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - LABEL bootfrom - changes RAM1 mode w_copy2ram" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=LABEL=SG2DISOS=${iso_path} net.ifnames=0 w_changes=LABEL=SG2DISOS=/BOOTISOS w_changes1=RAM1 w_copy2ram
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - changes on media/BOOTISOS" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=${iso_path} w_changes==UUID=C836EF5836EF45D2=/BOOTISOS net.ifnames=0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - UUID bootfrom - changes on media/BOOTISOS" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=UUID=5c332b83-1bc5-409b-bf2c-ea1d5f3c28a2=${iso_path} w_changes=UUID=5c332b83-1bc5-409b-bf2c-ea1d5f3c28a2=/BOOTISOS net.ifnames=0
initrd /initrd_v501rc1.gz
}
menuentry "WDL-Void-xfce4-rc3 - UUID bootfrom - RAM2 changes with ro media/BOOTISOS changes" {
linux /vmlinuz-5.4.70-rt40 w_bootfrom=UUID=5c332b83-1bc5-409b-bf2c-ea1d5f3c28a2=${iso_path} net.ifnames=0 w_changes=UUID=5c332b83-1bc5-409b-bf2c-ea1d5f3c28a2=/BOOTISOS w_changes1=RAM2
initrd /initrd_v501rc1.gz
}
NOTE WELL the: w_bootfrom=LABEL=SG2DISOS=${iso_path}
that ${iso_path} is not filled in manually, SG2D provides it on boot per usual, but I think you can just use w_bootfrom=${iso_path} instead anyway since that forces the _find_bootmnt() search for iso function to be used, whereas the alternative LABEL method indicates bootmnt partition and so on directly via that LABEL... Note there is also a UUID method of doing it (also employs ${iso_path} variable kernel line argument). But truth to tell I no longer remember how that LABEL/UUID alternative works (maybe just a trick that ends up using _find_bootmnt() anyway) - I probably tested it at the time though so have no reason not to believe it doesn't work. EDIT: Mind you, I see what you mean. You put the iso_path in manually, and I would have thought that would have worked right enough (since ${iso_path} should be the same thing...), so I don't know why not if it doesn't.
All nightmare stuff just for SG2D though. I honestly can't be bothered with it aside from what is already done (which I think is enough for it to work okay anyway - assuming you can get your rsync script to work with the arrangement, which I'm sure you can ). Don't talk about Ventoy, I'm too tired.