hostname change = no boot

Having issues with your DietPi installation or found a bug? Post it here.
pictsidhe
Posts: 8
Joined: Wed Oct 21, 2015 2:20 am

Re: hostname change = no boot

Post by pictsidhe »

I've been setting up a headless pi4 for datalogging with a piplate this evening.
First attempt, I edited dietpi.txt to do a bunch of stuff and it failed to boot. One of those things was changing the hostname. I just burned a fresh image and started again, but without a lot of the stuff in dietpi.txt.
I had a lot of fun getting piplates to play. it needs python2 to run...
polishing things up after doing that, I get to changing the hostname, this time in dietpi-config.
I can no longer find it with nmap or log in to the ip it usually has.
I pull the card and put it in my laptop. etc/hosts and etc/hostname have both been changed to my new hostname. dietpi.txt has not. i change hosts and hostname back to DietPi.
Still no login :(
I'm not looking forward to redoing the piplates installation.
I did all this on a pi zero a few days ago only to discover it wasn't fast enough. The hostname change i put in dietpi.txt worked just fine, though. Something is different with the arm64 version?
Any tips on tracking this down? I have ramlog...
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: hostname change = no boot

Post by Joulinar »

Hi,

the hostname change done on dietpi.txt is applicable on first initial boot only. The value is marked with AUTO_SETUP

Code: Select all

#------------------------------------------------------------------------------------------------------
##### DietPi-Automation settings, applied on first boot of DietPi only, ONCE! #####
#------------------------------------------------------------------------------------------------------

# Hostname
AUTO_SETUP_NET_HOSTNAME=DietPi
Means it is fully correct that this was not changed while using dietpi-config

It might be best to connect a screen if your system did not boot after you have done some changes. This way we could see what happen. I doubt changing the hostname will breake your system.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
pictsidhe
Posts: 8
Joined: Wed Oct 21, 2015 2:20 am

Re: hostname change = no boot

Post by pictsidhe »

I've tried it two ways now. Both ways broke the system
1st was changing dietpi.txt before first boot. I also changed a bunch of other stuff so it could have been something else that broke that one. Though it was stuff that worked fine on a pi zero...
2nd attempt I left dietpi.txt mostly alone and used the dietpi-config utility after setting up everything else. That left DietPi as the hostname in dietpi.txt and changed it in etc/hosts and etc/hostname. I tried changing it back, but still no ssh on boot :/ the green led flickers for a while when starting up, then goes off, leaving the red one on. What else does it change other than etc/hosts and etc/hostname?
I don't have a way to hook up a screen to a pi4
I need this running for Monday, so looks like I need to do another clean install. :/

Part of getting the piplate to install was purging python3. Related?

Curiouser and curiouser, said Alice.
I think I changed ramlog to ramlog + 1 hour save while setting up, so thought it would be worth plugging it in and leaving it. Damn thing came up this time, with no changes since last attempt! Seems a good time to take an image of the card before trying anything else...
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: hostname change = no boot

Post by Joulinar »

Without screen it will be quite hard to find out what the issue of the system is.

Are you sure python 2 is needed? Because on the PiPlate docs they describe the installation for python 3 as follow
For Python3, type: sudo pip3 install pi-plates and hit <ENTER>
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
pictsidhe
Posts: 8
Joined: Wed Oct 21, 2015 2:20 am

Re: hostname change = no boot

Post by pictsidhe »

The logging software throws a bunch of syntax errors when tried with python3. I'm no python coder, so don't want to try fixing them all.
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: hostname change = no boot

Post by Joulinar »

well you should report it to PiPlate developer if there are error using Python3. This way they probably have the chance to fix it.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply