Page 1 of 1

/etc/network/interfaces keeps reverting to dhcp (BerryBoot)

Posted: Mon Sep 28, 2015 10:01 am
by wocketpatch
Greetings, I have BerryBoot installed which is working great for me, but with one problem. I can't figure out how to set a static IP address under BerryBoot. Normally I would go to a command prompt and add the static information into /etc/network/interfaces -- but when I do this from the console under BerryBoot, the interfaces file reverts back upon reboot, or if I use ifup -f

Note that I make the edits with vi, and then afterward I verify the settings I entered have been saved by viewing them with the command cat /etc/network/interfaces and I see that my changes are there. But when I look again after restarting or trying to establish connection, the file has reverted back to its original contents.

Is there another way to set the static IP in BerryBoot, or is there something else I'm missing?
Thank you!

Re: /etc/network/interfaces keeps reverting to dhcp (BerryBo

Posted: Mon Sep 28, 2015 11:49 am
by KLL
berryboot seems to overwrite /etc/network/interfaces

i fix the ip for the berryboot at
cmdline.txt
smsc95xx.turbo_mode=N elevator=deadline quiet bootmenutimeout=10 vncinstall ipv4=192.168.1.101/255.255.255.0/192.168.1.1

this allow me to PC vnc headless the berryboot boot menu with 192.168.1.101
and select the OS to boot...

in the OS i install
sudo apt-get install xrdp
vncserver :1
first time need newpasswd newpasswd n
( after reboot need auto start config )
and start with
PC vnc headless 192.168.1.101:1 newpasswd

Re: /etc/network/interfaces keeps reverting to dhcp (BerryBo

Posted: Wed Sep 30, 2015 9:25 am
by wocketpatch
Thanks for the response! I don't need vnc or to be headless, but I did try the ipv4 entry in cmdline.txt, both with and without the vncinstall preceding. This didn't seem to affect anything -- it still has the ip address from DHCP, which does work, but I want the address to be specific so I can SSH from memory without having to look up the current assigned address. Do I need to specify the adapter somehow? I'm just using eth0

Re: /etc/network/interfaces keeps reverting to dhcp (BerryBo

Posted: Wed Sep 30, 2015 9:33 am
by RaTTuS
I know nothing about berryboot
but to change your IP to be static - change it on your router - so that your router always gives it the same address

Re: /etc/network/interfaces keeps reverting to dhcp (BerryBo

Posted: Wed Sep 30, 2015 4:25 pm
by wocketpatch
If I have to do it that way, I can.. but unfortunately my router only allows me to assign IP addresses permanently via DHCP if the address is within the alotted DHCP block. DHCP is set to assign addresses from 10.0.0.10 - 10.0.0.99 but the address I want to give to the pi is 10.0.0.152

Obviously it wouldn't be the end of the world to just give it an address within the alotted range, but I'd rather stick to the addressing scheme I've been using, and seems like I ought to be able to. I am interested in this cmdline.txt solution, but it doesn't seem to do anything for me. Is there perhaps a step I'm missing? Does anyone else have the ipv4 command working in cmdline.txt with berryboot?

Thanks again.

Re: /etc/network/interfaces keeps reverting to dhcp (BerryBo

Posted: Sat May 20, 2017 8:36 am
by coderx
I think you'll find this helpful:
https://askubuntu.com/questions/157154/ ... -on-reboot

You need to stop requesting the dns from dhcp.