Changes

Jump to: navigation, search

Pidora-Headless-Mode

830 bytes added, 15:50, 29 April 2014
Known Bugs and Features
{{Pidora}}[[Category:Pidora 18 (Raspberry Pi Fedora Remix)]]
{{Admon/important | Notice |Headless mode = What is currently a experimental feature, updates to headless mode and current issues can be found below}}? =
== What is {{Admon/important| Security Warning! | If you are going to use headless mode? ==it is critical that you change the root password as soon as possible, because Pidora is set with a default root password that is publicized.}}
Headless mode is a system configuration in which the display deviceenables access to a raspberry pi, keyboardthrough ssh on a network, without the use of a monitor or mouse is lackingkeyboard plugged into the raspberry pi. This mode does require another computer to ssh into the raspberry pi. When this feature is enabled, [[Pidora 18 Firstboot|firstboot]] is bypassedand disabled.
{{Admon/important| Security Warning! | If you are going 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 use headless mode it is critical that you change on the root password as soon as possible, because Pidora is set with a default root password that is publicizedRaspberry Pi LEDs.}}
== Enabling headless mode Headless Mode on Pidora ==
To enable headless modeHeadless Mode, you will need to create a file named "headless" in inside the boot filesystem file system on your the Raspberry Pi's SD card ''. Create this "headless" file before'' you insert the card into boot your Raspberry Pi.
'''== Enable Headless Mode 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".
'''== Enable Headless Mode On Windows=={{Admon/important| Note | If you are using a Windows OS you will need to remove the .txt file extension on the headless file.[http:'''//www.ehow.com/how_6394953_create-file-extension.html More information on removing file extensions on eHow]}}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
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 There are two possible configurations for Headless Mode "DHCP" configuration and "headlessStatic" on thatconfiguration.
{{Admon/important| Note | == DHCP Configuration == If you are using a Windows OS you will need would like to remove configure the .txt file extension on Raspberry Pi to use DHCP, ''leave the "headless " fileempty'', and the Raspberry Pi should be assigned an IP Address dynamically.[http://www.ehow.com/how_6394953_create-====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-extensionresize.html More information on removing If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file extensions on eHow]}}will be created of the specified size, and then activated.
There are two possible configurations for headless-mode "DHCP" configuration and "Static" configuration. RESIZE SWAP=[Size of swap in megabytes]
=== DHCP Configuration =How do I find my IP Address? ====
If you would like 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 obtain an ip address dynamically via DHCPthe Raspberry Pi. Additionally, leave the "headless" file emptyIP Address will be flashed through the LED on the Raspberry Pi soon after the IP Address is read through the speakers.
=== Static Configuration === 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
If you would like to specify a specific [https://github.com/ctyler/ip-info/blob/master/README.md For more information about IP address you will need to include the Address reading and IP Addressflashing, Netmask and Gateway, place the following information in the "headless" file:click here]
=== Sample headless file Static Configuration ===
IPADDR=192If 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).168.1.105 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
== Headless Mode is enable with DHCP -- How do I find out my ip-address? ==Required Configuration====
After you have enabled headless mode with either the DHCP configuration or Static IPADDR=[IP configuration, the ip address that has been assigned to Address of Raspberry Pi will be played through the speakers '''2 minutes''' after you have powered the Raspberry Pi, and '''30 seconds''' later it will also flash your ip address through Pi's OK] NETMASK=[Mask to define network subnet] GATEWAY=[IP Address of router/ACT LED.gateway]
[https://github.com/ctyler/ip====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-info/blob/master/READMEresize.md More information about ip-read If "SWAP"(requires the value in megabytes) exists in the "headless" file, a swap file will be created of the specified size, and ip-flash]then activated.
RESIZE SWAP== Headless Mode Script Update ==Initially there were a few issues with dchp and headless mode since our release the headless script has been updated. It has not been officially added to the updates repo yet but, if you are interested [Size of swap in trying this mode out now you can copy and replace the old headon script with the updated one located at /usr/bin/headonmegabytes]
#!/bin/bashheadless=`ls /boot/headless* 2> /dev/null | head -n 1`echo "Sample Headless Mode Enabled"if [ -e "$headless" ]then systemctl enable sshd.service systemctl start sshd.service systemctl stop firstboot-graphical.service systemctl disable firstboot-graphical.serviceConfigurations =
headtext=`grep '[0-9]' "$headless"` if [ "$headtext" != "" ] thenBelow are sample configurations, they may require you to enter valid ip information specific to the network you are running it on.
ip_address=$===Static Configuration(sed -n 's/without rootfs resizing or swap creation)==== IPADDR=//p' $headless)192.168.1.105 ip_netmask=$(sed -n 's/ NETMASK=//p' $headless)255.255.255.0 ip_gateway=$(sed -n 's/ GATEWAY=//p' $headless) swap_size=$(sed -n 's/SWAP=//p' $headless)192.168.1.1
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0===Static Configuration(with rootfs resizing and swap creation)==== IPADDR=$ip_address192.168.1.105 NETMASK=$ip_netmask255.255.255.0 GATEWAY=$ip_gatewayBOOTPROTO=static192.168.1.1ONBOOT=yes RESIZENM_CONTROLLED SWAP=yesEOF512
systemctl restart NetworkManager.service====Dynamic Configuration(with rootfs resizing and swap creation)==== RESIZE SWAP=512
else= SSH to The Headless Pi =
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0 Default User: rootDEVICE=eth0 Default Password: raspberrypiBOOTPROTO=dhcpONBOOT=yesNM_CONTROLLED=yesEOF ssh root@{ip_address}
fielse systemctl stop headless-mode.service systemctl disable headless-mode.servicefi= Known Bugs and Features =
#Check headless file ====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 resize optionthe single boot, until a reboot takes place.
#Check headless file for resize ====Graphical Mode Not Disabled====Headless Mode does not disable X, and swap optiongrep -iE 'resize|swap' $headlesscan 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.
if [ $? -eq 0 -a ! -f https://fedoraproject.resized ]then touch org/.rootfs-repartition touch wiki/Systemd#How_do_I_change_the_target_.resized echo $swap | grep -o '[0-9]*' > /28runlevel.swap rebootelse#resized already remove resize flag if it exists rm -f /29_.rootfs-repartition rm -f /3F For more information about changing Run Levels on Pidora, click here.swapfi]
#read ip address====Slower Boot====systemctl start ip-readWhen running headless mode, the speed of the boot is slowed down, this is due to a network change during boot.service#flashing ip addresssystemctl start ip-flash.service
198
edits

Navigation menu