Hard Code IPv4 for boot

I flashed an SD card, botoed and it grabbed a IPv6 via DHCP, which was NOT supposed to be enabled. I have since disabled IPv6, but now I am unable to get the device to show a valid IP.

I found info on how to add a network.ini file, which I did, but then it’s now no longer booting.
I am trying to figure out my options on how to get this loaded.

Assuming you are talking about trying to configure network related settings for pre-boot, as far as I know, Debian /boot folder does not accept any other network related command except one in the config.txt file with regards to mac address manipulation, aside from that, there is no network.ini file in this, are you by any chance looking an article from BMC about a file named network.ini ? this is not related to screenly/raspbian. I see that you were trying to use the boot/network.ini configuration that was supported by old screenly version, reason why I said there is no network.ini file is because the debian OS as far as I know does not use that file for networking, the screenly network manager did… sorry for confusion.

Now, about the device no longer booting, how did you disable the IPv6? was it this way?

sudo nano /etc/sysctl.conf

Add the following at the bottom of the file:

net.ipv6.conf.all.disable_ipv6=1

exit, save, and reboot.
ctrl+x, y, enter
.
Are you now not able to ssh into the Pi? what access do you currently have to it?
Because if you messed with the /etc/network/interfaces file depending what you did you might need to get physical access to it and access the console via keyboard ctrl+alt+f1

I am using a screenly image so there is no actual interface to the device. I disabled ipv6 on my Comcast router. I traced this as what was handing out the dhcp.

Screenly boots and if no network cable plugged in, it asks for WiFi info. I added this and from there I just can’t access the admin portal displayed on the screen.

The IP listed on the screen, is not accessible from ssh, browser, ping.

I have yet to look at the WiFi network to see if I am allowing ping at all.

My other option, which I am hesitant to do, is enable dhcp ipv4 on my domain controller. We have all static here now.

Dan Hoffmann

Director of Information Technology

Illinois Community Credit Union

(815)
895-7752

Dan.Hoffmann@myICCU.org | Web: myICCU.org

This Email is covered by the Electronic Communication Privacy Act, 18 U.S.C 2510-2521 and may be legally privileged. The information contained in this Email is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error please immediately notify us by telephone and destroy the original message .

Ok this is a bit confusing sorry, but lets try to isolate because this seems like something that is caused by your actual network configuration and not screenly…

I am using a screenly image so there is no actual interface to the device. I disabled ipv6 on my Comcast router. I traced this as what was handing out the dhcp.

When you say no actual interface, you mean you cant access the screen with keyboard and mouse? This is true that screenly doesn’t have interface, what I meant was network interface file, but you can access the console by pressing ctrl+alt+f1 on the keyboard connected to the Pi and it should bring up the console screen asking you to log in with default login (pi/raspberry).


You say you disabled Comcast because it was sending out ipv6 dhcp addresses, how was the Pi connected to the network in the first place? Ethernet or WiFi? because for you to get an IP from your Comcast router it must have been connected to it one way or another.

Do you want to configure it for WiFi or Ethernet?
There are a few ways to get the network configured, one easy way is first connecting to Ethernet and as you saw, the screen will show the IP it obtained on the screen, then you should be able to access that IP from a computer on the same network that allows communication between local subnets.
Reason I say this is because if you are on a network that uses a guest configuration, it probably does not allow communication between local devices and only to outgoing. This will prevent you to access the Pi if you tried to access that IP by putting it in the browser as URL.

If you are not able to ping that IP that you saw on the screen, then that is a problem that needs to be resolved on the network router first, or else you wont be able to access the screenly viewer/server to configure it.


This part confused me as well:

My other option, which I am hesitant to do, is enable dhcp ipv4 on my domain controller. We have all static here now.

If you have static IP, how did it get a ipv6 via DHCP earlier on?
Will you be using the Pi in a DHCP or Static IP environment?


After you have resolved the network issue, and you want to enable SSH for future remote access and configuration, here is an alternative easy way if you have physical access to the Pi:

