# No SSH response after building distribution on a cloud instance

**URL:** <https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990>\
**Category:** Troubleshooting\
**Tags:** external-server\
**Created:** [16 August 2022 07:04 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990 "2022-08-16T07:04:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![dioxide0363](https://dietpi.com/forum/user_avatar/dietpi.com/dioxide0363/32/2216_2.png) [@dioxide0363](https://dietpi.com/forum/u/dioxide0363)\
**Post date:** [16 August 2022 07:04 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/1 "2022-08-16T07:04:32Z")

</div>

Hello,

Today I started experimenting with installing DietPi on Oracle Cloud free tier **arm** instances. I booted an instance using the latest Bulleye `cloudgeneric-arm64` image, which I downloaded from [Debian Cloud repo](https://cloud.debian.org/images/cloud/). After accessing the ssh, I [made my distribution](https://dietpi.com/docs/hardware/#make-your-own-distribution) over PREP.

#### Expected behavior

- Be able to SSH after the reboot for the first run of dietpi

#### Actual behaviour

- After rebooting at the last sequence instance, it stops responding to SSH, thereby losing access to the compute instance altogether.

#### Extra details

- `Generic Image`
- **Firmware:** UEFI\_64
- `Port 22` after the reboot reports closed
- Dietpi will not respond even after accessing the instance using [it’s cloud serial console](https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm#cloud-shell)

 ![image](https://dietpi.com/forum/uploads/default/original/2X/0/0d683b22d949c9673dbaec840a886f84ca8d1b31.png)

> **Log**
>
> [INFO] DietPi-PREP | The used kernel version is:  
> - Linux dietpi 5.10.0-16-cloud-arm64 #1 SMP Debian 5.10.127-1 (2022-06-3 0) aarch64 GNU/Linux  
> [INFO] DietPi-PREP | The following kernel images and modules have been found:  
> ls: cannot access ‘/lib/modules’: No such file or directory  
> /boot:  
> total 76K  
> drwxr-xr-x 4 root root 4.0K Aug 16 08:16 dietpi  
> -rw-r–r-- 1 root root 18K Aug 11 17:08 dietpi-LICENSE.txt  
> -rw-r–r-- 1 root root 15K Aug 11 17:08 dietpi-README.md  
> -rw-r–r-- 1 root root 16K Aug 16 08:16 dietpi.txt  
> drwxr-xr-x 3 root root 16K Jan 1 1970 efi  
> drwxr-xr-x 5 root root 4.0K Aug 16 08:15 grub  
> [OK] DietPi-PREP | Completed, disk can now be saved to .img for later use, o r, reboot system to start first run of DietPi.  
> [OK] DietPi-PREP | To create an .img file, you can “poweroff” and run the fo llowing command from the host/external DietPi system:  
> - bash -c “$(curl -sSfL [https://raw.githubusercontent.com/MichaIng/DietP](https://raw.githubusercontent.com/MichaIng/DietP) i/master/.build/images/dietpi-imager)”

How should I troubleshoot the installation when I lose access to SSH over the remote instance?

Thanks!

---

<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:** [16 August 2022 09:43 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/2 "2022-08-16T09:43:37Z")

</div>

> [@dioxide0363](#):
>
> How should I troubleshoot the installation when I lose access to SSH over the remote instance?

Does Oracle Cloud is offering some kind of web console access? Maybe you could ask Oracle Cloud guys how to access a system once SSH connection got lost

---

<div class="post-metadata">

**Author:** ![dioxide0363](https://dietpi.com/forum/user_avatar/dietpi.com/dioxide0363/32/2216_2.png) [@dioxide0363](https://dietpi.com/forum/u/dioxide0363)\
**Post date:** [16 August 2022 09:46 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/4 "2022-08-16T09:46:10Z")

</div>

- Dietpi will not respond even after accessing the instance using [it’s cloud serial console](https://docs.oracle.com/iaas/Content/Compute/References/serialconsole.htm#cloud-shell)

I just added this in the main post. So, I’m able to access the instance which is reporting healthy but the OS inside.

---

<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:** [16 August 2022 10:00 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/5 "2022-08-16T10:00:30Z")

</div>

I guess you need to check if the system has network connection and if SSH service is running.

---

<div class="post-metadata">

**Author:** ![BluishHumility](https://dietpi.com/forum/user_avatar/dietpi.com/bluishhumility/32/2382_2.png) [@BluishHumility](https://dietpi.com/forum/u/BluishHumility)\
**Post date:** [16 August 2022 16:57 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/6 "2022-08-16T16:57:13Z")

</div>

Some VPS providers ship Debian with UFW preinstalled. I’m not sure if this one does or not, but if so you might have better luck if you take it down first with `ufw disable` or similar.

---

<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:** [16 August 2022 18:22 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/7 "2022-08-16T18:22:53Z")

</div>

As I understood, he finished conversation into DietPi. Means UFW should not be installed.

---

<div class="post-metadata">

**Author:** ![BluishHumility](https://dietpi.com/forum/user_avatar/dietpi.com/bluishhumility/32/2382_2.png) [@BluishHumility](https://dietpi.com/forum/u/BluishHumility)\
**Post date:** [16 August 2022 18:24 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/8 "2022-08-16T18:24:43Z")

</div>

Oh gotcha, I did not realize the script already removes UFW.

---

<div class="post-metadata">

**Author:** ![dioxide0363](https://dietpi.com/forum/user_avatar/dietpi.com/dioxide0363/32/2216_2.png) [@dioxide0363](https://dietpi.com/forum/u/dioxide0363)\
**Post date:** [16 August 2022 18:37 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/9 "2022-08-16T18:37:36Z")

</div>

![image](https://dietpi.com/forum/uploads/default/original/2X/b/bb4ae323724830b8ac5ea6d847427d56ff68c933.png)

I found the reason for this:

This happens because dietpi, for some odd reason, removes everything inside /boot/ except /efi/, /grub/ and /dietpi/ .

All important files necessary for grub including .config, initrd.img and .vmlinuz present inside /boot/ are removed after downloading an update to those. It should not remove the latest versions. When wrapping up cleaning the system towards the end it removes the old and new versions too.

I had to manually install openssh and put those files back to boot successfully.

As you can see in the “Log” I attached in the main post above, dietpi fails to find any kernel. But interrupting the PREP command in between, putting those files back and resuming the command will correctly yield the kernel found by dietpi. (I forgot to take log this time)

Now I have a working copy of dietpi on oracle ampere arm instance.

---

<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:** [17 August 2022 16:38 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/10 "2022-08-17T16:38:33Z")

</div>

I guess @MichaIng could explain it better than I, but we don’t claim our PREP script working on each platform, cloud server or bare metal server. The script is covering the most common cases we use to build our images. Of course, there might be cases where the script is not respecting a specific package needed to be able to run on a specific environment. Especially cloud servers are quite different. 😄

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [18 August 2022 12:24 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/11 "2022-08-18T12:24:15Z")

</div>

Usually for a VPS, the VM “device” would be suitable, however, it is for x86\_64 only, currently. We aim to liberalize this to support any VM architecture.

When selecting “Generic Device” it is important to check which kernel and bootloader the original VPS images contains, and whether it is preserved by the dietpi-installer. It keeps all packages named linux-image-\* linux-dtb-\* and “u-boot” in its name, but probably for the Oracle ARM VPS this isn’t sufficient.

---

<div class="post-metadata">

**Author:** ![dioxide0363](https://dietpi.com/forum/user_avatar/dietpi.com/dioxide0363/32/2216_2.png) [@dioxide0363](https://dietpi.com/forum/u/dioxide0363)\
**Post date:** [19 August 2022 07:53 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/12 "2022-08-19T07:53:00Z")

</div>

I can confirm `debian11-cloudgeneric-amd64` works perfectly as `x86_64 Virtual Device` No need for any workaround and interrupting the PREP. However, I received [these](https://imgur.com/a/NdBJktd) errors during installation; they seem to have no effect. Obviously, x86\_64 is slow as compared to running on arch64.  
I will await for the homebrew command to be platform agnostic in the future.  
Now I have to figure out a way for dietpi to detect the ethernet controller of the instance. Any pointers that I should be looking for?

---

<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:** [19 August 2022 08:23 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/13 "2022-08-19T08:23:02Z")

</div>

> [@dioxide0363](#):
>
> Now I have to figure out a way for dietpi to detect the ethernet controller of the instance. Any pointers that I should be looking for?

As of now we expect the Ethernet adapter to be called `eth0`. Available interfaces could be checked as follow

```auto
ip a

```

---

<div class="post-metadata">

**Author:** ![amibumpin](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@amibumpin](https://dietpi.com/forum/u/amibumpin)\
**Post date:** [28 April 2023 11:45 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/14 "2023-04-28T11:45:23Z")

</div>

Sorry to up this thread, but it would be helpful if someone could share the commands to restore those files.

I’ve succesfully installed dietpi but after reboot there is no ssh access.

Thank you.

---

<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:** [28 April 2023 21:06 UTC](https://dietpi.com/forum/t/no-ssh-response-after-building-distribution-on-a-cloud-instance/13990/15 "2023-04-28T21:06:13Z")

</div>

which files you are looking for exactly
