DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

Error using image script to create backup of SD-Card

Open DrCWO opened this issue 6 months ago • 10 comments

Creating a bug report/issue

  • [x] I have searched the existing open and closed issues

Required Information

I see an ERROR creating a backup image file from a SD-Card. Complete Log attached.

Any ideas?

login as: root
[email protected]'s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v8.24.1 : Update available
 ─────────────────────────────────────────────────────
 - Device model : RPi 4 Model B (aarch64)
 - CPU temp : 24 °C / 75 °F : Who put me in the freezer!
 - LAN IP : 192.168.0.196 (eth0)
 - MOTD : DietPi v9.12 has been released. Check out all changes:
          https://dietpi.com/docs/releases/v9_12/
 ─────────────────────────────────────────────────────

 DietPi Team     : https://github.com/MichaIng/DietPi#the-dietpi-project-team
 Patreon Legends : Chris Gelatt, ADSB.im
 Website         : https://dietpi.com/ | https://twitter.com/DietPi_
 Contribute      : https://dietpi.com/contribute.html
 Web Hosting by  : https://myvirtualserver.com

 dietpi-update   : Run now to update DietPi from v8.24.1 to v9.12.1

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

root@DietPi:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8, 0 May 10 08:58 /dev/sda
brw-rw---- 1 root disk 8, 1 May 10 08:58 /dev/sda1
brw-rw---- 1 root disk 8, 2 May 10 08:58 /dev/sda2
root@DietPi:~#
root@DietPi:~# export SKIP_ARCHIVE=1
root@DietPi:~# bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.build/images/dietpi-imager')"
[  OK  ] DietPi-Imager | cd /root
[ INFO ] DietPi-Imager | Checking for required APT packages: parted fdisk zerofree xz-utils
[ INFO ] DietPi-Imager | Unmounting all filesystems below selected /dev/sda ...
[ INFO ] DietPi-Imager | MBR partition table detected
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Inode 2100 extent tree (at level 1) could be shorter.  Optimize? yes

