[Linux] XBMC Debian Clean Install.

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
darkscout Offline
Posting Freak
Posts: 2,145
Joined: Jul 2008
Reputation: 12
Post: #1
First how to... bear with me.

Instructions for how to get XBMC on Debian with minimal effort & size. Right now my home server is also my XBMC box, so I don't have any of the Power Options working nor do I have a DVD-Drive. The rest of the Ubuntu directions should work.

Get the debian business CD (~40MB) or net install CD (~150MB).
http://www.debian.org/CD/netinst/

Burn or use unetbootin to install onto a jump drive. Install as normal, very straight forward. If you only plan on using this for XBMC, you can create the default user as xbmc. Otherwise you can add the user later. Since this machine isn't only going to be used for

When you get to the spot where you can select packages uncheck them all. Finish up installation and reboot.

You don't have to do the next step, but I like to finish the rest of the install from my laptop in front of the TV, not where ever this box is. (You can also complete the regular install via SSH if you select it in the startup).
Code:
apt-get install openssh-server screen

I'm logged in as root for all of this... you could also install sudo and add the user to the sudoers file.

I don't like to see the MOTD every single I login.
Code:
touch ~/.hushlogin

Right now this is how much space is used:
Code:
debian:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             3.8G  443M  3.1G  13% /
tmpfs                 253M     0  253M   0% /lib/init/rw
udev                   10M  620K  9.4M   7% /dev
tmpfs                 253M     0  253M   0% /dev/shm

Since this is going to be a HTPC box and not a production apache server, 'unstable' is perfectly stable. I've never run into any problems running it, and it's even newer than Ubuntu for most packages.

So set that unstable packages have the highest priority:
Code:
echo "Package: *
Pin: release a=stable
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 700" >> /etc/apt/preferences

echo "APT::Default-Release "unstable";">>/etc/apt/apt.conf

You also need to add unstable repositories in addition to the debian multimedia repositories. I also don't plan on compiling anything on this machine from scratch, so I didn't add the deb-src packages.

This would be a good time to find the fastest repositories near you using netselect-apt or apt-spy.

Code:
echo "# Stable (For Volatile & Security)
deb http://ftp.us.debian.org/debian/ stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile stable/volatile main contrib non-free
# Unstable
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
# Multimedia
deb http://www.debian-multimedia.org sid main" > /etc/apt/sources.list

Update all your packages, install the debian-multimedia keys and upgrade the system.
Code:
apt-get update
apt-get install debian-multimedia-keyring
apt-get dist-upgrade --assume-yes

Reboot.

Upgrade grub from legacy grub
Code:
upgrade-from-grub-legacy
rm -f /boot/grub/menu.lst*

Remove the old kernel, unless you really want to keep it..
Code:
dpkg --get-selections | grep 2.6
linux-image-2.6-686 install
linux-image-2.6.26-2-686 install
linux-image-2.6.30-2-686 install
Code:
apt-get autoremove linux-image-2.6.26-2-686 -y

Next set of packages and why I installed them:
upstart - wave of the future. Why not? You will need to type in "Yes, do as I say!"
rungetty - used to autologin and start x.
build-essential - build stuff (like NVidia drivers...)
linux-headers-2.6.30-2-686 - used to compile NVidia drivers.
localepurge - no hablo espanol.
Code:
apt-get install upstart rungetty build-essential linux-headers-2.6.30-2-686 localepurge

So after all this, after running apt-get clean (to remove cached .debs):
/dev/hda1 3.8G 722M 2.9G 21% /

Now we need some basics... XBMC, xorg, sound.
Code:
apt-get install xbmc xinit alsa-base alsa-tools alsa-oss discover x11-xserver-utils
/dev/hda1 3.8G 759M 2.8G 22% /

This is where I differ from the hard core debian users. As 'proper' as the debian way is, NVidia has done a pretty good job of packaging up their drivers. I normally just run their installer. If I ever see a kernel update come along, I just do an uninstall/reinstall. Grab it from their website: http://www.nvidia.com/Download/Find.aspx?lang=en-us

Run the installer then run:
Code:
nvidia-xconfig -s --no-logo --force-generate

At this point you should be able to login as XBMC user, do a 'startx' then an 'xbmc' and everything should run.

You can then follow the tutorials on the rest of the website for autologin, sound, etc.

If you wish to flip between virtual X consoles and virtual consoles, you have to use Ctrl-Alt-F[1-12]. Alt-F[1-6] only works for Non Virtual Consoles when you're not in an X console (7-12).

Final system, without going hardcore and deleting man pages and uninstalling all the xserver drivers that you don't need.
/dev/hda1 3.8G 817M 2.8G 23% /

