Pidora-Headless-Mode
What is headless mode?
Headless mode is a system configuration which enables access to a raspberry pi, through ssh on a network, without the use of a monitor or keyboard plugged into the raspberry pi. This mode does require another computer to ssh into the raspberry pi. When this feature is enabled, firstboot is bypassed and disabled.
Additionally, Headless Mode will enable services to read your IP Address through plugged in speakers or headphones. It will also flash the IP Address to you on the Raspberry Pi LEDs.
Enabling Headless Mode on Pidora
To enable Headless Mode, create a file named "headless" inside the boot file system on the Raspberry Pi's SD card. Create this "headless" file before you boot your Raspberry Pi.
On Linux:
Tutorial Video: http://youtu.be/ALUAmw6Mz_o
Insert the SD card into your system, and create a file named "headless" in the filesystem labelled "boot".
On Windows:
Insert the SD card into your system. Only the boot filesystem will be made available, because Windows will not be able to read other partitions on the card. Create a file named "headless" on that partition
There are two possible configurations for Headless Mode "DHCP" configuration and "Static" configuration.
DHCP Configuration
If you would like to configure the Raspberry Pi to use DHCP, leave the "headless" file empty, and the Raspberry Pi should be assigned an IP Address dynamically.
Static Configuration
If you would like to set a static, non-changing, IP Address on your Raspberry Pi, you will need to modify the "headless" file, adding an IP Address, Gateway, and Netmask, to the file for the configurations to work properly(see samples configs below).
Static Configuration: Required parameters for a Headless Mode static configuration.
IPADDR=[IP Address of Raspberry Pi] NETMASK=[Mask to define network subnet] GATEWAY=[IP Address of router/gateway]
Optional Configuration: If "RESIZE" is in the "headless" file, the root filesystem will be expanded to the maximum size of the sd card via the service rootfs-resize. If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file will be created of the specified size, and then activated.
RESIZE SWAP=[Size of swap in megabytes]
Sample Headless Mode Static Configurations
Static Configuration(without rootfs resizing or swap creation):
IPADDR=192.168.1.105 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
Static Configuration(with rootfs resizing and swap creation):
IPADDR=192.168.1.105 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 RESIZE SWAP=512
Headless Mode DHCP Configuration -- How do I find my IP Address?
Once Headless Mode has been Enabled, and the Raspberry Pi has finished booting, the IP Address of the Raspberry Pi will be read out through the speakers or headphones that are connected to the Raspberry Pi. Additionally, the IP Address will be flashed through the LED on the Raspberry Pi soon after the IP Address is read through the speakers.
1 - 9 short flashes indicate the digits 1 - 9 10 short flashes indicate the digit 0 a long flash indicates an octet separator (dot) a brief pause separates digits
For more information about IP Address reading and IP Address flashing, click here
SSH to the headless Pi
ssh root@{ip_address} Default user: root/raspberrypi
Known Bugs and Features
Two IP Addresses - When switching in between Headless Mode Configuration states, static ip to dynamic ip, or dynamic ip to static ip, both IP Addresses, from each configuration will be active for the single boot, until a reboot takes place.
Graphical Mode Not Disabled - Headless Mode does not disable X, and can run in both Run Level 3 or 5. This means that if you are not planning on using X while in Headless Mode, you should switch to Run Level 3 to save memory.