Run my application on startup?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Run my application on startup?

Postby brambos » Sun Mar 08, 2015 4:11 pm

Noob alert ahead.

I am developing an application that will run on a headless Raspberry Pi2 (no monitor, no mouse, no keyboard). To get a good bootup time I want to use Arch linux instead of the standard Raspbian distro.

I'd like to know what is the proper way to automatically start my application on bootup (I will only need ALSA to run, no network, no internet, no video)?

Second question: is it harmful for Arch Linux when I shut down by cutting the power (i.e. will it corrupt the system)? I won't have a screen/keyboard so shutting down properly will be difficult...

Thanks!
brambos
 
Posts: 3
Joined: Sun Mar 08, 2015 3:22 pm

Re: Run my application on startup?

Postby WarheadsSE » Sun Mar 08, 2015 4:17 pm

yanking power on any installation with a rw rootfs is bad.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Run my application on startup?

Postby brambos » Sun Mar 08, 2015 5:29 pm

Ah ok.. I see how that could be bad in theory. But Raspberry Pies are very often used this way (as standalone internet radios, media players etc.) so I reckon there must be a way of making it relatively safe to do (or perhaps only with Raspbian?).
brambos
 
Posts: 3
Joined: Sun Mar 08, 2015 3:22 pm

Re: Run my application on startup?

Postby WarheadsSE » Sun Mar 08, 2015 6:32 pm

It isn't safe even with Raspbian. Some people are just foolhardy.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Run my application on startup?

Postby moonman » Sun Mar 08, 2015 10:02 pm

Install all the required software and make your rootfs ro, mount var and home in tmpfs , change journald storage to none and you can unplug the hell out of it ;) the only concern here is available ram and you may need to write tempfiles to recreate directories in var on boot.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Run my application on startup?

Postby brambos » Mon Mar 09, 2015 5:15 pm

That's excellent! Thanks for the pointers!
brambos
 
Posts: 3
Joined: Sun Mar 08, 2015 3:22 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 12 guests