openoms / joininbox

A terminal based graphical menu for JoinMarket
MIT License
153 stars 20 forks source link

Joininbox on Raspibolt: cannot ping the Pi after rebooting #62

Closed VajraOfIndra closed 3 years ago

VajraOfIndra commented 3 years ago

I installed Joininbox on my Raspibolt using the install script (as the root user): https://github.com/openoms/joininbox#install-joininbox

At the end of the installation, the output log displayed:

###########################

The Base Image is ready

###########################

Look through / save this output and continue with: 'su - joinmarket'

To make an SDcard image safe to share use: '/home/joinmarket/standalone/prepare.release.sh'

the ssh login credentials are until the first login: user:joinmarket password:joininbox

I save the output as advised (I have most of the output log in a text file if needed, just missing the very start of it I believe). I then swapped to the joinmarket user and was asked to set up a password, which I did. If I remember well, the script did a few more things on its own and then asked for a reboot. Before rebooting, I opened a new SSH session and stopped lnd and bitcoind (just to be safe). I plugged in the Pi again but since then it does not appear in my router connected devices and I can't ping it, nor SSH into it.

My Raspibolt OS: Raspberry Pi OS Lite (32-bits)

Would using chkdsk on the Windows command line be recommended to try to find and fix issues on the SD card? Any thoughts what is the best course of action for this situation?

openoms commented 3 years ago

First of all the best would be to boot a linux OS (like Ubuntu Live USB) on your desktop to be able to read the EXT4 partition of your SDcard and be able run chkdisk from the app Disks or Gparted. Do not do it from windows.

If you card appears slow to read or write it is likely need changing. Happens often after 1-1.5 years of usage and better with the Endurance type cards we recommend for the RaspiBlitz.

You OS might not be salvageable and possibly need to reinstall. Even on the RaspiBolt your valuable data (the lnd directory) is stored (symlinked) on the disk. You can change to a 64bit OS in one go.

openoms commented 3 years ago

Can also try booting without the disk attached to try to reach the ssh server.

While on Linux: The most important is to backup your lnd directory from the disk in case of any catastrophic hardware failure. You can fully recover your LND node from that.

Cabln also try attaching an USB keyboard and press: CTRL+D as that maintenance mode sometimes blocks the boot and would appear on the screen.

VajraOfIndra commented 3 years ago

Thanks a lot @openoms for your suggestions.

So I booted a Ubuntu session on a USB and checked the SD card using Disks and Gparted. According to the test, there was no error and the file system was allright.

The card did not seem slow lately. It is a SanDisk 128GB Extreme Pro V30 Micro SD Card (SDXC), bought and first used in January 2021. From what I read about this card, it is a fairly robust one that is unlikely to have died so early in its life. But I just ordered a Samsung Endurance card as advised for the Raspiblitz and plan to use it to install a 64-bits OS and migrate my node.

I couldn't backup my LND data alone as most files were protected. I couldn't make an image of the entire disk either as I don't have a spare drive with sufficient space to store it. If you know of a way to backup the LND folder alone, I'd be happer to know.

I don't have a micro-HDMI cable or adpater and I don't have a USB keyboard so couldn't check any screen to see if the Pi booted at all or try your CTRL+D trick... I ordered both to be able to this in the future.

While troubleshooting, I found this thread that describes an issue very similar to mine, i.e. (in a nutshell) no ethernet connection after a 'reboot' instead of sudo shutdown -h now... however the trick that worked for them (unplugging and replugging the ethernet cable while the Pi is booting did not work for me. So maybe the issue is not related at all, but just wanted to report this as it might be of interest to someone.

I also realized that some people have had issues booting their Pi 4 due to a corrupted EEPROM. Just in case, I reinstalled the booter in the EEPROM by using a SD card and the Raspberry Pi Imager (following these instructions).

I'm in the process of testing if this has solved the issue.

openoms commented 3 years ago

@VajraOfIndra to backup any folder simply use sudo front of the commands to override the permissions.

Fix them later to the appropriate user for example: sudo chown bitcoin:bitcoin /mnt/ext/lnd

Once you reinstall your system it will be best to use a separate pi for joininbox (needs a 32GB SDcard only) to avoid a similar issue.

VajraOfIndra commented 3 years ago

backup any folder simply use sudo front of the commands to override the permissions I was using the Ubuntu GUI only, but I should have thought about trying this of course, thanks.

Once you reinstall your system it will be best to use a separate pi for joininbox (needs a 32GB SDcard only) to avoid a similar issue Yes, that's a good idea.

After reinstalling the booter in the EEPROM, I tried to boot the Pi with the image of my original SD card. It still doesn't work. When trying with a new OS, it does work. So it was probably not a corrupted EEPROM. So not a corrupted EEPROM, not a SD card issue, not an internet or ethernet cable issue... I suppose it could be some corruptions of the OS on the SD card then? Did you have a look at the thread linked above by the way, ever heard of that issue with the Raspbeery Pi 4?

Thanks for your help.

openoms commented 3 years ago

Unlikely to be the EEPROM. The OS is clearly corrupted on your SDcard and the cause can be the file system extension script and / or SDcard failure. You will need to reinstall your system.

I only use 32 GB SDCards, but that is unlikely to be the problem either.

You can start a root file manager in Ubuntu with: `sudo nautilus"

The script is here of you would to investigate: https://github.com/openoms/joininbox/blob/master/scripts/standalone/expand.rootfs.sh

It is part of the Raspbian image too, running on the first boot.

openoms commented 3 years ago

You can try clearing the /etc/fstab file on your SDCard to make sure the RPi is not stuck trying to mount something.

Otherwise I can only think of a directly connnected display to help debug since it not reaching the ssh server.

One more thing is you could look some logfile on the SDCard to see what the last output was. I am not sure of the filename exactly, but likely in /var/logs

VajraOfIndra commented 3 years ago

I couldn't do all the tests as you recommended as I didn't receive the microHDMI cable yet and wanted to stay offline as short as possible (so rebuilt the node on a new OS). The cause of the issue remains thus unresolved. I'll now close the issue, thanks a lot for your help!

openoms commented 3 years ago

Thanks, glad you are back online. Will comment here if I can find a likely cause.

For now the recommendation will be to either use clean system (right on top of the base image) or a tested environment like the RaspiBlitz.