background preloader

Raspberry Pi - run program at start-up

Raspberry Pi - run program at start-up
Anyway, I wanted to get my Raspberry Pi to start no-ip dynamic dns service when it started-up, so I wouldn't have to remember to start it every time it was powered up. For details on how to install no-ip on the Pi, see this post. There are loads of ways of running a command at start-up in Linux but my favoured approach is to create an initialisation script in /etc/init.d and register it using update-rc.d. This way the application is started and stopped automatically when the system boots / shutdowns. Create script in /etc/init.d sudo nano /etc/init.d/NameOfYourScript The following is an example based on starting up the no-ip service [/usr/local/bin/noip], but change the name of the script and the command to start and stop it and it would work for any command. #! Make script executable sudo chmod 755 /etc/init.d/NameOfYourScript Test starting the program sudo /etc/init.d/NameOfYourScript start Test stopping the program sudo /etc/init.d/NameOfYourScript stop

R-Pi Troubleshooting Back to the Hub. This page lists the most common problems and suggests some solutions. See RPi_Bugs for problems that are bugs. Power / Start-up A good power supply that will supply 5 volts and at least 1 amp (5V 1A) is vital. Note that the Pi has no BIOS, so nothing will be displayed on screen unless the Pi successfully boots! Normal LED status There are five LEDS near the USB connector. See the next sections for how to interpret other statuses. Red power LED does not light, nothing on display The power is not properly connected. Red power LED is blinking The red power LED should never blink, because it is hard-wired to the 3.3V power supply rail. Red power LED is on, green LED does not flash, nothing on display Note: A faintly glowing steady green LED means no boot code has ever been executed, as almost the first thing the boot code does is to turn the faint glow off! The Raspberry Pi cannot find a valid image on the SD card. Green LED blinks in a specific pattern Coloured splash screen xset -r #!

RPi Resize Flash Partitions This page describes activities relating to partitions on the Raspberry Pi for Linux based operating systems, such as Raspian Linux. It may also apply to other operating systems too, but you should check. Incorrectly using the following instructions is likely to corrupt your system. The prepared images for the Raspberry Pi are created for SD cards of the size of 2GB. The SD card can be resized or restructured to use the full size of a SD card that is greater than 2GB. Raspi-config If using the Raspian or Debian images the raspi-config utility can be used to resize the main partition to fill the SD card. This will happen automatically. Explanation Backup You might want to backup your SD before resizing partitions. Manually resizing the SD card on Linux Tutorial video here: Following on from the instructions above, keep the newly-written SD card in the card reader, but unmounted. Show partition information to find your SD card $ df -h Unmount the partition You're done!

Related: