# Unable connect to SBC due to accidental removal of iproute2 during uninstallation of PiHole

**URL:** <https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289>\
**Category:** Troubleshooting\
**Created:** [11 July 2023 15:30 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289 "2023-07-11T15:30:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mari0](https://dietpi.com/forum/user_avatar/dietpi.com/mari0/32/4310_2.png) [@Mari0](https://dietpi.com/forum/u/Mari0)\
**Post date:** [11 July 2023 15:30 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/1 "2023-07-11T15:30:27Z")

</div>

I previously searched for related content on the forum, but ultimately ended up re-flashing the SD card and reinstalling from scratch. I would like to know how to handle this situation if it happens again.

Here is my situation:

- SBC model is NanoPi R2S
- I have dietpi backup on SD card
- Unable to connect to SBC via HDMI, serial port, or LAN
- SD card storage can be accessed by other devices

1. Is it possible to return to normal under existing conditions?
2. Is there any way to copy the iproute2 or other missing file to SD card?
3. Can the existing Dietpi shell script be used on other devices to restore the contents of an SD card from a backup file?
4. Is it effective to create a script file in the directory `/var/lib/dietpi/postboot.d` and execute `dietpi-backup -1`?

---

<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 July 2023 15:59 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/2 "2023-07-11T15:59:06Z")

</div>

> [@Mari0](#):
>
> Is it possible to return to normal under existing conditions?

Yes. We had a couple of cases where similar happen due to PiHole uninstall process and we where able to get system back online.

> [@Mari0](#):
>
> Is there any way to copy the iproute2 or other missing file to SD card?

Best is to download the related Debian package and install the whole \*.deb file

> [@Mari0](#):
>
> Can the existing Dietpi shell script be used on other devices to restore the contents of an SD card from a backup file?

no

> [@Mari0](#):
>
> Is it effective to create a script file in the directory `/var/lib/dietpi/postboot.d` and execute `dietpi-backup -1`?

Something that never has been tested if this would be working.

---

<div class="post-metadata">

**Author:** ![Mari0](https://dietpi.com/forum/user_avatar/dietpi.com/mari0/32/4310_2.png) [@Mari0](https://dietpi.com/forum/u/Mari0)\
**Post date:** [12 July 2023 13:30 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/3 "2023-07-12T13:30:52Z")

</div>

> [@Joulinar](#):
>
> Yes. We had a couple of cases where similar happen due to PiHole uninstall process and we where able to get system back online.

What can I do in this situation?

- When the system is running smoothly, make a backup onto a new USB stick, then follow the steps as you mentioned in these [topic1](https://dietpi.com/forum/t/uninstalling-pihole/5445/27) [topic2](https://dietpi.com/forum/t/backup-in-another-place/5241/4)
- Create a full backup of the SD card as an image?
- If I mount the SD card storage to another device and restore it using a script and backup files, is this method feasible? If so, where should I start?

---

<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:** [12 July 2023 14:01 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/4 "2023-07-12T14:01:59Z")

</div>

Option 1 and 2 should be feasible.

#1 should be feasible. It is supported ootb by our scripts and initial setup process.

#2 should be feasible. creating an image regularly would need to be setup manually. Actually, we don’t have a tool who would create such images on a running system.

#3 theoretically it might work if you manually run/configure `rsync` for this.

---

<div class="post-metadata">

**Author:** ![Mari0](https://dietpi.com/forum/user_avatar/dietpi.com/mari0/32/4310_2.png) [@Mari0](https://dietpi.com/forum/u/Mari0)\
**Post date:** [12 July 2023 14:09 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/5 "2023-07-12T14:09:15Z")

</div>

Thank you for your help and patient responses!

---

<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:** [12 July 2023 14:12 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/6 "2023-07-12T14:12:00Z")

</div>

By the way, it would be much better not to remove the core packages like `iproute2` 😉

---

<div class="post-metadata">

**Author:** ![Mari0](https://dietpi.com/forum/user_avatar/dietpi.com/mari0/32/4310_2.png) [@Mari0](https://dietpi.com/forum/u/Mari0)\
**Post date:** [12 July 2023 14:23 UTC](https://dietpi.com/forum/t/unable-connect-to-sbc-due-to-accidental-removal-of-iproute2-during-uninstallation-of-pihole/17289/7 "2023-07-12T14:23:38Z")

</div>

Got it 😄