Mount the SD card to a computer
Go into the /boot/ partition
Create an empty file and name it ssh or ssh.txt (case sensitive)
That's it, that system will now have SSH enabled when booted

please change the password from the default once you have SSH enabled

Either via sudo raspi-config
or typing passwd in console.

Remember root and pi should both get password changed, so typing passwd only changes it for the user that executes the command, you should also do sudo passwd so that it changes the password for root.

Wow. Lots of stuff here (thank you)

I have not tried a local key board. I did not know that was an option.

Originally I used a network cable. Removed since I don’t do dhcp.

Ultimately, id like to use WiFi. My plan is to create a pinhole to the raspberry pi to my network so I can upload media. I don’t have network jacks at my TVs.

I am stuck in a meeting (all day) and might not be able to attack this until next week.

This is fantastic info and helps already.

Dan Hoffmann

Director of Information Technology

Illinois Community Credit Union

(815)
895-7752

Dan.Hoffmann@myICCU.org | Web: myICCU.org

This Email is covered by the Electronic Communication Privacy Act, 18 U.S.C 2510-2521 and may be legally privileged. The information contained in this Email is intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error please immediately notify us by telephone and destroy the original message .

I am stuck in a meeting (all day) and might not be able to attack this until next week.

No worries, I am glad to help you figure this out when you are available.
We would still need to get as much info as possible since I have no idea how your network infrastructure is set up, which is why I try to be thorough.


I have not tried a local key board. I did not know that was an option.

It is not an option on the experimental version I believe, but I will assume you are using the production version which is the default on the image you download.


Originally I used a network cable. Removed since I don’t do dhcp.

Hmm… sorry but again I get confused, you say you are not doing dhcp, so by plugging a cable to the Pi, the only way it will get an IP is if you assign one from the router to the mac address of the Pi…


Ultimately, id like to use WiFi. My plan is to create a pinhole to the raspberry pi to my network so I can upload media. I don’t have network jacks at my TVs.

Ok, so then yes you should be able to let the Pi boot without ethernet cable, this would bring up the WiFi setup screen (the built-in wifi will be used as its own hotspot for you to be able to configure the WiFi on it), so that once it saves the info you set it to, on a reboot, it should then connect to the WiFi you configured, and then you would access it.
But if you do static IP on this network, you will need to set it up properly on the router end so that when the Pi connects to such WiFi you set, it will get the IP, or else it wont get an IP because there is no static configured on the dhcpcd5 config file, or /etc/network/interfaces.

We can for sure have the setup you want done since this is how most screenly Pi’s are set up, we just have to figure out your whole network situation.

Wow - easy setup once the network issue was fixed.
Thanks for the local keyboard suggestion.

My WIFI was setup to disable intra-wifi communications. After that was switched, the rest was easy.
I did change the passwords (thank you for that reminder)

and as a followup on the DHCP, the Comcast router had DHCP enabled and that has now been turned off. I should have been a bit more clear. My regular network is not using DHCP.

As of right now, this is working great.

Thanks to all who responded. Fast responses and good info!

1 Like

I have now setup a Private WIFI and edited the raspi-config to use that WIFI SSID and password.
That SSID is handing out DHCP, but upon PI reboot, the splash screen is still showing the Public IP.

What steps am I missing?

Growing pains…
I have this sorted now.

I reset the WIFI config via the screenly menu, then disabled the public WIFI BEFORE I restarted the Pi.
Then it didn’t have the public to fall back on and I was able to select the new private Wifi.

Well, I assume the WiFi info is saved on the configuration, and since that was the first SSID/WiFi you chose, it sort of saves it first, so when you restart the Pi, it looks for that signal (SSID) first.

If you want I can walk you through the configuration file where you can delete that SSID and leave the private one only.

If you decide you want to remove the old one, tell me what you see when you type the following:

sudo ls /etc/NetworkManager/system-connections/

Reference: https://wiki.debian.org/NetworkManager