User avatar
procount
Posts: 1988
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: So looks like there's a new raspbian

Thu Mar 31, 2016 2:25 pm

Great! - so now we have a solution for NOOBS and a solution for plain Raspbian images!
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

kingosticks
Posts: 20
Joined: Mon Jun 24, 2013 9:25 am

Re: So looks like there's a new raspbian

Fri May 20, 2016 9:12 am

ShiftPlusOne wrote:With the new raspberrypi-net-mods, if /boot/wpa_supplicant.conf exists, it will be moved over /etc/wpa_supplicant/wpa_supplicant.conf. This is done through /etc/network/if-pre-up.d/01-wpa-config-copy. It may take a short while for the load balancers to sync this update.
Out of interest, where is the source for raspberrypi-net-mods? It does not appear to be available at https://github.com/RPi-Distro like the other raspberrypi-*-mods packages.

hisper
Posts: 1
Joined: Sat May 28, 2016 10:11 am

Re: So looks like there's a new raspbian

Sat May 28, 2016 11:12 am

What about a simple sollution like putting this in the partition_setup.sh:

Code: Select all

echo -e '\nnetwork={\n  ssid="MySSID"\n  psk="MyPSK"\n}' >> /tmp/2/etc/wpa_supplicant/wpa_supplicant.conf

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: So looks like there's a new raspbian

Sun May 29, 2016 6:01 pm

kingosticks wrote:
ShiftPlusOne wrote:With the new raspberrypi-net-mods, if /boot/wpa_supplicant.conf exists, it will be moved over /etc/wpa_supplicant/wpa_supplicant.conf. This is done through /etc/network/if-pre-up.d/01-wpa-config-copy. It may take a short while for the load balancers to sync this update.
Out of interest, where is the source for raspberrypi-net-mods? It does not appear to be available at https://github.com/RPi-Distro like the other raspberrypi-*-mods packages.
Note that debian (and therefore raspbian) provides its own source packages too. You can download it by running 'apt-get source raspberrypi-net-mods' (after uncommenting the deb-src line in raspi.list and running apt-get update). As for why it's not on github also, it was a simple package which didn't seem to need version control. I will put it on github the next time it's modified.

User avatar
NormanDunbar
Posts: 111
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
Contact: Website

Re: So looks like there's a new raspbian

Thu Jun 09, 2016 12:07 pm

ShiftPlusOne wrote:With the new raspberrypi-net-mods, if /boot/wpa_supplicant.conf exists, it will be moved over /etc/wpa_supplicant/wpa_supplicant.conf. This is done through /etc/network/if-pre-up.d/01-wpa-config-copy. It may take a short while for the load balancers to sync this update.
I just used this feature when I had to reinstall Jessie on my Pi 3 after getting a corruption on the sd card. I had a backup of this file and just copied it to /boot. On rebooting for the first time I had my WiFi working. Thanks.

However I didn't have my static IP etc, so I wonder how feasible it would be to have that part, only, of the /etc/dhpcd.conf file as afile in /boot too, and have the contents appended to the /etc/dhpcd.conf file in a similar manner? That way we could set up wifi and our static IPs etc in one fell swoop.

Just a thought.

Of course it would be useful to have hostname and hosts from /etc as well. (Not asking for much, am I? ) :D


Cheers,
Norm.
Why do they put lightning conductors on churches?
Why did Tarzan never have a beard?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6183
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: So looks like there's a new raspbian

Thu Jun 09, 2016 1:15 pm

NormanDunbar wrote:
ShiftPlusOne wrote:With the new raspberrypi-net-mods, if /boot/wpa_supplicant.conf exists, it will be moved over /etc/wpa_supplicant/wpa_supplicant.conf. This is done through /etc/network/if-pre-up.d/01-wpa-config-copy. It may take a short while for the load balancers to sync this update.
I just used this feature when I had to reinstall Jessie on my Pi 3 after getting a corruption on the sd card. I had a backup of this file and just copied it to /boot. On rebooting for the first time I had my WiFi working. Thanks.

However I didn't have my static IP etc, so I wonder how feasible it would be to have that part, only, of the /etc/dhpcd.conf file as afile in /boot too, and have the contents appended to the /etc/dhpcd.conf file in a similar manner? That way we could set up wifi and our static IPs etc in one fell swoop.

Just a thought.

Of course it would be useful to have hostname and hosts from /etc as well. (Not asking for much, am I? ) :D


Cheers,
Norm.
I was expecting this post a bit sooner. Many would argue that a purely static IP is obsolete and in some cases disruptive to the network. I am not sure I agree, but it's a convenient excuse. >.>

