Forum
Change what loads on startup/boot? - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: Change what loads on startup/boot? (/thread-1336.html)

Pages: 1 2


Change what loads on startup/boot? - Takenover83 - 8th Sep, 2013 11:26 AM

I have disabled XBMC starting at boot. In it's place I would like to start "emulationstation". I can launch XBMC from there. But I am unsure of what file to edit, to tell the system to boot emulationstation on startup.

Currently I am just booting to login (cli).

I tried adding the command to "/etc/rc.local", but that did not work.


RE: Change what loads on startup/boot? - mk01 - 8th Sep, 2013 01:45 PM

try creating /etc/init/emulationstation.conf with this content

Code:
#!upstart

start on filesystem and started tty1

exec /path/to/emulationstation

just be sure you don't set both emulationstation and xbmc to startup automatically. if you add following line to "/usr/local/include/xbian-config/config/services", you should be able to control manual/auto start of emulationstation the same way as xbmc - by starting xbian-config and going to services .

Code:
emulationstation:



RE: Change what loads on startup/boot? - Takenover83 - 9th Sep, 2013 10:14 AM

Sadly this is not working for me. It does add the service to xbian-config. I have selected it to auto start via xbmc. But it just doesn't start on boot.


RE: Change what loads on startup/boot? - mk01 - 9th Sep, 2013 10:29 AM

(9th Sep, 2013 10:14 AM)Takenover83 Wrote:  Sadly this is not working for me. It does add the service to xbian-config. I have selected it to auto start via xbmc. But it just doesn't start on boot.

and how are you starting it from within cli?


RE: Change what loads on startup/boot? - Takenover83 - 9th Sep, 2013 12:00 PM

just with "emulationstation". More info below.

/etc/init/emulationstation.conf
Code:
#!upstart

start on filesystem and started tty1

exec /usr/bin/emulationstation

/usr/local/include/xbian-config/config/services
Code:
xbmc:xbmc.bin
lirc:
apache2:
ssh:
transmission:
headphones:
sickbeard:
couchpotato:
sabnzbd:
sysklogd:syslogd
klogd:
nzbget:
dbus:dbus-daemon
ntp:ntpd
iguanaIR:
cron:
avahi-daemon:
nfs-kernel-server:nfsd
smartmontools:smartd
wd_keepalive:
smartd:
atd:
samba:nmbd,smbd
ifplugd:
nslcd:
nscd:
rpcbind:
mysql:mysqld
console-setup:
emulationstation:



RE: Change what loads on startup/boot? - mk01 - 9th Sep, 2013 01:44 PM

try adding

"console output"

or

"console owner"

into the /etc/init/emulationstation.conf file


RE: Change what loads on startup/boot? - Takenover83 - 9th Sep, 2013 05:08 PM

"console owner" seemed to help. But now I am getting a error.

Emulationstation is trying to create a new config directory, ~/.emulationstation and looks like it's being denied? But one already exist at /home/xbian/.emulationstation. Here is the error I see on startup. When I run the command in TTY1 I am logged in as user xbian. Not sure what user it is trying to be ran as? Either way, I would like for it to use the already made config directory and not try to create a new one. (I am guessing it's trying to create a new one for a different user besides xbian?)

Code:
Creating config directory "~/.emulationstation"
terminate called after throwing an instance of 'boost::filesystem3::filesystem_error'
what():  boost::filesystem::create_directory: No such file or directory: "~/.emulationstation"
/usr/bin/emulationstation: line 11:  1118 Aborted



RE: Change what loads on startup/boot? - mk01 - 9th Sep, 2013 05:12 PM

(9th Sep, 2013 05:08 PM)Takenover83 Wrote:  "console owner" seemed to help. But now I am getting a error.

Emulationstation is trying to create a new config directory, ~/.emulationstation and looks like it's being denied? But one already exist at /home/xbian/.emulationstation. Here is the error I see on startup.

Code:
Creating config directory "~/.emulationstation"
terminate called after throwing an instance of 'boost::filesystem3::filesystem_error'
what():  boost::filesystem::create_directory: No such file or directory: "~/.emulationstation"
/usr/bin/emulationstation: line 11:  1118 Aborted

ah ok. by default the upstart scripts are being started with UID root. add
Code:
setuid xbian
setgid xbian
chdir /home/xbian

to the .conf file.


RE: Change what loads on startup/boot? - Takenover83 - 9th Sep, 2013 05:23 PM

Still giving the same error I mentioned in post #8. Not sure why? This is what my config file currently looks like.
/etc/init/emulationstation.conf
Code:
#!upstart

start on mounted MOUNTPOINT=/home and started tty1

setuid xbian
setgid xbian
chdir /home/xbian

exec /usr/bin/emulationstation
console owner



RE: Change what loads on startup/boot? - mk01 - 9th Sep, 2013 05:45 PM

try the updated version ?


RE: Change what loads on startup/boot? - Takenover83 - 9th Sep, 2013 06:45 PM

Woa.. Didn't even notice you edited post #9. I thought you were talking about making sure I was running the latest xbian. Anywho I think I fubared the post before it dawned on me you edited the above. Can you edit it again lol. My apoligies.


RE: Change what loads on startup/boot? - mk01 - 9th Sep, 2013 08:01 PM

Code:
#!upstart

start on mounted MOUNTPOINT=/home and started tty1

env HOME=/home/xbian
env USER=xbian
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:

console owner

setuid xbian
setgid xbian
chdir /home/xbian

exec /usr/bin/emulationstation



RE: Change what loads on startup/boot? - Takenover83 - 10th Sep, 2013 09:17 AM

Using the above config causes the boot process to stall. I can't even ssh in to fix it (connection refused, guessing ssh services not started before the stall). I even started from a clean install and redid the above, to verify I did not do something wrong the first time.

Anyway to recover without restarting from scratch again? I tried switching terminals (Ctrl+Alt+F1, F2, etc..), but nothing. It's just stuck on the xbian splash screen with loading.


RE: Change what loads on startup/boot? - mk01 - 10th Sep, 2013 09:52 AM

add "init=/bin/bash" to /boot/cmdline.txt

reboot

you get root prompt. single user mode - like. put manual into the .conf file … you don't have to delete it. and meanwhile we will think about…

mk

just a question. normally you was booting into tty ? so tty was started, splash was stopped and you had login.

and now it stops before stopping splash?

you can also remove "splash" from /boot/cmdline.txt to see what is happening.

and in beta1X tty is started at end of runlevel2, what means as very last process / service. try with no splash please.


RE: Change what loads on startup/boot? - Takenover83 - 10th Sep, 2013 10:55 AM

I managed to get back into the system. Disabled splash as suggested.
Yes I was booting into tty, and logged in, and then was running emulationstation.

This is where booting stops. at the very beginning.
Code:
To dropdown to a shell, hold shift on usb attached keyboard...
Loading initram modules ...
Mounting root as: mount -t btrfs -o rw,subvol=root/@,noatime,compress=lzo,thread_pool=1,space_cache,autodefrag /dev/mmcblk0p2 /rootfs
Moving root
Switching root

If i rename "emulationstation.conf" to "emulationstation.conf.bak", booting continue's as normal.