# Broken dietpi-login

**URL:** <https://dietpi.com/forum/t/broken-dietpi-login/25117>\
**Category:** Troubleshooting\
**Tags:** raspberry-pi\
**Created:** [10 April 2026 06:34 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117 "2026-04-10T06:34:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephaneCapo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@StephaneCapo](https://dietpi.com/forum/u/StephaneCapo)\
**Post date:** [10 April 2026 06:34 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/1 "2026-04-10T06:34:36Z")

</div>

### Creating a bug report/issue

I have searched the existing open and closed issues

#### Required Information

- DietPi version | `cat /boot/dietpi/.version`

G\_DIETPI\_VERSION\_CORE=10  
G\_DIETPI\_VERSION\_SUB=2  
G\_DIETPI\_VERSION\_RC=3  
G\_GITBRANCH=‘master’  
G\_GITOWNER=‘MichaIng’

- Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN`

trixie 0

- Kernel version | `uname --all`

Linux stephpi 6.12.75+rpt-rpi-v7 #1 SMP Raspbian 1:6.12.75-1+rpt1 (2026-03-11) armv7l GNU/Linux

- Architecture | `dpkg --print-architecture`

armhf

- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)

RPi 2 Model B (armv7l)

#### Steps to reproduce

when connecting to my raspi from ssh, got this message :

```auto
*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.
/boot/dietpi/dietpi-login: line 1: syntax error near unexpected token `)' /boot/dietpi/dietpi-login: line 1: 
`�����ɓ޲��\] !4L���0@��n���}��\]�D�)���n���,E������o
�(�R��Y��C���d��R3����s|�s�R���tW3����<Y����@��I��7�8I�䥀
\~kA{��\~�W41�fu�r�@Z�+1e�QK��A�)ݔH�Q��x�
��ْe(��4J�52�+߁��O������3���)���KE�=q����J`J�U���ީ�Yh"�
�6c�({P���ڱ��]z��6ɞ��l8�;qn��6h�ө�|N\���7���ʓ�>�V\��.H��� 
��R�̧�d��ޒ/�����(�x/��w,��:���$zP���z|�Ln�B�(V>�J��;h�.��5��]�D?������ɤ8��6��Aԯ;{<[�?
����*X^bC0<mϘ�˃��b�JY�Q�۳̖�<<5��2g����{������ەs�ػ끜�-���a�d�>_ ��T}
����:-)�&UM���N��t��ϻ�ZJ�Z��>M��Q�ᜭ����Q�Δ���x�����
r;���9Ҥ�,ĺE�,%;yu�H0g����"���>�q���������O
����s���d��y�>P��`�t�@�\*t�|h�9’"�k��v��͔��ѩ{�ߵq��v�2���\]&����s�P�N��x?���\_’*

```

I can still execute commands, but can not sudo anymore. And all the /boot/dietpi folder seems corrupted (launching dietpi-backup display a similar error)

Don’t know what to try ?

I suppose it happened after a sudo apt-upgrade or after a reboot.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [10 April 2026 07:18 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/2 "2026-04-10T07:18:27Z")

</div>

It looks as though the SD card is corrupted. You could try logging in as root and downloading the latest DietPi update again. If that works, it will redownload the DietPi scripts.

```auto
G_DEV_BRANCH master

```

But I’m afraid the damage to your SD card will be more extensive and won’t be limited to just the DietPi scripts.

---

<div class="post-metadata">

**Author:** ![StephaneCapo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@StephaneCapo](https://dietpi.com/forum/u/StephaneCapo)\
**Post date:** [11 April 2026 09:15 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/3 "2026-04-11T09:15:45Z")

</div>

Thanks for your answer.

It seems a lot of files are corrupted, so G\_DEV\_BRANCH master doesn’t work.

> G\_DEV\_BRANCH master  
> [OK] G\_CONFIG\_INJECT | Added setting DEV\_GITBRANCH=master to end of file /boot/dietpi.txt  
> /boot/dietpi/dietpi-update: line 1: $‘\246%Ŵ\355}\307\305t\255?\363\232EAlr\234\265\024\027\225\217m\244t\300\230\352\300C~\2500-\332\177’: command not found  
> /boot/dietpi/dietpi-update: command substitution: line 1: syntax error near unexpected token `)' /boot/dietpi/dietpi-update: command substitution: line 1: `55d��^z7yi7G�+���v�àlH��8��H/ǋ�����y1��e��@��˄&��\<�+I���f��h�}��㋬��.i�cv��e�͘��g3�_ĜV�cں0K/\>m� ���z��\>\<��eF�ͧ�|���,�bx)���?���)�\_���q�r�ؒ4���‘��tO���q�1P’  
> /boot/dietpi/dietpi-update: line 1: $'\264\2363\0319\340\217N#\322\326\323\027\3217\321s\035\241\254\017_D8\241\*v\366\215\266ـ\350=\351\336\362K\241\222\276\262\260m\307R\345\274\376\305J\336’: command not found  
> /boot/dietpi/dietpi-update: line 4: syntax error near unexpected token `)' /boot/dietpi/dietpi-update: line 4: `1�n��K�k�m�K�A�bU���\<C(8�G�rXyujX�t�:^�h���'�

I’ll probably need to do a clean install.

It’s pretty strange as I can reboot and the softwares running on the raspi seem OK (Plex server / PiHole / nicotine+ headless).

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [11 April 2026 09:32 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/4 "2026-04-11T09:32:33Z")

</div>

It’s possible that only the boot partition is affected. You could also download the script archive manually, remove the SD card from the RPI, and then manually copy the files from the archive to the boot partition.

The archive contains a subfolder named `dietpi`, copy its contents to the corresponding folder on the SD card. This can be done on any Windows computer.

- [https://github.com/MichaIng/DietPi/archive/refs/tags/v10.2.zip](https://github.com/MichaIng/DietPi/archive/refs/tags/v10.2.zip)

---

<div class="post-metadata">

**Author:** ![StephaneCapo](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@StephaneCapo](https://dietpi.com/forum/u/StephaneCapo)\
**Post date:** [11 April 2026 16:15 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/5 "2026-04-11T16:15:47Z")

</div>

Thank you,

I’ve done a clean install and everything is now fine.

I’ll probably backup the whole sd card after updates so that I will be able to go back if something went wrong again

Stéphane

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [10 July 2026 16:16 UTC](https://dietpi.com/forum/t/broken-dietpi-login/25117/6 "2026-07-10T16:16:40Z")

</div>

Closed on 10 July 2026 16:16 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