The main problem is that there is no clear line to draw and supporting edge cases leads to having /etc entirely in /boot... and why stop there?

Perhaps the more flexible solution would be a service that runs a shell script from /boot, but that would be abused worse than rc.local and is not very beginner friendly. If your setup is getting complex enough to need such things, it's better to modify the image directly. Virtualbox and linux distros are free, after all.

User avatar
NormanDunbar
Posts: 111
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
Contact: Website

Re: So looks like there's a new raspbian

Thu Jun 09, 2016 5:59 pm

Evening,
ShiftPlusOne wrote:I was expecting this post a bit sooner. Many would argue that a purely static IP is obsolete and in some cases disruptive to the network. I am not sure I agree, but it's a convenient excuse. >.>

The main problem is that there is no clear line to draw and supporting edge cases leads to having /etc entirely in /boot... and why stop there?

Perhaps the more flexible solution would be a service that runs a shell script from /boot, but that would be abused worse than rc.local and is not very beginner friendly. If your setup is getting complex enough to need such things, it's better to modify the image directly. Virtualbox and linux distros are free, after all.
thanks for the reply. I agree that it could be abused, and where do you stop, once started. However, I'm not sure that a static IP does abuse the network. All my devices are static at home, except my phone. My PIs are all static, my laptop and desktop are, the NAS, the printer - all have static IPs. On my numerous VirtualBox guest systems, they all have static too. My router is, however, configured to dish out IPs above the highest static IP plus a bit of headroom. So far, nothing has confliced. Except when my Pi Zero got the same IP as the Pi 3 - my mistake, I forgot to reconfigure appropriate bit of dhcpcd.conf from the copy I was copying in. :(

I'm an Oracle DBA by trade, so when I'm testing stuff on different Operating Systems etc, I need an IP to connect, plus Oracle gets a wee bit uppity if it's running on a host with dynamic IPs. (I don't do Oracle on the Pi though!)

I think, really, that network config is about as far as a clone of a uSD card would need to go. After all, it's nice to boot up and have everything "just working" - hence the reason I stopped at hostname, hosts and the tail end of what will be dhcpcd.conf.

It's not a major problem, obviously, just a "nice to have".


Cheers,
Norm.
Why do they put lightning conductors on churches?
Why did Tarzan never have a beard?

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: So looks like there's a new raspbian

Thu Jun 09, 2016 7:42 pm

NormanDunbar wrote:Evening,
ShiftPlusOne wrote:I was expecting this post a bit sooner. Many would argue that a purely static IP is obsolete and in some cases disruptive to the network. I am not sure I agree, but it's a convenient excuse. >.>
thanks for the reply. I agree that it could be abused, and where do you stop, once started. However, I'm not sure that a static IP does abuse the network. All my devices are static at home, except my phone. My PIs are all static, my laptop and desktop are, the NAS, the printer - all have static IPs. On my numerous VirtualBox guest systems, they all have static too. My router is, however, configured to dish out IPs above the highest static IP plus a bit of headroom. So far, nothing has confliced. Except when my Pi Zero got the same IP as the Pi 3 - my mistake, I forgot to reconfigure appropriate bit of dhcpcd.conf from the copy I was copying in. :(
For the most part* I'd advocate if you need a device to keep the same IP it's better and easier to do it from the DHCP server and leave the clients to get that address via dhcp. Depending on the DHCP server in use this also opens up the ability to set various settings (dns/ntp etc) via dhcp as well.

If you've got a number of devices to put configuration onto then it might be worth looking at the various configuration management tools out there (chef/ puppet/ ansible/ salt etc.). which will let you push configuration out to various devices.



*there are times that actually configuring the static IP on the device is required - if it's being a DHCP server being one of the few such times.

User avatar
NormanDunbar
Posts: 111
Joined: Wed Nov 23, 2011 12:13 pm
Location: Leeds, West Yorkshire, England.
Contact: Website

Re: So looks like there's a new raspbian

Fri Jun 10, 2016 9:09 pm

Evening mfa298,
mfa298 wrote:If you've got a number of devices to put configuration onto then it might be worth looking at the various configuration management tools out there (chef/ puppet/ ansible/ salt etc.). which will let you push configuration out to various devices.
Yup, I would agree with the chef/puppet/etc if I had lots of kit to deal with, but my nas and printer don't need much, my tablets are fine and fairly easy, there are one desktop, three laptops and 4 pis. It's hardly worth running chef etc just for those.

I would have liked the pi's to be auto configured at first boot, but as I said, it's not essential, just a nice to have.

Cheers,
Norm.
Why do they put lightning conductors on churches?
Why did Tarzan never have a beard?

Return to “General discussion”