Inode 134690 extent tree (at level 1) could be shorter.  Optimize? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180442/962880 files (0.7% non-contiguous), 2391797/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | mount /dev/sda2 /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | rm -f /tmp/DietPi-Imager_mnt/root/.bash_history /tmp/DietPi-Imager_mnt/home/pi/.bash_history /tmp/DietPi-Imager_mnt/var/lib/dhcp/*.leases
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants
[  OK  ] DietPi-Imager | ln -s /etc/systemd/system/dietpi-fs_partition_resize.service /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | partprobe /dev/sda
[  OK  ] DietPi-Imager | partx -u /dev/sda
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180442/962880 files (0.7% non-contiguous), 2391795/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[ INFO ] DietPi-Imager | Overriding filesystems free space with zeros to purge removed data and allow better compression...
[  OK  ] DietPi-Imager | mount /dev/sda1 /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt, please wait...
[FAILED] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fsck -y /dev/sda1, please wait...
fsck from util-linux 2.36.1
fsck.fat 4.2 (2021-01-31)
/dev/sda1: 373 files, 65118/258077 clusters
[  OK  ] DietPi-Imager | fsck -y /dev/sda1
[  OK  ] DietPi-Imager | tune2fs -O ^has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | tune2fs -O has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[ INFO ] DietPi-Imager | zerofree -v /dev/sda2, please wait...
333540/1463949/3855744
[  OK  ] DietPi-Imager | zerofree -v /dev/sda2
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180442/962880 files (0.7% non-contiguous), 2391795/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | rmdir /tmp/DietPi-Imager_mnt
environment: line 514: ((: 262144 >  : syntax error: operand expected (error token is ">  ")
[FAILED] DietPi-Imager | Free space check: path=. | available=4734 MiB | required=15293 MiB
root@DietPi:~#

DrCWO avatar May 10 '25 08:05 DrCWO

Uuh, seems to be my fault, no Disk Space 🥇

DrCWO avatar May 10 '25 08:05 DrCWO

I deleted the old backup files (two times 4.5GB) and restarted. Same issue. It now reported 13GB free and 15293 MiB required.

Now I mounted the two partitions on the SD card to backup to see how much space is filled:

root@DietPi:~# mount /dev/sda1 /mnt
root@DietPi:~# df -h /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       127M   32M   95M  26% /mnt
root@DietPi:~# umount /mnt
root@DietPi:~# mount /dev/sda2 /mnt
root@DietPi:~# df -h /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        15G  8.9G  5.6G  62% /mnt
root@DietPi:~#

I now ask myself why the backup script asks for 15GB free space as only 9GB are used? So there SHOULD be enough space on the drive????

DrCWO avatar May 10 '25 08:05 DrCWO

Next I deleted aprox. 3GB of unnecessary files on the SD-Card to save. Also using dietpi-update hoping that helps.

Still same issue 👎

DrCWO avatar May 10 '25 09:05 DrCWO

The last partition detection somehow failed, so that it could not be downsized along with the filesystem, and also caused the syntax error at line 514.

Can you show the output of this:

lsblk -rnpo NAME /dev/sda | tail -1

A bit weird as later

lsblk -rnpo NAME,FSTYPE /dev/sda?*

successfully printed all partitions of the drive.

While the root partition is selected in the script, the last partition to shrink is auto-detected, since it is not assured that the root partition is the last one. And if not, shrinking the root partition has no point.

MichaIng avatar May 10 '25 17:05 MichaIng

This is what I get. I have no idea what this should tell me hope it may help you to fix the issue 👍

root@DietPi:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8, 0 May 10 10:35 /dev/sda
brw-rw---- 1 root disk 8, 1 May 10 10:35 /dev/sda1
brw-rw---- 1 root disk 8, 2 May 10 10:35 /dev/sda2
root@DietPi:~# lsblk -rnpo NAME /dev/sda | tail -1
/dev/sda1
root@DietPi:~# lsblk -rnpo NAME,FSTYPE /dev/sda?*
/dev/sda1 vfat
/dev/sda2 ext4
root@DietPi:~#

If you need further output for debugging please let me know.

DrCWO avatar May 10 '25 18:05 DrCWO

Maybe this additional information my help you debugging.

With exactly the same SD-Card the image creation already worked in the past with an earlier release of the script 👍 I only changed some file content on the SD-Card but nothing else.

DrCWO avatar May 10 '25 21:05 DrCWO

It detects the first partition as last 🤔. Can you show this again:

lsblk -rnpo NAME /dev/sda
lsblk -rnpo NAME /dev/sda | tail -1
lsblk -npo NAME /dev/sda | tail -1

I remember there was some other case where the -r option, maybe even just in combination with a pipe, lead to a changed output order.

MichaIng avatar May 20 '25 16:05 MichaIng

I'm on holiday till Wednesday and can't try at the moment. Will get back to you with a response after I returned 👍

DrCWO avatar May 22 '25 10:05 DrCWO

Is it by chance a Bullseye host system? I found again the report and debugging of -r messing up partition order, but just on Bullseye: https://github.com/MichaIng/DietPi/issues/2630#issuecomment-2323534747

In this case, without -r, the partition name is prefixed with └─. We could also pipe it through sort. Or we just use sfdisk:

sfdisk -qlo Device /dev/mmcblk0 | tail -1

EDIT: Just replicated on a Bullseye VM, is seems to do consequently 😄, or the other way round: the default tree output enforces the order:

root@VM-Bullseye:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0    8G  0 disk
└─sda1   8:1    0    8G  0 part /
sdb      8:16   0    1G  0 disk
├─sdb1   8:17   0  511M  0 part
└─sdb2   8:18   0  511M  0 part
root@VM-Bullseye:~# lsblk -r
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8G 0 disk
sda1 8:1 0 8G 0 part /
sdb 8:16 0 1G 0 disk
sdb2 8:18 0 511M 0 part
sdb1 8:17 0 511M 0 part

Switching to sfdisk.

MichaIng avatar May 22 '25 14:05 MichaIng

Fixed with: https://github.com/MichaIng/DietPi/commit/447816c Would be great if you could give it a try. The output above + whether it is a Bullseye system would be still good to know, just to assure I derived the underlying issue correctly, and we narrowed down the cases correctly, in which it occurs: https://github.com/MichaIng/DietPi/issues/7527#issuecomment-2895061240

MichaIng avatar May 22 '25 14:05 MichaIng

I'm sorry, but I can't confirm that it works now :-( It says that there is enough apace on the target but braks during dd

This is what I got:

root@DietPi:~# export SKIP_ARCHIVE=1
root@DietPi:~# bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.build/images/dietpi-imager')"
[  OK  ] DietPi-Imager | cd /root
[ INFO ] DietPi-Imager | Checking for required APT packages: parted fdisk zerofree xz-utils
[ INFO ] DietPi-Imager | Unmounting all filesystems below selected /dev/sda ...
[ INFO ] DietPi-Imager | MBR partition table detected
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/962880 files (0.7% non-contiguous), 2002287/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | mount /dev/sda2 /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | rm -f /tmp/DietPi-Imager_mnt/root/.bash_history /tmp/DietPi-Imager_mnt/home/pi/.bash_history /tmp/DietPi-Imager_mnt/var/lib/dhcp/*.leases
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants
[  OK  ] DietPi-Imager | ln -s /etc/systemd/system/dietpi-fs_partition_resize.service /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | partprobe /dev/sda
[  OK  ] DietPi-Imager | partx -u /dev/sda
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/962880 files (0.7% non-contiguous), 2002286/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | tune2fs -O ^has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[ INFO ] DietPi-Imager | Shrinking last filesystem to minimum size...
resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2251433 (4k) blocks.
Begin pass 2 (max = 273934)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 118)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 38607)
Updating inode references     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2251433 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2248254 (4k) blocks.
Begin pass 2 (max = 450)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 69)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2248254 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2248248 (4k) blocks.
Begin pass 2 (max = 6)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 69)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2248248 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
The filesystem is already 2248248 (4k) blocks long.  Nothing to do!

[  OK  ] DietPi-Imager | Reducing last filesystem size to 8787 MiB
[  OK  ] DietPi-Imager | resize2fs /dev/sda2 2249272
[ INFO ] DietPi-Imager | Overriding filesystems free space with zeros to purge removed data and allow better compression...
[  OK  ] DietPi-Imager | mount /dev/sda1 /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt, please wait...
[FAILED] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fsck -y /dev/sda1, please wait...
fsck from util-linux 2.36.1
fsck.fat 4.2 (2021-01-31)
/dev/sda1: 373 files, 65119/258077 clusters
[  OK  ] DietPi-Imager | fsck -y /dev/sda1
[ INFO ] DietPi-Imager | zerofree -v /dev/sda2, please wait...
12338/288542/2249272
[  OK  ] DietPi-Imager | zerofree -v /dev/sda2
[  OK  ] DietPi-Imager | tune2fs -O has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/563040 files (0.7% non-contiguous), 1977115/2249272 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | rmdir /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | Shrinking last partition to: 8787 MiB
[ INFO ] DietPi-Imager | eval sfdisk --no-reread --no-tell-kernel -fN2 '/dev/sda' <<< ',17994176', please wait...
Disk /dev/sda: 14.84 GiB, 15931539456 bytes, 31116288 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d0105b5

Old situation:

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      8192   270335   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       270336 31116287 30845952 14.7G 83 Linux

/dev/sda2:
New situation:
Disklabel type: dos
Disk identifier: 0x8d0105b5

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      8192   270335   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       270336 18264511 17994176  8.6G 83 Linux

The partition table has been altered.
[  OK  ] DietPi-Imager | eval sfdisk --no-reread --no-tell-kernel -fN2 '/dev/sda' <<< ',17994176'
[  OK  ] DietPi-Imager | partprobe /dev/sda
[  OK  ] DietPi-Imager | partx -u /dev/sda
[  OK  ] DietPi-Imager | Free space check: path=. | available=13049 MiB | required=9018 MiB
[ INFO ] DietPi-Imager | Creating final image with actually used size: 8919 MiB
[ INFO ] DietPi-Imager | dd if=/dev/sda of=/root/backup.img bs=1M status=progress count=8919, please wait...
1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158 s, 12.5 MB/s
dd: error reading '/dev/sda': Input/output error
1880+1 records in
1880+1 records out
1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158.42 s, 12.4 MB/s
[FAILED] DietPi-Imager | dd if=/dev/sda of=/root/backup.img bs=1M status=progress count=8919

RPi 4 Model B (aarch64) | IP: 192.168.0.196 | Use up/down buttons to scroll textetPi-Imager ├───────────────────────────────────────────────────┐
                         │  - Command: dd if=/dev/sda of=/root/backup.img bs=1M status=progress count=8919
                         │  - Exit code: 1
                         │  - DietPi version: v9.12.1 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 6
                         │  - Error log:
                         │ ^M11534336 bytes (12 MB, 11 MiB) copied, 1 s, 11.3 MB/s^M28311552 bytes (28 MB, 27 MiB) copied, 2 s, 13.8 MB/s^M461373
                         │ bytes (46 MB, 44 MiB) copied, 3 s, 15.2 MB/s^M65011712 bytes (65 MB, 62 MiB) copied, 4 s, 16.1 MB/s^M82837504 bytes (8
                         │ MB, 79 MiB) copied, 5 s, 16.5 MB/s^M99614720 bytes (100 MB, 95 MiB) copied, 6 s, 16.6 MB/s^M118489088 bytes (118 MB, 1
                         │ MiB) copied, 7 s, 16.8 MB/s^M136314880 bytes (136 MB, 130 MiB) copied, 8 s, 17.0 MB/s^M153092096 bytes (153 MB, 146 Mi
                         │ copied, 9 s, 16.9 MB/s^M169869312 bytes (170 MB, 162 MiB) copied, 10 s, 17.0 MB/s^M187695104 bytes (188 MB, 179 MiB)
                         │ copied, 11 s, 17.0 MB/s^M204472320 bytes (204 MB, 195 MiB) copied, 12 s, 17.0 MB/s^M222298112 bytes (222 MB, 212 MiB)
                         │ copied, 13 s, 17.0 MB/s^M239075328 bytes (239 MB, 228 MiB) copied, 14 s, 17.1 MB/s^M251658240 bytes (252 MB, 240 MiB)
                         │ copied, 18 s, 14.2 MB/s^M252706816 bytes (253 MB, 241 MiB) copied, 18 s, 14.2 MB/s^M253755392 bytes (254 MB, 242 MiB)
                         │ copied, 18 s, 14.2 MB/s^M256901120 bytes (257 MB, 245 MiB) copied, 18 s, 14.2 MB/s^M273678336 bytes (274 MB, 261 MiB)
                         │ copied, 19 s, 14.4 MB/s^M291504128 bytes (292 MB, 278 MiB) copied, 20 s, 14.6 MB/s^M309329920 bytes (309 MB, 295 MiB)
                         │ copied, 21 s, 14.7 MB/s^M327155712 bytes (327 MB, 312 MiB) copied, 22 s, 14.8 MB/s^M344981504 bytes (345 MB, 329 MiB)
                         │ copied, 23 s, 15.0 MB/s^M362807296 bytes (363 MB, 346 MiB) copied, 24 s, 15.1 MB/s^M379584512 bytes (380 MB, 362 MiB)
                         │ copied, 25 s, 15.2 MB/s^M397410304 bytes (397 MB, 379 MiB) copied, 26 s, 15.3 MB/s^M415236096 bytes (415 MB, 396 MiB)
                         │ copied, 27 s, 15.4 MB/s^M433061888 bytes (433 MB, 413 MiB) copied, 28 s, 15.4 MB/s^M449839104 bytes (450 MB, 429 MiB)
                         │ copied, 29 s, 15.5 MB/s^M467664896 bytes (468 MB, 446 MiB) copied, 30 s, 15.6 MB/s^M485490688 bytes (485 MB, 463 MiB)
                         │ copied, 31 s, 15.6 MB/s^M503316480 bytes (503 MB, 480 MiB) copied, 32 s, 15.7 MB/s^M520093696 bytes (520 MB, 496 MiB)
                         │ copied, 33 s, 15.8 MB/s^M530579456 bytes (531 MB, 506 MiB) copied, 34 s, 15.6 MB/s^M548405248 bytes (548 MB, 523 MiB)
                         │ copied, 35 s, 15.6 MB/s^M549453824 bytes (549 MB, 524 MiB) copied, 38 s, 14.4 MB/s^M550502400 bytes (551 MB, 525 MiB)
                         │ copied, 38 s, 14.4 MB/s^M551550976 bytes (552 MB, 526 MiB) copied, 38 s, 14.4 MB/s^M563085312 bytes (563 MB, 537 MiB)
                         │ copied, 39 s, 14.4 MB/s^M580911104 bytes (581 MB, 554 MiB) copied, 40 s, 14.5 MB/s^M584056832 bytes (584 MB, 557 MiB)
                         │ copied, 44 s, 13.4 MB/s^M585105408 bytes (585 MB, 558 MiB) copied, 44 s, 13.4 MB/s^M586153984 bytes (586 MB, 559 MiB)
                         │ copied, 44 s, 13.4 MB/s^M593494016 bytes (593 MB, 566 MiB) copied, 44 s, 13.5 MB/s^M611319808 bytes (611 MB, 583 MiB)
                         │ copied, 45 s, 13.6 MB/s^M625999872 bytes (626 MB, 597 MiB) copied, 46 s, 13.6 MB/s^M643825664 bytes (644 MB, 614 MiB)
                         │ copied, 47 s, 13.7 MB/s^M661651456 bytes (662 MB, 631 MiB) copied, 48 s, 13.8 MB/s^M678428672 bytes (678 MB, 647 MiB)
                         │ copied, 49 s, 13.8 MB/s^M696254464 bytes (696 MB, 664 MiB) copied, 50 s, 13.9 MB/s^M714080256 bytes (714 MB, 681 MiB)
                         │ copied, 51 s, 14.0 MB/s^M731906048 bytes (732 MB, 698 MiB) copied, 52 s, 14.1 MB/s^M749731840 bytes (750 MB, 715 MiB)
                         │ copied, 53 s, 14.1 MB/s^M766509056 bytes (767 MB, 731 MiB) copied, 54 s, 14.2 MB/s^M784334848 bytes (784 MB, 748 MiB)
                         │ copied, 55 s, 14.3 MB/s^M799014912 bytes (799 MB, 762 MiB) copied, 56 s, 14.3 MB/s^M815792128 bytes (816 MB, 778 MiB)
                         │ copied, 57 s, 14.3 MB/s^M833617920 bytes (834 MB, 795 MiB) copied, 58 s, 14.4 MB/s^M851443712 bytes (851 MB, 812 MiB)
                         │ copied, 59 s, 14.4 MB/s^M869269504 bytes (869 MB, 829 MiB) copied, 60 s, 14.5 MB/s^M872415232 bytes (872 MB, 832 MiB)
                         │ copied, 63 s, 13.9 MB/s^M873463808 bytes (873 MB, 833 MiB) copied, 63 s, 13.9 MB/s^M875560960 bytes (876 MB, 835 MiB)
                         │ copied, 63 s, 13.9 MB/s^M894435328 bytes (894 MB, 853 MiB) copied, 64 s, 14.0 MB/s^M912261120 bytes (912 MB, 870 MiB)
                         │ copied, 65 s, 14.0 MB/s^M918552576 bytes (919 MB, 876 MiB) copied, 68 s, 13.5 MB/s^M919601152 bytes (920 MB, 877 MiB)
                         │ copied, 68 s, 13.5 MB/s^M920649728 bytes (921 MB, 878 MiB) copied, 68 s, 13.5 MB/s^M933232640 bytes (933 MB, 890 MiB)
                         │ copied, 69 s, 13.5 MB/s^M951058432 bytes (951 MB, 907 MiB) copied, 70 s, 13.6 MB/s^M956301312 bytes (956 MB, 912 MiB)
                         │ copied, 71 s, 13.4 MB/s^M968884224 bytes (969 MB, 924 MiB) copied, 72 s, 13.5 MB/s^M986710016 bytes (987 MB, 941 MiB)
                         │ copied, 73 s, 13.5 MB/s^M1004535808 bytes (1.0 GB, 958 MiB) copied, 74 s, 13.6 MB/s^M1006632960 bytes (1.0 GB, 960 MiB
                         │ copied, 78 s, 13.0 MB/s^M1007681536 bytes (1.0 GB, 961 MiB) copied, 78 s, 13.0 MB/s^M1008730112 bytes (1.0 GB, 962 MiB
                         │ copied, 78 s, 13.0 MB/s^M1015021568 bytes (1.0 GB, 968 MiB) copied, 78 s, 13.0 MB/s^M1031798784 bytes (1.0 GB, 984 MiB
                         │ copied, 79 s, 13.1 MB/s^M1049624576 bytes (1.0 GB, 1001 MiB) copied, 80 s, 13.1 MB/s^M1066401792 bytes (1.1 GB, 1017
                         │ MiB) copied, 81 s, 13.2 MB/s^M1084227584 bytes (1.1 GB, 1.0 GiB) copied, 82 s, 13.2 MB/s ^M1101004800 bytes (1.1 GB, 1
                         │ GiB) copied, 83 s, 13.3 MB/s^M1118830592 bytes (1.1 GB, 1.0 GiB) copied, 84 s, 13.3 MB/s^M1136656384 bytes (1.1 GB, 1.
                         │ GiB) copied, 85 s, 13.4 MB/s^M1154482176 bytes (1.2 GB, 1.1 GiB) copied, 86 s, 13.4 MB/s^M1172307968 bytes (1.2 GB, 1.
                         │ GiB) copied, 87 s, 13.5 MB/s^M1190133760 bytes (1.2 GB, 1.1 GiB) copied, 88 s, 13.5 MB/s^M1206910976 bytes (1.2 GB, 1.
                         │ GiB) copied, 89 s, 13.6 MB/s^M1222639616 bytes (1.2 GB, 1.1 GiB) copied, 90 s, 13.6 MB/s^M1235222528 bytes (1.2 GB, 1.
                         │ GiB) copied, 92 s, 13.5 MB/s^M1242562560 bytes (1.2 GB, 1.2 GiB) copied, 92 s, 13.5 MB/s^M1259339776 bytes (1.3 GB, 1.
                         │ GiB) copied, 93 s, 13.5 MB/s^M1270874112 bytes (1.3 GB, 1.2 GiB) copied, 95 s, 13.4 MB/s^M1278214144 bytes (1.3 GB, 1.
                         │ GiB) copied, 95 s, 13.5 MB/s^M1294991360 bytes (1.3 GB, 1.2 GiB) copied, 99 s, 13.1 MB/s^M1296039936 bytes (1.3 GB, 1.
                         │ GiB) copied, 99 s, 13.1 MB/s^M1297088512 bytes (1.3 GB, 1.2 GiB) copied, 99 s, 13.1 MB/s^M1298137088 bytes (1.3 GB, 1.
                         │ GiB) copied, 99 s, 13.1 MB/s^M1306525696 bytes (1.3 GB, 1.2 GiB) copied, 103 s, 12.7 MB/s^M1307574272 bytes (1.3 GB, 1
                         │ GiB) copied, 103 s, 12.7 MB/s^M1308622848 bytes (1.3 GB, 1.2 GiB) copied, 103 s, 12.7 MB/s^M1310720000 bytes (1.3 GB,
                         │ 1.2 GiB) copied, 103 s, 12.7 MB/s^M1328545792 bytes (1.3 GB, 1.2 GiB) copied, 104 s, 12.8 MB/s^M1346371584 bytes (1.3
                         │ GB, 1.3 GiB) copied, 105 s, 12.8 MB/s^M1364197376 bytes (1.4 GB, 1.3 GiB) copied, 106 s, 12.9 MB/s^M1380974592 bytes
                         │ (1.4 GB, 1.3 GiB) copied, 107 s, 12.9 MB/s^M1397751808 bytes (1.4 GB, 1.3 GiB) copied, 108 s, 12.9 MB/s^M1416626176
                         │ bytes (1.4 GB, 1.3 GiB) copied, 109 s, 13.0 MB/s^M1433403392 bytes (1.4 GB, 1.3 GiB) copied, 110 s, 13.0 MB/s
                         │ 1450180608 bytes (1.5 GB, 1.4 GiB) copied, 111 s, 13.1 MB/s^M1468006400 bytes (1.5 GB, 1.4 GiB) copied, 112 s, 13.1
                         │
                         │                         Retry          : Re-run the last command that failed                ↑
                         │                         DietPi-Config  : Edit network, APT/NTP mirror settings etc          ▮
                         │
                         │
                         │                                  <Select>                                  <Exit>
                         │                                                                                                                      │
                         └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

DrCWO avatar Jul 17 '25 15:07 DrCWO

Sorry, was incomplete without the error message. Here the complete one...

login as: root
[email protected]'s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 ─────────────────────────────────────────────────────
 DietPi v9.12.1 : 15:56 - Thu 07/17/25
 ─────────────────────────────────────────────────────
 - Device model : RPi 4 Model B (aarch64)
 - CPU temp : 33 °C / 91 °F : Cool runnings
 - LAN IP : 192.168.0.196 (eth0)
 - MOTD : DietPi v9.14 has been released. Check out all changes:
          https://dietpi.com/docs/releases/v9_14/
 ─────────────────────────────────────────────────────

 DietPi Team     : https://github.com/MichaIng/DietPi#the-dietpi-project-team
 Patreon Legends : Chris Gelatt, ADSB.im
 Website         : https://dietpi.com/ | https://x.com/DietPi_ | Bsky: @dietpi.c                                                                                          om
 Contribute      : https://dietpi.com/contribute.html
 Web Hosting by  : https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

root@DietPi:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8, 0 Jul 17 15:56 /dev/sda
brw-rw---- 1 root disk 8, 1 Jul 17 15:56 /dev/sda1
brw-rw---- 1 root disk 8, 2 Jul 17 15:56 /dev/sda2
root@DietPi:~# export SKIP_ARCHIVE=1
root@DietPi:~# bash -c "$(curl -sSfL 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.build/images/dietpi-imager')"
[  OK  ] DietPi-Imager | cd /root
[ INFO ] DietPi-Imager | Checking for required APT packages: parted fdisk zerofree xz-utils
[ INFO ] DietPi-Imager | Unmounting all filesystems below selected /dev/sda ...
[ INFO ] DietPi-Imager | MBR partition table detected
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/962880 files (0.7% non-contiguous), 2002287/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | mount /dev/sda2 /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | rm -f /tmp/DietPi-Imager_mnt/root/.bash_history /tmp/DietPi-Imager_mnt/home/pi/.bash_history /tmp/DietPi-Imager_mnt/var/lib/dhcp/*.leases
[  OK  ] DietPi-Imager | mkdir /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants
[  OK  ] DietPi-Imager | ln -s /etc/systemd/system/dietpi-fs_partition_resize.service /tmp/DietPi-Imager_mnt/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | partprobe /dev/sda
[  OK  ] DietPi-Imager | partx -u /dev/sda
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/962880 files (0.7% non-contiguous), 2002286/3855744 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | tune2fs -O ^has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[ INFO ] DietPi-Imager | Shrinking last filesystem to minimum size...
resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2251433 (4k) blocks.
Begin pass 2 (max = 273934)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 118)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 38607)
Updating inode references     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2251433 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2248254 (4k) blocks.
Begin pass 2 (max = 450)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 69)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2248254 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
Resizing the filesystem on /dev/sda2 to 2248248 (4k) blocks.
Begin pass 2 (max = 6)
Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 69)
Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/sda2 is now 2248248 (4k) blocks long.

resize2fs 1.46.2 (28-Feb-2021)
The filesystem is already 2248248 (4k) blocks long.  Nothing to do!

[  OK  ] DietPi-Imager | Reducing last filesystem size to 8787 MiB
[  OK  ] DietPi-Imager | resize2fs /dev/sda2 2249272
[ INFO ] DietPi-Imager | Overriding filesystems free space with zeros to purge removed data and allow better compression...
[  OK  ] DietPi-Imager | mount /dev/sda1 /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt, please wait...
[FAILED] DietPi-Imager | fstrim -v --quiet-unsupported /tmp/DietPi-Imager_mnt
[  OK  ] DietPi-Imager | sync
[  OK  ] DietPi-Imager | umount -R /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | fsck -y /dev/sda1, please wait...
fsck from util-linux 2.36.1
fsck.fat 4.2 (2021-01-31)
/dev/sda1: 373 files, 65119/258077 clusters
[  OK  ] DietPi-Imager | fsck -y /dev/sda1
[ INFO ] DietPi-Imager | zerofree -v /dev/sda2, please wait...
12338/288542/2249272
[  OK  ] DietPi-Imager | zerofree -v /dev/sda2
[  OK  ] DietPi-Imager | tune2fs -O has_journal /dev/sda2
[  OK  ] DietPi-Imager | sync
[ INFO ] DietPi-Imager | e2fsck -fyD /dev/sda2, please wait...
e2fsck 1.46.2 (28-Feb-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 180144/563040 files (0.7% non-contiguous), 1977115/2249272 blocks
[  OK  ] DietPi-Imager | e2fsck -fyD /dev/sda2
[  OK  ] DietPi-Imager | rmdir /tmp/DietPi-Imager_mnt
[ INFO ] DietPi-Imager | Shrinking last partition to: 8787 MiB
[ INFO ] DietPi-Imager | eval sfdisk --no-reread --no-tell-kernel -fN2 '/dev/sda' <<< ',17994176', please wait...
Disk /dev/sda: 14.84 GiB, 15931539456 bytes, 31116288 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8d0105b5

Old situation:

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      8192   270335   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       270336 31116287 30845952 14.7G 83 Linux

/dev/sda2:
New situation:
Disklabel type: dos
Disk identifier: 0x8d0105b5

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      8192   270335   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       270336 18264511 17994176  8.6G 83 Linux

The partition table has been altered.
[  OK  ] DietPi-Imager | eval sfdisk --no-reread --no-tell-kernel -fN2 '/dev/sda' <<< ',17994176'
[  OK  ] DietPi-Imager | partprobe /dev/sda
[  OK  ] DietPi-Imager | partx -u /dev/sda
[  OK  ] DietPi-Imager | Free space check: path=. | available=13049 MiB | required=9018 MiB
[ INFO ] DietPi-Imager | Creating final image with actually used size: 8919 MiB
[ INFO ] DietPi-Imager | dd if=/dev/sda of=/root/backup.img bs=1M status=progress count=8919, please wait...
1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158 s, 12.5 MB/s
dd: error reading '/dev/sda': Input/output error
1880+1 records in
1880+1 records out
1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158.42 s, 12.4 MB/s
[FAILED] DietPi-Imager | dd if=/dev/sda of=/root/backup.img bs=1M status=progress count=8919

RPi 4 Model B (aarch64) | IP: 192.168.0.196 | Use up/down buttons to scroll textetPi-Imager ├───────────────────────────────────────────────────┐
                         │ copied, 49 s, 13.8 MB/s^M696254464 bytes (696 MB, 664 MiB) copied, 50 s, 13.9 MB/s^M714080256 bytes (714 MB, 681 MiB)
                         │ copied, 51 s, 14.0 MB/s^M731906048 bytes (732 MB, 698 MiB) copied, 52 s, 14.1 MB/s^M749731840 bytes (750 MB, 715 MiB)
                         │ copied, 53 s, 14.1 MB/s^M766509056 bytes (767 MB, 731 MiB) copied, 54 s, 14.2 MB/s^M784334848 bytes (784 MB, 748 MiB)
                         │ copied, 55 s, 14.3 MB/s^M799014912 bytes (799 MB, 762 MiB) copied, 56 s, 14.3 MB/s^M815792128 bytes (816 MB, 778 MiB)
                         │ copied, 57 s, 14.3 MB/s^M833617920 bytes (834 MB, 795 MiB) copied, 58 s, 14.4 MB/s^M851443712 bytes (851 MB, 812 MiB)
                         │ copied, 59 s, 14.4 MB/s^M869269504 bytes (869 MB, 829 MiB) copied, 60 s, 14.5 MB/s^M872415232 bytes (872 MB, 832 MiB)
                         │ copied, 63 s, 13.9 MB/s^M873463808 bytes (873 MB, 833 MiB) copied, 63 s, 13.9 MB/s^M875560960 bytes (876 MB, 835 MiB)
                         │ copied, 63 s, 13.9 MB/s^M894435328 bytes (894 MB, 853 MiB) copied, 64 s, 14.0 MB/s^M912261120 bytes (912 MB, 870 MiB)
                         │ copied, 65 s, 14.0 MB/s^M918552576 bytes (919 MB, 876 MiB) copied, 68 s, 13.5 MB/s^M919601152 bytes (920 MB, 877 MiB)
                         │ copied, 68 s, 13.5 MB/s^M920649728 bytes (921 MB, 878 MiB) copied, 68 s, 13.5 MB/s^M933232640 bytes (933 MB, 890 MiB)
                         │ copied, 69 s, 13.5 MB/s^M951058432 bytes (951 MB, 907 MiB) copied, 70 s, 13.6 MB/s^M956301312 bytes (956 MB, 912 MiB)
                         │ copied, 71 s, 13.4 MB/s^M968884224 bytes (969 MB, 924 MiB) copied, 72 s, 13.5 MB/s^M986710016 bytes (987 MB, 941 MiB)
                         │ copied, 73 s, 13.5 MB/s^M1004535808 bytes (1.0 GB, 958 MiB) copied, 74 s, 13.6 MB/s^M1006632960 bytes (1.0 GB, 960 MiB
                         │ copied, 78 s, 13.0 MB/s^M1007681536 bytes (1.0 GB, 961 MiB) copied, 78 s, 13.0 MB/s^M1008730112 bytes (1.0 GB, 962 MiB
                         │ copied, 78 s, 13.0 MB/s^M1015021568 bytes (1.0 GB, 968 MiB) copied, 78 s, 13.0 MB/s^M1031798784 bytes (1.0 GB, 984 MiB
                         │ copied, 79 s, 13.1 MB/s^M1049624576 bytes (1.0 GB, 1001 MiB) copied, 80 s, 13.1 MB/s^M1066401792 bytes (1.1 GB, 1017
                         │ MiB) copied, 81 s, 13.2 MB/s^M1084227584 bytes (1.1 GB, 1.0 GiB) copied, 82 s, 13.2 MB/s ^M1101004800 bytes (1.1 GB, 1
                         │ GiB) copied, 83 s, 13.3 MB/s^M1118830592 bytes (1.1 GB, 1.0 GiB) copied, 84 s, 13.3 MB/s^M1136656384 bytes (1.1 GB, 1.
                         │ GiB) copied, 85 s, 13.4 MB/s^M1154482176 bytes (1.2 GB, 1.1 GiB) copied, 86 s, 13.4 MB/s^M1172307968 bytes (1.2 GB, 1.
                         │ GiB) copied, 87 s, 13.5 MB/s^M1190133760 bytes (1.2 GB, 1.1 GiB) copied, 88 s, 13.5 MB/s^M1206910976 bytes (1.2 GB, 1.
                         │ GiB) copied, 89 s, 13.6 MB/s^M1222639616 bytes (1.2 GB, 1.1 GiB) copied, 90 s, 13.6 MB/s^M1235222528 bytes (1.2 GB, 1.
                         │ GiB) copied, 92 s, 13.5 MB/s^M1242562560 bytes (1.2 GB, 1.2 GiB) copied, 92 s, 13.5 MB/s^M1259339776 bytes (1.3 GB, 1.
                         │ GiB) copied, 93 s, 13.5 MB/s^M1270874112 bytes (1.3 GB, 1.2 GiB) copied, 95 s, 13.4 MB/s^M1278214144 bytes (1.3 GB, 1.
                         │ GiB) copied, 95 s, 13.5 MB/s^M1294991360 bytes (1.3 GB, 1.2 GiB) copied, 99 s, 13.1 MB/s^M1296039936 bytes (1.3 GB, 1.
                         │ GiB) copied, 99 s, 13.1 MB/s^M1297088512 bytes (1.3 GB, 1.2 GiB) copied, 99 s, 13.1 MB/s^M1298137088 bytes (1.3 GB, 1.
                         │ GiB) copied, 99 s, 13.1 MB/s^M1306525696 bytes (1.3 GB, 1.2 GiB) copied, 103 s, 12.7 MB/s^M1307574272 bytes (1.3 GB, 1
                         │ GiB) copied, 103 s, 12.7 MB/s^M1308622848 bytes (1.3 GB, 1.2 GiB) copied, 103 s, 12.7 MB/s^M1310720000 bytes (1.3 GB,
                         │ 1.2 GiB) copied, 103 s, 12.7 MB/s^M1328545792 bytes (1.3 GB, 1.2 GiB) copied, 104 s, 12.8 MB/s^M1346371584 bytes (1.3
                         │ GB, 1.3 GiB) copied, 105 s, 12.8 MB/s^M1364197376 bytes (1.4 GB, 1.3 GiB) copied, 106 s, 12.9 MB/s^M1380974592 bytes
                         │ (1.4 GB, 1.3 GiB) copied, 107 s, 12.9 MB/s^M1397751808 bytes (1.4 GB, 1.3 GiB) copied, 108 s, 12.9 MB/s^M1416626176
                         │ bytes (1.4 GB, 1.3 GiB) copied, 109 s, 13.0 MB/s^M1433403392 bytes (1.4 GB, 1.3 GiB) copied, 110 s, 13.0 MB/s
                         │ 1450180608 bytes (1.5 GB, 1.4 GiB) copied, 111 s, 13.1 MB/s^M1468006400 bytes (1.5 GB, 1.4 GiB) copied, 112 s, 13.1
                         │ MB/s^M1485832192 bytes (1.5 GB, 1.4 GiB) copied, 113 s, 13.1 MB/s^M1502609408 bytes (1.5 GB, 1.4 GiB) copied, 114 s,
                         │ 13.2 MB/s^M1521483776 bytes (1.5 GB, 1.4 GiB) copied, 115 s, 13.2 MB/s^M1538260992 bytes (1.5 GB, 1.4 GiB) copied, 116
                         │ s, 13.3 MB/s^M1555038208 bytes (1.6 GB, 1.4 GiB) copied, 117 s, 13.3 MB/s^M1571815424 bytes (1.6 GB, 1.5 GiB) copied,
                         │ 118 s, 13.3 MB/s^M1586495488 bytes (1.6 GB, 1.5 GiB) copied, 119 s, 13.3 MB/s^M1603272704 bytes (1.6 GB, 1.5 GiB)
                         │ copied, 120 s, 13.4 MB/s^M1620049920 bytes (1.6 GB, 1.5 GiB) copied, 121 s, 13.4 MB/s^M1621098496 bytes (1.6 GB, 1.5
                         │ GiB) copied, 124 s, 13.1 MB/s^M1622147072 bytes (1.6 GB, 1.5 GiB) copied, 124 s, 13.1 MB/s^M1623195648 bytes (1.6 GB,
                         │ 1.5 GiB) copied, 125 s, 13.0 MB/s^M1624244224 bytes (1.6 GB, 1.5 GiB) copied, 125 s, 13.0 MB/s^M1635778560 bytes (1.6
                         │ GB, 1.5 GiB) copied, 129 s, 12.7 MB/s^M1636827136 bytes (1.6 GB, 1.5 GiB) copied, 129 s, 12.7 MB/s^M1637875712 bytes
                         │ (1.6 GB, 1.5 GiB) copied, 129 s, 12.7 MB/s^M1638924288 bytes (1.6 GB, 1.5 GiB) copied, 129 s, 12.7 MB/s^M1653604352
                         │ bytes (1.7 GB, 1.5 GiB) copied, 130 s, 12.7 MB/s^M1671430144 bytes (1.7 GB, 1.6 GiB) copied, 131 s, 12.8 MB/s
                         │ 1689255936 bytes (1.7 GB, 1.6 GiB) copied, 132 s, 12.8 MB/s^M1707081728 bytes (1.7 GB, 1.6 GiB) copied, 133 s, 12.8
                         │ MB/s^M1724907520 bytes (1.7 GB, 1.6 GiB) copied, 134 s, 12.9 MB/s^M1742733312 bytes (1.7 GB, 1.6 GiB) copied, 135 s,
                         │ 12.9 MB/s^M1759510528 bytes (1.8 GB, 1.6 GiB) copied, 136 s, 12.9 MB/s^M1775239168 bytes (1.8 GB, 1.7 GiB) copied, 137
                         │ s, 13.0 MB/s^M1794113536 bytes (1.8 GB, 1.7 GiB) copied, 138 s, 13.0 MB/s^M1810890752 bytes (1.8 GB, 1.7 GiB) copied,
                         │ 139 s, 13.0 MB/s^M1828716544 bytes (1.8 GB, 1.7 GiB) copied, 140 s, 13.1 MB/s^M1846542336 bytes (1.8 GB, 1.7 GiB)
                         │ copied, 141 s, 13.1 MB/s^M1857028096 bytes (1.9 GB, 1.7 GiB) copied, 142 s, 13.1 MB/s^M1873805312 bytes (1.9 GB, 1.7
                         │ GiB) copied, 143 s, 13.1 MB/s^M1891631104 bytes (1.9 GB, 1.8 GiB) copied, 144 s, 13.1 MB/s^M1909456896 bytes (1.9 GB,
                         │ 1.8 GiB) copied, 145 s, 13.2 MB/s^M1926234112 bytes (1.9 GB, 1.8 GiB) copied, 149 s, 12.9 MB/s^M1927282688 bytes (1.9
                         │ GB, 1.8 GiB) copied, 149 s, 12.9 MB/s^M1928331264 bytes (1.9 GB, 1.8 GiB) copied, 150 s, 12.9 MB/s^M1929379840 bytes
                         │ (1.9 GB, 1.8 GiB) copied, 150 s, 12.9 MB/s^M1936719872 bytes (1.9 GB, 1.8 GiB) copied, 150 s, 12.9 MB/s^M1953497088
                         │ bytes (2.0 GB, 1.8 GiB) copied, 151 s, 12.9 MB/s^M1965031424 bytes (2.0 GB, 1.8 GiB) copied, 155 s, 12.7 MB/s
                         │ 1966080000 bytes (2.0 GB, 1.8 GiB) copied, 155 s, 12.7 MB/s^M1967128576 bytes (2.0 GB, 1.8 GiB) copied, 155 s, 12.7
                         │ MB/s^M1968177152 bytes (2.0 GB, 1.8 GiB) copied, 155 s, 12.7 MB/s^M1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158 s,
                         │ 12.5 MB/s
                         │ dd: error reading '/dev/sda': Input/output error
                         │ 1880+1 records in
                         │ 1880+1 records out
                         │ 1971720192 bytes (2.0 GB, 1.8 GiB) copied, 158.42 s, 12.4 MB/s
                         │
                         │                         Retry          : Re-run the last command that failed                ↑
                         │                         DietPi-Config  : Edit network, APT/NTP mirror settings etc          ▮
                         │
                         │
                         │                                  <Select>                                  <Exit>
                         │                                                                                                                      │
                         └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

DrCWO avatar Jul 17 '25 15:07 DrCWO

2GB done looks like a border of the FS?

DrCWO avatar Jul 17 '25 15:07 DrCWO

This is a block device reading error of the source device, i.e. something wrong with it, like underpowered?

Check for kernel errors:

dmesg -l 0,1,2,3

MichaIng avatar Jul 17 '25 16:07 MichaIng

Thank you very much. Re-tested with a different SD-Card reader and image was created 💯

DrCWO avatar Aug 01 '25 16:08 DrCWO