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).
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).
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.
Right now this is how much space is used:
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:
echo "Package: *
Pin: release a=stable
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.
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
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
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.
apt-get install debian-multimedia-keyring
apt-get dist-upgrade --assume-yes
Upgrade grub from legacy grub
rm -f /boot/grub/menu.lst*
Remove the old kernel, unless you really want to keep it..
dpkg --get-selections | grep 2.6
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.
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.
apt-get install xbmc xinit alsa-base alsa-tools alsa-oss discover x11-xserver-utils
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:
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.