Get the Ubuntu 10.04 minimal CD. It's size is only around 15 MB; all the installation will be carried over the Internet, so you'll need a decent connection. Also, the installer expects a simple wired connection (no wireless, no PPP or other VPN). An advantage of such approach is that you'll get the latest versions of all packages, meaning you won't need to update anything once done.
Code:
https://help.ubuntu.com/community/Installation/MinimalCDIf you install on a hard disk and your system has a CD drive, it's probably simplest (and fastest) to burn the image on a CD, then boot it.
If you run your HTPC off a flash drive (like I do), you might consider different approach (which will give you more room for tests and trials). First, create two partitions on the flash drive: one small for the ISO (64 MB is enough), and one large with all the remaining space. Format the first as VFAT. Download and install UNetbootin and use it to create on the small partition a bootable drive from the minimal ISO.
Next, boot your HTPC system and install from the minimal CD. If you used a small partition on the flash drive, then install to the second, large partition. Chose "Custom" install. Format the XBMC partition as EXT2.
During installation, create a user named "xbmc".
When done, reboot to get into your new system. All the rest will be carried as superuser, so first log in as "xbmc" and then acquire root privileges:
Code:
sudo bashInstall SSH. Then you can get rid of the console and happily continue working over SSH:
Code:
apt-get install sshInstall some handy tools will need later; namely, a text editor. If you're not comfortable with vi, substirute with whichever you like (pico, nano, joe etc.)
Code:
apt-get install vimInstall some basic software which we'll need later
Code:
apt-get install pkg-config python-software-propertiesAdd the XBMC PPA repository and keys, then fetch the repository data
Code:
add-apt-repository ppa:team-xbmc
apt-get updateInstall XBMC together with the X server and required utilities
Code:
apt-get install xbmc xinit x11-xserver-utilsInstall nVidia drivers. Virtually all HTPCs seem to run nVidia, so I'll stick to this path. Here we get the latest binary drivers from Ubuntu for our current kernel
Code:
apt-get install nvidia-current nvidia-settingsWe need to generate a X.org config file. We'll skip the nVidial logo
Code:
nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.confThe "xbmc" user needs to be a member of few more groups in order to use all features of XBMC
Code:
usermod --append --group audio,video,fuse,cdrom,plugdev xbmcInstall the XBMC start-up script. It will handle all the configuration required to start the X server together with XBMC upon boot (no need for auto-login any more)
Code:
apt-get install xbmc-liveInstall the ALSA (sound) utilities. Next, run the ALSA mixer and set up the desired volume levels (ESC to exit). Finally, save the configuration.
Code:
apt-get install linux-sound-base alsa-base alsa-utils
alsamixer
alsactl store 0If using a remoe control, install LIRC.
Code:
apt-get install lircIf your remote is a non-standard one (like mine), you'll need to prepare and upload your custom configuration files (in /etc/lirc), then tell XBMC how to handle the buttons (files under /usr/share/xbmc/system):
Code:
/etc/lirc/hardware.conf
/etc/lirc/lirc.conf
/usr/share/xbmc/system/Lircmap.xml
/usr/share/xbmc/system/keymaps/keyboard.xmlIf you use NFS (like I do), install the utilities needed to mount a remote NFS volume
Code:
apt-get install nfs-commonUnlock the DVD/CD drive so that it could be ejected even while playing
Code:
bash -c "echo dev.cdrom.lock=0 >>/etc/sysctl.conf"If you have MIDI-based karaoke file (.KAR files), install a soundfont (wavetable) to be able to play karaoke and make the requred links to it
Code:
apt-get install fluid-soundfont-gm fluid-soundfont-gs
mkdir -p /usr/share/xbmc/system/players/paplayer/timidity
cd /usr/share/xbmc/system/players/paplayer/timidity
ln -s /usr/share/sounds/sf2/FluidR3_GM.sf2 soundfont.sf2Since Lucid uses kernel mode setting to provide graphical boot and since nVidia proprietary drivers do not (and probably never will) support KMS, you can have a slightly nicer boot than a purely black screen by using VESA framebuffer before X starts. First, install a simple graphics theme (more are available in the standard repositories)
Code:
apt-get install plymouth-theme-ubuntu-logoInstall two programs we'll need
Code:
apt-get install v86d hwinfoThen, obtain the list of VESA modes that your card supports. Write down the highest one that has 24-bit colour (ideally, it will match your X resolution; if not will still be close to it)
Code:
hwinfo --framebufferNext, edit /etc/default/grub, find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and add before its end these parameters (if using something other than 1024x768, replace 1024 and 768 with their respective values). "24" is the colour depth, if using other, change it here too.
Code:
nomodeset video=uvesafb:mode_option=1024x768-24,mtrr=3,scroll=ywrapIn the same file, uncomment the line that begins with "GRUB_GFXMODE" and set the same resolution that you just added. Save the file.
Code:
GRUB_GFXMODE=1024x768Next, edit /etc/initramfs-tools/modules and add this line. Again, if not using 1024x768, replace with your own resolution. "24" is the colour depth, if using other, change it here too.
Code:
uvesafb mode_option=1024x768-24 mtrr=3 scroll=ywrapCreate a file named /etc/initramfs-tools/conf.d/splash and put inside this line:
Code:
FRAMEBUFFER=yFinally, update GRUB and RAMfs
Code:
update-grub2
update-initramfs -uLast but not least install two userspace utilities to handle power and volume management from userspace:
Code:
apt-get install udisks upowerYou're now ready to reboot and enjoy XBMC.
PART TWO: KERNEL TWEAKING
If you are (or, rather, your hardware is) not quite happy with the default Lucid kernel, you may have no alternative but to tweak it manually. A simple example will be hardware, which dos not like the libata subsystem, which nowadays not only handles the SATA controllers, but also the PATA (IDE) ones - not very successfully, though (a particular example will be some, if not many, nForce chipsets). Here is how to fix such small problems, which can greatly improve your XBMC experience. Be advised that the process is likely to take at least several hours and around (or more than) 1 GB of your disk space; since I run XBMC on a dedicated HTPC with limited flash disk space, I simply build the kernel on another machine and you might go this way too.
First, take a note of which kernel you currently run. (If you have just updated your kernel, reboot it first.) The kernel version will be something in the form 2.6.XX-YY-generic where XX and YY are digits (if using PAE, it will be 2.6.XX-YY-generic-pae)
Code:
uname -aBecome root
Code:
sudo bashInstall some tools needed to build a new kernel; replace XX with proper digits
Code:
apt-get build-dep linux-source-2.6.XX fakerootGet the kernel source itself; replace XX and YY with proper digits; if running PAE, use "generic-pae" instead of "generic"
Code:
apt-get source linux-image-2.6.XX-YY-genericGo to the source directory; replace XX with proper digits. If a patch to the kernel is needed, apply it now.
Code:
cd linux-source-2.6.XXCopy the kernel configuration file and use it as a base for modifications; replace XX and YY with proper digits.
Code:
cp /boot/config-2.6.XX-YY-generic .configEnter kernel configuratin mode and make the desired changes; save the configuration
Code:
make menuconfigEdit the Makefile; in the beginning, find the line starting with "EXTRAVERION" and replace whatever value it has with "-YY", replacing YY with proper digits. This will build your new kernel with he same version as the running, allowing you to reuse all existing modules and initial RAM disk.
Code:
vim MakefileBuild the new kernel and modules
Code:
make-kpkg --rootcmd fakeroot --initrd --append-to-version=-generic kernel-imageYour kernel is arch/x86/boot/bzImage (or arc/x86_64/boot/bzImage). Copy it manually to the existing installation (/boot) and add a new boot entry into /etc/grub.d/40_custom, then rebuild the GRUB configuration
Code:
update-grubIf you built new modules, copy them to /lib/modules/2.6.XX-YY/kernel/... Next, you'll have to boot and run "depmod -a"; on next reboot the new module(s) will be loaded automatically.
If you need modules to be available before mounting the root filesystem, you need to add them to the initramfs. To create a modified copy of the initramfs, follow these steps:
1. Copy the initramfs to some other directory. Add a ".gz" suffix.
2. Run "gunzip" on the file
3. Create an empty directory and "cd" into it
4. Extract the initramfs, which is an cpio archive by running "cpio -i < ../initramfs-2.6.XX-YY"
5. Copy required modules and the depmod files
6. Create a new cpi archive one level up this way "find | cpio -o -H newc > ../initramfs-new"
7. "cd" one level up and "gzip" the new initramfs. Move it to "/boot" and adjust the GRUB menu if needed.

![[Image: aeKO.jpeg]](http://i.imm.io/aeKO.jpeg)
Search
Help