DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

Support for rpi-imager: Selection of DietPi

Open StephanStS opened this issue 11 months ago • 9 comments

Needed for rpi-imager integration:

  • DietPi logo
  • .json file (testwise extended, needs to be reduced later). File can be renamed to dietpi_list.json

To request DietPi to be integrated into rpi-imager OS list, these files need to be supplied.

Local usage (with extended .json file): rpi-imager --repo custom_os_list.json

StephanStS avatar Mar 08 '25 15:03 StephanStS

This is something to implement into rpi-imager itself, instead of in DietPi, isn't it? Or what would be the reason someone adds a custom OS via custom JSON and load it via console with rpi-imager, instead of just downloading and flashing the DietPi image directly?

Did you find the JSON in the source code? I could find the docs only 🤔: https://github.com/raspberrypi/rpi-imager/blob/qml/doc/json-schema/os-list-schema.json Is it entirely hosted on a server outside of the source code repository? You mentioned there is a web mask to request adding a new OS to the RPi imager. Can you post the link?

MichaIng avatar Mar 12 '25 13:03 MichaIng

This is something to implement into rpi-imager itself, instead of in DietPi, isn't it? Or what would be the reason someone adds a custom OS via custom JSON and load it via console with rpi-imager, instead of just downloading and flashing the DietPi image directly?

Did you find the JSON in the source code? I could find the docs only 🤔: https://github.com/raspberrypi/rpi-imager/blob/qml/doc/json-schema/os-list-schema.json Is it entirely hosted on a server outside of the source code repository? You mentioned there is a web mask to request adding a new OS to the RPi imager. Can you post the link?

It's there: https://forms.gle/cbsU27aLLVaxUXbw8 See also: https://github.com/raspberrypi/rpi-imager/issues/545

I think there are these options:

  • Add RPI images via form (given above) to rpi-imager
  • Generate an own .json which also supports other hardware variants we support and somehow spread it via DietPi
  • Do both

StephanStS avatar Mar 12 '25 21:03 StephanStS

I filled the form. @lurch if I may:

image

  • DietPi ships with a default password.
  • It can be changed during early boot stage (before network and login prompts) via dietpi.txt file on the FAT/boot partition.
  • With the same config file, an SSH pubkey can be provided, and SSH password login for root or all users can be disabled, which is as well applied during early boot stage, before network and SSH server are started.
  • On first login, users are further presented a dialogue to change the password.
  • Right now, No/ESC can be selected to skip changing the default password. But we could make it mandatory.

MichaIng avatar Apr 25 '25 14:04 MichaIng

@lurch if I may:

Again, these are all questions for @tdewey-rpi rather then myself. I believe the problem with leaving a default password enabled is that it leaves your OS vulnerable to botnet attacks.

lurch avatar Apr 25 '25 15:04 lurch

@lurch is again correct - I'm the effective curator of the OS list.

Right now, No/ESC can be selected to skip changing the default password. But we could make it mandatory.

I'm not entirely comfortable with that posture. In such a case, users of Raspberry Pi Imager could be inadvertently creating botnet nodes by selecting DietPi and making choices that wouldn't necessarily be obviously poor. If you are prepared to accommodate the change mandating the user set an authentication credential of their choice, I would be minded to accept the DietPi posture on this question.

tdewey-rpi avatar Apr 25 '25 15:04 tdewey-rpi

Okay, I'll make the password change mandatory on first login, with next DietPi release, planned for Mai 17th.

MichaIng avatar Apr 25 '25 15:04 MichaIng

DietPi v9.13 has been released, which makes the password change mandatory. This also applies retrospectively: during the DietPi update (which runs automatically when booting also older images the first time), admins are prompted to change the password, if the default is currently applied.

The JSON is hosted at: https://dietpi.com/downloads/images/rpi-imager.json And will be updated whenever we update our images, which will happen either later tonight or tomorrow.

Let me know if anything is missing.

MichaIng avatar May 26 '25 15:05 MichaIng

@MichaIng If you want to get your new JSON feed added to RPi Imager, I think it's more appropriate for you to request / discuss that in a new issue on https://github.com/raspberrypi/rpi-imager , rather than hoping that we'll remember to look at an issue in your own repo :wink:

lurch avatar May 27 '25 10:05 lurch

I added the info to the existing one: https://github.com/raspberrypi/rpi-imager/issues/1025

MichaIng avatar May 27 '25 12:05 MichaIng

Closing this as completed our end. Final JSON is hosted on our server. Further discussion either at #5364 or https://github.com/raspberrypi/rpi-imager/issues/1025.

MichaIng avatar Jun 13 '25 19:06 MichaIng