hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

Clarify usage without image #141

Closed Khartir closed 4 years ago

Khartir commented 5 years ago

Both the readme and the usage state:

If no image is specified, the script will try to configure an existing image. This is useful to try several configuration without the need to rewrite the image every time.

However it is not at all clear how this works. Running ./flash -u user-data only prints the usage. I assume that this only works with specific options? If so, it would be nice if these are mentioned.

StefanScherer commented 5 years ago

Oh I think user-data file is interpreted only once on first boot. With occi and device-init it was possible to reconfigure hostname etc.

hannonq commented 5 years ago

@StefanScherer does that mean that it's no longer possible to make changes without rewriting the images?

Or can I just copy the files manually to /boot/device-init.yaml?

StefanScherer commented 5 years ago

@hannonq We no longer install device-init, so copying the yaml to /boot doesn’t help.

manicmonkey commented 4 years ago

Due to the way cloud-init works I think there are some 'instance' related files that would need to be removed from the card to retrigger some of the per-instance modules (such as write_files).

Looks like the 'just update the config' functionality was removed quite some time ago: https://github.com/hypriot/flash/commit/19552a2e7a6e9e277aeb2e88edd24d3ec96a6ead