Kodi Community Forum
Linux HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Linux HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based (/showthread.php?tid=141369)



RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - thctlo - 2013-08-22

Hai, Im looking at your script and this is nice.
I have some suggestions to make it even more compatible with defaults installed of ubuntu ( or debian )

For example, your using "SYSCTL_CONF_FILE" aka /etc/sysctl.conf
but if you want to do it the "correct" way, and keep your settings save when upgrading, you should use the folder /etc/sysctl.d/
here you add an extra file for example like : 20-xbmc-tuning.conf with the new or extra settings.
Same for lm-sensors, rsyslog. I'm not bashing your script, please understand that, but this make your install even better.
there are several for these settings folders, just look in to it.

I have a similar script for a ubuntu/debian install of nagios3 + centreon, and im aboute to make a new one for xbmc.
If it's ok, i'll use your script as base for my install, and i'll share it when finished.

And small "maybe error" in your script. what if, if my username for xbmc is NOT xmbc, your script fails, and this simple to fix.
for example this : ( my username will be mediauser )
HOME_DIRECTORY="/home/$XBMC_USER/" ( be constistand with the / at the end or not ) ( so /home/mediauser/ )
XBMC_USERDATA_DIR=$HOME_DIRECTORY".xbmc/userdata/" still ok : /home/mediauser/.xbmc/userdata/"
XBMC_XSESSION_FILE="/home/xbmc/.xsession" wil fail... should be : XBMC_XSESSION_FILE="${HOME_DIRECTORY}.xsession"

I suggest the following ( again no bashing, just some pointers to improve the script. )
HOME_DIRECTORY="/home/${XBMC_USER}"
XBMC_USERDATA_DIR="${HOME_DIRECTORY}/.xbmc/userdata/"
due of the "${VALUE}" every thing wil be "text", and less problems with adding variables together.

some extra things to add, this is what im working on. setups scripted, with multiple player support ( use of sql database )
added download systems to the server where the database is running. ( aka adding sabnzbd, couchpotata, sickbeard, headphones, auto-sub and spotweb )
added server(+player) or player setup (with database)

when adding the "xbmc" user give give it a fixed uid/gid like for example 5001:5001
now its easy to add a shared library with mysql on multiple systems.
i added in samba on the share these parameters. ( for example )

[series]
comment = NAS Series Share
path = /home/mediauser/Series
force user = mediauser
inherit permissions = yes
read only = no
guest ok = yes

on a player, i mount this share, in the same folder as on the server.

/home/mediauser/Series
al the download programms are running with the same username, so no rights problems.

since the player also has the same xbmc username and uid/gid, you can mount it with this user.
( from fstab )
//nas/series /home/mediauser/Series cifs sec=ntlmv2,credentials=/etc/samba/smbcredentials 0 0
( smbcredentials only have username=mediauser and password=password )
al my players have the same sources.xml , so 1 setup, copy, done.

and, with this you can go fully crazy and make 1 master user and symlink all the addons to all the other players in there user.
for my living room xbmc is server and player ( and master user) , so install 1 add-on on the master and all the players get them also.
so less maintainance.

When i im ready, i'll share my script with Bram77, to see, how to even get Bram script even more "the bomb" .. !
Now, its already the bomb, but it will go nuclear .... ;-)


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - Bram77 - 2013-08-22

I know lots of improvements are possible. All of the ones you suggest. I'd already implemented using a variable for the username but then realised that the username is also being used in some of the files that will be downloaded and it would have cost too much time for me to fix that.

Please feel free to use the script for improvements. I look forward to your version Smile


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - thctlo - 2013-08-22

and a tip for unmuting all sound channels. no looking just enable them all...

## unmute all soundcards channels
for x in `amixer controls | grep layback` ; do amixer cset $x on ; done

## Set sound to 80% level.
for x in `amixer controls | grep layback` ; do amixer cset $x 80% ; done

you can check by running : alsamixer


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - sHINE98 - 2013-09-07

Hi!

I'm a bloody newbie using linux but thanks to your guide, xbmc is running fine.

However I'm having a weird problem and can't find a fix for it.

My system (foxconn nt-a3700, amd e 450 gpu) successfully goes into suspend mode but on resume, my monitor stays dark. The standby-led is even orange, so the monitor thinks there is no signal coming from hdmi. But xbmc is just resuming and running fine. I need to power cycle the monitor to get the display back.
First thought was a hardware error, but using windows 8, after resume, the monitors resuming correctly. It seems I need to reset the hdmi-connection after resume...

Tried the fix with the file 99_fglrx shown here: http://forum.xbmc.org/showthread.php?tid=116996 but it's not working since lightdm is not installed.

This problem is a big one for me cause I need to walk to my monitor each time and power cycle it manually (it has no remote control). That's not acceptable (specially for my wife Smile)

Thanks and regards from Germany
Jan


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - xkorpyon - 2013-09-23

I did evertything by the the tutorial but when i did the last part (installing the script) i get a message that my graphic card is not supported because it is a Intel/Nvidia graphic card. I have a Samsung Q 330 with NVIDIA GeForce 310M.
Does anyone know if it's true or i did something wrong?
If my graphic card is not supported can somebody give me another solution? I just want XBMC runing fast. I already tried openelec but i find it hard to configure.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - -DDD- - 2013-09-23

Hard to configure? I think its the easiest Solution für XBMC.
Do you already tried XBMCbuntu?


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - xkorpyon - 2013-09-23

