Forum

Full Version: Change what loads on startup/boot?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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:
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.
(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?
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:
try adding

"console output"

or

"console owner"

into the /etc/init/emulationstation.conf file
"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
(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.
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
try the updated version ?
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.
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
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.
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.
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.
Pages: 1 2
Reference URL's