- Instructions made on VirtualBox at work, so some things may not work perfect.
(This post was last modified: 2009-10-05 20:15 by darkscout.)
find quote
avdaga Offline
Junior Member
Posts: 4
Joined: May 2010
Reputation: 0
Post: #2
First of all many thanks for the great tutorial. However, when it comes to configuring debian to use ONLY my television it was a struggle of 3 days to get it working... Eventually i got it working on ubuntu, copied the xorg.conf and put it in my debian installation.. and everything is working FINE Smile

Anyway, for those wondering what my config looks like:
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@yellow)  Fri Apr  9 11:51:21 UTC 2010

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: builtin, VertRefresh source: builtin
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "TV-0"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Option "TVStandard" "PAL-H"
Option "ConnectedMonitor" "TV"
Option "TVOutFormat" "SCART"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce FX 5200"
    Option "FlatPanelProperties" "Scaling = Centered"
    Option "UseEDID" "FALSE"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "1024x768 +0+0; 800x600 +0+0; 720x480 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Not sure if all options are necessary but IT WORKS and someone once told me never mess around with settings that work and you dont know why Tongue

CHEERS!
find quote
bracket Offline
Junior Member
Posts: 1
Joined: Sep 2010
Reputation: 0
Post: #3
I tried this on a clean install of Debian Squeeze and it is segfaulting on startup.

This is from the console when xbmc is executed:
Code:
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4154:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4633:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM default
/usr/bin/xbmc: line 88:  1183 Segmentation fault      (core dumped) /usr/share/xbmc/xbmc.bin "$@"
Crash report available at /home/tbox/xbmc_crashlog-20100923_103456.log

This is in the crashlog:
Code:
############## XBMC CRASH LOG ###############

################ SYSTEM INFO ################
Date: Thu Sep 23 10:29:13 WST 2010
XBMC Options:
Arch: i686
Kernel: Linux 2.6.32-5-686 #1 SMP Sat Sep 18 02:14:45 UTC 2010
Release:
    Distributor ID:    Debian
    Description:    Debian GNU/Linux testing (squeeze)
    Release:    testing
    Codename:    squeeze
############## END SYSTEM INFO ##############

############### STACK TRACE #################
=====>  Core file: /home/tbox/core
        =========================================
############# END STACK TRACE ###############

################# LOG FILE ##################

10:29:11 T:3023730544 M: 72523776  NOTICE: -----------------------------------------------------------------------
10:29:11 T:3023730544 M: 72523776  NOTICE: Starting XBMC, Platform: GNU/Linux.  Built on Jul  9 2010 (SVN:25498)
10:29:11 T:3023730544 M: 72523776  NOTICE: special://xbmc/ is mapped to: /usr/share/xbmc
10:29:11 T:3023730544 M: 72523776  NOTICE: special://masterprofile/ is mapped to: /home/tbox/.xbmc/userdata
10:29:11 T:3023730544 M: 72523776  NOTICE: special://home/ is mapped to: /home/tbox/.xbmc
10:29:11 T:3023730544 M: 72523776  NOTICE: special://temp/ is mapped to: /home/tbox/.xbmc/temp
10:29:11 T:3023730544 M: 72523776  NOTICE: The executable running is: /usr/bin/xbmc.bin
10:29:11 T:3023730544 M: 72523776  NOTICE: Log File is located: /home/tbox/.xbmc/temp/xbmc.log
10:29:11 T:3023730544 M: 72523776  NOTICE: -----------------------------------------------------------------------
10:29:11 T:3023730544 M: 72511488  NOTICE: Setup SDL
10:29:12 T:3023730544 M: 71864320  NOTICE: load settings...
10:29:12 T:3023730544 M: 71864320  NOTICE: special://profile/ is mapped to: special://masterprofile/
10:29:12 T:3023730544 M: 71864320  NOTICE: loading special://masterprofile/guisettings.xml
10:29:12 T:3023730544 M: 71868416  NOTICE: Getting hardware information now...
10:29:12 T:3023730544 M: 71868416  NOTICE: Checking resolution 12
10:29:12 T:3023730544 M: 71860224  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
10:29:12 T:3023730544 M: 71876608  NOTICE: Loaded playercorefactory configuration
10:29:12 T:3023730544 M: 71876608  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
10:29:12 T:3023730544 M: 71876608  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
10:29:12 T:3023730544 M: 71876608  NOTICE: No advancedsettings.xml to load (special://masterprofile/advancedsettings.xml)
10:29:12 T:3023730544 M: 71876608  NOTICE: Default DVD Player: dvdplayer
10:29:12 T:3023730544 M: 71876608  NOTICE: Default Video Player: dvdplayer
10:29:12 T:3023730544 M: 71876608  NOTICE: Default Audio Player: paplayer
10:29:12 T:3023730544 M: 71876608  NOTICE: special://masterprofile/sources.xml


############### END LOG FILE ################

############ END XBMC CRASH LOG #############
(This post was last modified: 2010-09-23 04:45 by bracket.)
find quote