Raspberry Pi NOOBS install without DHCP

Having got a Raspberry Pi and having never setup Raspberry Pi from scratch, I went ahead and proceeded to do the NOOBs install for myself. However since my Cisco switches have Spanning-Tree-Protocol enabled, it takes a while before DHCP addresses are handed out. Long enough that the NOOBS install would time out and give up without letting me continue.  The noobs install doesn’t have a reboot or shutdown function and power cycling the device causes it to go offline on the switch, which has it recheck it for loopbacks upon it starting up again.  Further more it appears if I edited /etc/network/interfaces and gave it a static IP address then rebooted, changes where lost.

To get around this, we just simply need to restart the recovery GUI.

  1. I booted up my Raspberry Pi and let the NOOBS installer fail
  2. Press ALT+F2 to switch to a virtual console
  3. login as root / raspberry
  4. Run: killall recovery
  5. Edit our interfaces file: vi /etc/network/interfaces
  6. My interfaces file looks like this, yours may vary:
    address 192.168.3.234
    netmask 255.255.252.0
    gateway 192.168.0.1
  7. Then we edit our resolver: vi /etc/resolv.conf
  8. My resolv.conf just contained a single line: nameserver 8.8.8.8
  9. I then restarted my network interface: ifdown eth0 && ifup eth0
  10. Did a quick ping test to verify everything was working: ping google.com
  11. Finally I restarted the recovery console: /usr/bin/recovery –qws
  12. At this point the recovery console started up and after a few minutes offered me my download options.

 

Although I didn’t, If you had a working DHCP server you could just do a ifdown eth0 && ifup eth0  until you get a ip address reported in ifconfig, and then restart the recovery console.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.