during initrdflash: new 'extra-pre-wipe' script #1648
Red-Dragon-99
started this conversation in
Ideas
Replies: 1 comment
-
Having a hook for customizing the process at an early stage sounds good to me.
Yep, I'd move it above, so it could be used to stash data that might be on the NVMe drive before anything else happens, for folks that need to use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'd like to propose a new "extra-pre-wipe" feature to run scripts during initrd-flashing, similar to the already existing "extra" scripts feature:
I want to keep some files persistent to make them survive even initrd flashing. For that I want to run a safe-script before wiping the SSD and then a restore-script just after flashing the data to the SSD has finished to bring these files persistent files back.
For the second script, I use the 'extra' scripts feature in the init-flash.sh. And to run the first script (the safe-script), I made a small modification to init-flash.sh:
With init-extra-pre-wipe similar to init-extra:
Adding the "extra-pre-wipe" is quite simple, invoke it before filling the disk with "export-devices":
I just realize, one could also put that one line change before the if [ $erase-nvme -eq 1 ] block, but that one is never triggered when starting a "normal" initrd-flash via sudo ./initrd-flash
Any comments are welcome.
Regards
Stefan
Beta Was this translation helpful? Give feedback.
All reactions