Hello.
I have succesfully converted Buster-based ARMbian-Images to DietPi using the very nice "Other device"-instruction:
An Orange Pi Zero and an Banana Pi M2+ are running nearly fine now.
But I have discovered two problems:
- Before starting the converted DiePi I made an Image-file with Win32DiskImager. As I only have 32GB SD-cards the
.IMG-file went 32GB big, but after zipping it the file size was below 2GB. Is there a way/tool to create an .IMG-file
which only uses the space really used on the SD-card (pure .IMG-file, no extra zipping)?
- When i wrote this .IMG-file to another SD-card with a capacity of also 32GB using W32DiskImager and balena Etcher
both programs stated that I would need a little more space on the target SD-card. How is that possible?
So: How do I create an .IMG-file with minimum-size and compatible to other SD-card capacities?
Cheers,
Lelo
Issues creating an image-file from a SD-card Topic is solved
Re: Issues creating an image-file from a SD-card
For the image creation DietPi use following script.
Code: Select all
bash -c "$(curl -sSL https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-imager)"
- install Debian base image
- run the PREP script
- shutdown that device
- take out SD Card
- mount SD Card on a different DietPi device or DietPi VM
- run dietpi-imager script
- Select Drive as source
- select dd as cloning tool, DO NOT select Clonezilla installer, since this only works for x86_64 target systems
- select external usb drive
- select rootFS
- specify file name
- be patient, creation of the image will take some time
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Issues creating an image-file from a SD-card
Thanks for your response, but I don´t succeed with this:
I have a Windows-laptop with an "Linux Mint XFCE" installed in VirtaulBox. It looks like a USB3-Port is not supported in VB,
but connecting the carderader to a USB2 port shows me the SD-card mounted in Thunar-filemanager.
I opened a terminal, entered the command you stated (with & without sudo) and got this reponse ("-->" = translation):
Where did I go wrong?
I have a Windows-laptop with an "Linux Mint XFCE" installed in VirtaulBox. It looks like a USB3-Port is not supported in VB,
but connecting the carderader to a USB2 port shows me the SD-card mounted in Thunar-filemanager.
I opened a terminal, entered the command you stated (with & without sudo) and got this reponse ("-->" = translation):
Code: Select all
sudo bash -c "$(curl -sSL https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-imager)"
[sudo] Passwort:
bash: Zeile 19: /boot/dietpi/func/dietpi-globals: Datei oder Verzeichnis nicht gefunden ---> File or directory not found
bash: Zeile 21: G_CHECK_ROOT_USER: Befehl nicht gefunden ---> command not found
bash: Zeile 22: G_CHECK_ROOTFS_RW: Befehl nicht gefunden ---> command not found
bash: Zeile 24: G_INIT: Befehl nicht gefunden ---> command not found
environment: Zeile 59: G_WHIP_MENU: Befehl nicht gefunden ---> command not found
Re: Issues creating an image-file from a SD-card
You would need to have a virtual machine running DietPi
Should not be a problem on Virtual Box

Should not be a problem on Virtual Box

Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Issues creating an image-file from a SD-card
Ah, OK, I thought "some DD-scripting" would do well with any linux.
Worked with VBox and the Dietpi-PC-Image fine then. Thanx for your support.
Worked with VBox and the Dietpi-PC-Image fine then. Thanx for your support.

Re: Issues creating an image-file from a SD-card
yes, dietpi-imager is expecting a couple of DietPi functions (G_) as you can see on your error message
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Issues creating an image-file from a SD-card
That's a good idea, actually.
Last edited by robcarr on Thu Jul 30, 2020 6:23 pm, edited 1 time in total.
Re: Issues creating an image-file from a SD-card
there is a read to run image available for VirtualBox on DietPi download page 

Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team