I would like to see this taken one step further, such as maybe fs.flashROM().
It would make programs like
this easier to implement, as giving a bootloader direct access to the raw startup and autorun script and change it as need be (Maybe even bios.lua, but it's a last resort
) would make life much easier than relying that the user renamed /startup on their disk to /grubstartup.
The arguments would be a one-time password that the computer gives the user only once, which changes everytime you flash the ROM.
Or maybe, you can only flash it once (or a preset value) like in the OP.
If the user forgets this password, (if it's not one-time only) the user can flash back to default ROM (but other people might use this to exploit holes).
Either way, a method that gives
trusted software access to flash the ROM when they really need it would be great.