Skip to content

feat: added confirmation prompt to mkosi burn before burning image to device#4275

Open
estebanpuyanas wants to merge 3 commits intosystemd:mainfrom
estebanpuyanas:burn-confirmation-prompt
Open

feat: added confirmation prompt to mkosi burn before burning image to device#4275
estebanpuyanas wants to merge 3 commits intosystemd:mainfrom
estebanpuyanas:burn-confirmation-prompt

Conversation

@estebanpuyanas
Copy link
Copy Markdown

@estebanpuyanas estebanpuyanas commented Apr 12, 2026

Explanation:

The confirmation prompt runs lsblk to retrieve device information and then requests the user types y or yes to proceed and n or no to abort. If the user chooses to proceed, it will continue the burning process as usual, otherwise it prints a message saying the burning process was aborted.

Closes #3821

… device

the confirmation prompt runs lsblk to retreive device information and then requests the user types y or yes to proceed and n or no to abort. If the user chooses to proceed, it will continue the burning process as usual, otherwise it prints a message saying the burning process was aborted
Copy link
Copy Markdown
Contributor

@behrmann behrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality should have gone into repart, as mentioned in the issue, though I'm not sure whether that is still the case with the installer work that's ongoing. I think that would still make more sense.

That being said, a few comments

Comment thread mkosi/burn.py Outdated
Comment thread mkosi/burn.py Outdated
@behrmann
Copy link
Copy Markdown
Contributor

I'm somewhat of two minds about this. This operation already requires elevated privileges, and none of the other commands usually used to get images onto devices (cp, dd, cat) will ask by default . Also, having this be always interactive makes it more involved to run this non-interactively, though I see that happening more rarely with this command.

I'm ±0 on this, but I see that there are people who legitimately want to be on the safe side here. If it's not to go into repart, maybe an --interactive switch would make sense here.

estebanpuyanas and others added 2 commits April 12, 2026 14:36
…R review

1. Changed reply to use input

2. Registered --interactive in config.py and wrapped the confirmation prompt process to only run when --interactive=true

3. Added relevant tests in test_config.py and updated test_json.py to include interactive arg

Co-authored by Claude Code Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add confirmation prompt for mkosi burn

2 participants