raspberry pi installation without keyboard / mouse and hostapd access point configuration

As my home gateway I am using Raspberry PI Model B Raspberry PI Model B, which serves as gateway between internal home network and internet. I configured it to have three network interfaces, it comes with one RJ-45, I turned one usb port using USB to RJ45 another one, and second USB port is used for wireless adapter as I use it at same time as wireless access point.

Recently memory card inside it died and I had to rebuild all stuff with new card, and luckily ( at least one good thing ) same day Raspbian Jessie was released so it saved my time to do upgrade to it. If you want to download Respbian Jessie, go at this link download raspbian I will not go here in details how to transfer image to card, but tl;dr, you will need to dd it

First annoying thing when it comes to Raspberry PI and using it in my opinion is that you have to have keyboard and HDMI cable in order to connect it to see screen and proceed with configuration. I find it really bad, so I was started looking around ( at this stage I already dd-ed image to card! ) how to avoid this. You will need to do two things in order to boot Raspbian directly and connect to it via SSH without connecting to it directly.

#mkdir a
#mount /dev/sdb1 a 

Edit this file and add there ip address you want it bring up on boot. In my case I have inside my home network IP addresses from 192.168.11.X segment, so in my case I had below ( assuming my other machine had address from same network )

cat cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait ip=

Important: Ensure in above file, that ip=x.x.x.x is in same line as rest of options in cmdline.txt file, if you have new line – it will fail during boot and ip will not be up.
Unmount first partition, and mount second

 # mount /dev/sdb2 a

On this partition,edit /usr/bin/raspbi-config and change




this will ensure that there will not be interactive menu when RPI starts, it will proceed with booting, with this you will get chance to connect via ssh to machine, and you can run raspbi-config ( do not forget to revert Interactive=True ) later.

From this point, you should have access to system, connect using default user pi and password raspberry

Now, I needed to configure Edimax EW-7811un Edimax EW-7811un – Edimax web site to turn my raspberry pi into access point for wireless network. This card needs small hacking.

First, get driver from Edimax web, here is link Edimax EW-7811un driver

You will need to build driver, the whole process is listed below

#mkdir /home/edimax
#cd /home/edimax

#wget www.edimax.com/edimax/mw/cufiles/files/download/Driver_Utility/transfer/Wireless/NIC/EW-7811Un/EW-7811Un_Linux_driver_v1.0.0.5.zip
#unzip EW-7811Un_Linux_driver_v1.0.0.5.zip
#cd EW-7811Un_Linux_driver_v1.0.0.5/
#unzip EW-7811Un_USB_linux_v4.0.2_9000.20130911.zip
#cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd
#tar -xaf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
#cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812/wpa_supplicant
#make; make install

Next you will need to edit /etc/init.d/hostapd and change binary path to DAEMON_SBIN=/usr/local/bin/hostapd

configure /etc/hostapd/hostapd.conf to something like

#cat /etc/hostapd/hostapd.conf 

configure /etc/network/interfaces

#cat /etc/network/interfaces, in my case I have
auto lo

iface lo inet loopback
iface eth0 inet static
	address 192.168.XX.XXX

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
	address 10.10.XX.XX

I also configured dhcpd server to serve ip addresses to devices on wlan

# aptitute install isc-dhcp-server
# cat /etc/dhcp/dhcpd.conf

cat /etc/dhcp/dhcpd.conf 
option domain-name "elvirhome.local";
option domain-name-servers;

subnet netmask {
  option routers;

#cat /etc/default/isc-dhcp-server

I also configured bind for my internal network, I used instructions from Debian bind9 configuration with addition of some local tweaks, but instructions at this link are good to make you running bind in matter of minutes!

After this, start isc-dhcp-server,bind and hostapd services

#systemctl start isc-dhcp-server.service ; systemctl start hostapd.service; systemctl start bind9 

I have custom iptables firewall rules script, obviously you will need to write your custom to allow traffic from internal network to outside network.That would be nice homework!I might publish mine… but will need to edit it and make readable
At this stage,services should be up and running and if you try to connect from your phone, you will see wireless network with ID specified above,authenticate with password you specified, if all is ok, then connection to outside world via raspberry pi should work like a charm.


#edimax-ew-7811un, #hostapd, #linux, #raspberry-pi, #wirelles-connection

Raspberry pi

My Raspberry Pi oder was delivered couple days ago.I ordered model B and plan to connect it to NAS ( still did not decided what kind of NAS to buy … any proposal? ) and have backup system.


Service Unavailable – youtube.com

strange …



Your SysAdmin force you to use complex passwords containing small+big characters,special characters ( ones !@#$%^^&&*^% ),numbers,to protect your mail/system,and that rule make you nervous because you cannot pick up new password which satisfy requirements imposed by SysAdmin … but after some time you finally have your new password 😉 and immediately write it down to paper 🙂


Kindle Fire

Wanted to order $subject, but was stopped with (important) message below :(, so outside USA we will need to wait some time.Hopefully Amazon will fix this soon.From pictures and descriptions at Amazon seems it is nice device and definitely is on my wish-list and will buy it as soon as embargo for us outside of USA is removed 🙂

Important Message

The following items cannot be shipped to the addresses you selected. (Learn more.) You may either change the shipping addresses or remove the items by clicking Delete.

Kindle Fire, Full Color 7″ Multi-touch Display, Wi-Fi is not currently available to ship to the selected non-US address. To shop for Kindles available to ship to you, please visit the non-US Kindle product page.
Marware C.E.O. Hybrid for Kindle Fire Cover, Black cannot be shipped to the selected address.


Something is rotten in the state of Denmark

Yup, Something is rotten in the state of Denmark …