was successfully added to your cart.

Install Raspbian in Raspberry Pi

By April 7, 2016Uncategorized

Just install Raspbian on my Raspberry Pi 2 but I am not happy with the boot time. It boots directly to the GUI, which is something that I don’t need. So I disabled the GUI boot and timed… Found it takes a good 25 seconds to boot to the terminal. Hum… I don’t think this is good to use Raspberry Pi as a IoT device. Wonder if I can speed up the boot time…

First thing I notice is that NOOBS does takes up times during the boot. Hence, I remove the NOOBS and just install Raspbian OS directly. Raspbian install is not as straight forward as NOOBS install, and here are the steps that I do to make this work.

  • Format the SD card again with SD formatter
  • on the terminal, type diskutil list and note SD card is /dev/disk5
  • do diskutil unmountDisk /dev/disk5 to unmount the SD card
  • download the Raspbian Lite from https://www.raspberrypi.org/downloads and unzip it
  • sudo dd bs=1m if=2016-03-18-raspbian-jessie-lite.img of=/dev/rdisk5 (try bs=5m to speed up the process!)
  • It takes sometime to write the OS to the SD card.  Once this is done, eject the SD card and insert it to Raspberry Pi

After this, I found the initial splash screen is gone and it boots right away.  It takes 18 second to boot instead of 25 seconds.  That’s pretty good, but not good enough!  I will look into what services can be disabled during boot time or use Tiny OS if it is needed.

Configure Wifi Under Command Line

Now that I lost my GUI (which is a good thing,) I need to configure wifi setting under the command line.  It is pretty easy and here is how:

vi /etc/wpa_supplicant/wpa_supplicant.conf

and add the followings at bottom of the file

network={
 ssid="SSID-Name"
 psk="the-PSK-password"
 }

and then shutdown -r now to restart the Raspberry Pi to confirm wifi is working.

Interestingly enough, I found SSH to Raspberry Pi’s Wifi IP address does not work.  This seems to be a bug.  We need to add a line to ssh_config file to make this work:

vi /etc/ssh/ssh_config

and then add this line to the very end:

IPQoS cs0 cs0

Now, restart the service by entering service ssh restart

 

Leave a Reply