(2013-09-23, 11:38)-DDD- Wrote: Hard to configure? I think its the easiest Solution für XBMC.
Do you already tried XBMCbuntu?

I tried to configure my wireless net and never made it and there aren´t many tutorials that help how to do it, at least in the new version of openelec.
I never tried XBMCbuntu. I guess is my next try.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - thethirdnut - 2013-09-24

@xkorpyon - your machine appears to be using the NVidia Optimus ___. That's essentially useless in Linux. Try to use the Intel hardware acceleration VAAPI instead.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - xkorpyon - 2013-09-24

(2013-09-24, 00:51)thethirdnut Wrote: @xkorpyon - your machine appears to be using the NVidia Optimus ___. That's essentially useless in Linux. Try to use the Intel hardware acceleration VAAPI instead.

How can i do that?

Sorry for the ignorance.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - haifischjunge - 2013-10-07

All of a sudden my xbmc became super slow, while browing mysql based listings and folders. but I dont think its server side since all other installs work fine. also nothing in the syslog or xbmc.log

even the menu bar (with tv shows, movies, videos, music etc) takes a minute to load after booting into xbmc.

any ideas?


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - n1md4 - 2013-10-07

(2013-10-07, 00:12)haifischjunge Wrote: All of a sudden my xbmc became super slow, while browing mysql based listings and folders. but I dont think its server side since all other installs work fine. also nothing in the syslog or xbmc.log

even the menu bar (with tv shows, movies, videos, music etc) takes a minute to load after booting into xbmc.

any ideas?

Post the logs any way, there might be a clue in there. I'd also check the hardware; lm-sensors, smartctl, dmesg, etc. then some network testing, ping, rsync speed, etc. that's for both the server and client, one of them might give you a clue.

Failing that ... rebuild an option, or perhaps try a live version, as a process of elimination.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - un1versal - 2013-10-08

My bet its the databases vs sources not being available on boot.


RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - hetch6 - 2013-10-08

hey guys

im getting this error a lot when booting into my minimal ubuntu xbmc install (ubuntu 13.04)


""serious errors were found while checking the disk drive for /MEDIA2"" (/dev/sdc3)

to cut a long story short, they partition /dev/sdc3 and all my other internal mechanical hhd partitions are being mounted twice. Once where they're supposed according to fstab, and secondly in the /media folder eg.../dev/sdc3 is being mounted at /MEDIA2 and also at /media/usbhd-sdc3

I remembering seeing the /usdhd-sdc3 partition when initially setting up sources...

what i think is happening is fsck is trying to check /MEDIA2 but it's already been mounted at /media/usbhd-sdc3.

has anybody else had this issue, or have any ideas on resolving it?

here's my fstab..

Code:
xbmc@xbmc:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=f7767ada-f636-4983-9888-9491484ec5c4 /               ext4    errors=remount-ro 0       1
# /MEDIA was on /dev/sdb1 during installation
UUID=b52ed08d-2eca-425f-ac80-3fcfd781b0f8 /MEDIA          ext4    defaults        0       2
# /MEDIA2 was on /dev/sdc3 during installation
UUID=34dc11ad-bf6d-4874-8ae6-6aaa5eade523 /MEDIA2         ext4    defaults        0       2
# swap was on /dev/sdc1 during installation
UUID=ac801b6f-ed4a-4f21-bf86-40e8ce8ed2c2 none            swap    sw              0       0



RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - n1md4 - 2013-10-08

Same results when you set <pass> to 0 for your media drives?



They're regular HDDs too?

Code:
apt-get install smartmontools
smartctl -i /dev/sdb|grep "Device Model"
smartctl -i /dev/sdc|grep "Device Model"



RE: HOW-TO: Automated efficient XBMC install - Ubuntu 12.10/13.04 mini based - hetch6 - 2013-10-09

thanks for the reply..

I'd imagine setting <pass> to 0 would stop any errors as that stops the fsck at boot?

I have 3 drives in my system
- 80gb SAMSUNG SSD 830 Series
- 2tb WD green WDC WD20EARX-00PASB0
- 3td WD red WDC WD30EFRX-68AX9N0

i've just had two successful consecutive boots...i checked the mount after each boot
first boot...
Code:
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-27-generic i686)

* Documentation:  https://help.ubuntu.com/
Last login: Wed Oct  9 03:04:26 2013 from 192.168.1.11
xbmc@xbmc:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sdc2 on /media/usbhd-sdc2 type ext4 (rw,relatime)
/dev/sdb1 on /MEDIA type ext4 (rw)
/dev/sdc3 on /MEDIA2 type ext4 (rw)

no double ups in that boot....

next boot.....
Code:
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.0-27-generic i686)

* Documentation:  https://help.ubuntu.com/
Last login: Wed Oct  9 10:32:55 2013 from 192.168.1.11
xbmc@xbmc:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sdc2 on /media/usbhd-sdc2 type ext4 (rw,relatime)
/dev/sdc3 on /media/usbhd-sdc3 type ext4 (rw,relatime)
/dev/sdb1 on /MEDIA type ext4 (rw)
/dev/sdc3 on /MEDIA2 type ext4 (rw)
/dev/sdb1 on /media/WDRED type ext4 (rw,relatime)

as you can see sdc3 and sdb1 have both been mounted twice.......bizarre stuff!!
any ideas?