All,
I had a couple things i wanted to contribute this is mainly for those going the SSD route: (of course the scripts can be used by anyone)
1) In bios disable ERP, then enable wol enable ACHI
I've been reading a lot and as far as speed, and prolonging the life of the SSD here is what i did:
2) Align the EBS (I think im going to start using gpt, as everyone says fdisk is deprecated) This is how i did it for my box, if your using fdisk you can find directions all over the net. You have to use another boot disk or another linux box to do this
a) sudo gdisk /dev/sdX
b) o
c) p
d) n
e) 1
f) 2048
g) +26400M (or what ever size you want)
h) 0700
i) p
j) n
k) 2
l) <enter>
m) <enter>
n) 8200
o) p
p) w
This gave me
Number Start (sector) End (sector) Size Code Name
1 2048 54069247 25.8 GiB 0700 Linux/Windows data
2 54069248 62533262 4.0 GiB 8200 Linux swap
3) next you need to format these partitions
sudo mke2fs -L root -t ext4 -E stripe-width=128 /dev/sdb1
sudo mke2fs -L swap -t swap -E stripe-width=128 /dev/sdb2
4) Install from the bootable thumbdrive and select openssh
You will also need to do a manual partitioning (you have to set the 1st partition as / and the second as swap it will want to format swap that is fine, but leave the first partition alone)
*** HINT some people have issues with the boot loader installing on the thumbdrive instead of the SSD so after youve booted up and started the install pull the thumbdrive)
5) When its done it will reboot
log into the box via ssh
you can use speed and joshs setup info and perform a lot more steps or copy and paste these into sh files and do it automatically (alternately you can put them on your thumbdrive and plug it back in)
once you have cut and pasted the two parts below
do
sudo chmod +x part1.sh
sudo chmod +x part2.sh
6) run the scripts
./part1.sh
this one will ask you about configuring something (do what you like i just pick no configuration, this is for the SMART stuff to email you i believe)
7) The machine will reboot when its done ssh back into the box and run
./part2.sh
This one will prompt you to unmute stuff simply press the M and the esc
then it will ask for the xbmc user password (pick your own)
then it will let you change runlevels and disable services (anyone have any suggestions for what to pick) or you can leave it default and exit by pressing q
When it reboots you should be looking at XBMC in nice 1080p with sound over hdmi
9) OK, lets get the latest Nvidia drivers now... (currently 260.19.36 (released 1/21/2011)
log in via ssh again... and type the following commands at the prompt
wget
http://us.download.nvidia.com/XFree86/Li....19.36.run
sudo stop xbmc-live
sudo sh ./NVIDIA-Linux-x86_64-260.19.36.run
Accept
Yes
Yes
OK
Yes
OK
reboot
or sudo start xbmc-live
9) Lets edit a few more things now (for the sake of our SSD)....
sudo vim /etc/fstab
changed my root ext4 partition look like this
UUID=a8fb128e-86c2-4998-b4e8-46a107f6bb42 / ext4 errors=remount-ro,discard,defaults,noatime 0 1
added a tempfs (ramdisk) to the end of file add
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
***NOTE
tmpfs is supported by the Linux kernel from version 2.4 and up.[3] tmpfs (previously known as shmfs) allocates memory dynamically and allows swapping out less-used pages to swap space. To prevent "out of memory" situations, tmpfs enforces a maximum filesystem size,
this limit defaults to half of the available RAM.[4] The limit can be set at mount time, for example:
mount -t tmpfs -o size=1G,nr_inodes=10k,mode=0700 tmpfs /space
would mount with a 1 GiB limit with 10240 inodes and only accessible by the owner of /space. The filesystem's maximum size can also be changed on-the-fly, like "mount -o remount,size=2G /space". /var/run and /var/lock can be tmpfs filesystems, to alleviate having to clean them up at each reboot.
NOTE***
sudo vim /etc/sysctl.conf
add
vm.swappiness=1
to the bottom of the file
vim /etc/rc.local
add
echo noop > /sys/block/sda/queue/scheduler
before
exit 0
if your running firefox
firefox puts its cache in your home partition. By moving this cache in RAM you can speed up Firefox and reduce disk writes. Complete the previous tweak to mount /tmp in RAM,
and you can put the cache there as well.
Open about:config in Firefox. Right click in an open area and create a new string value called browser.cache.disk.parent_directory. Set the value to /tmp.
Now you should be optimized for speed and longevity of your SSD
before anyone asks (not bad i think)
SSD ONYX (older one says 125 on the package)
sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1932 MB in 2.00 seconds = 966.39 MB/sec
Timing buffered disk reads: 358 MB in 3.02 seconds = 118.69 MB/sec
Old 80gb hdd
sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1920 MB in 2.00 seconds = 960.56 MB/sec
Timing buffered disk reads: 256 MB in 3.01 seconds = 84.92 MB/sec
For the scripts only paste what is BETWEEN the *'s (sorry i dont have anywhere to host them)
part1.sh
*******************************************************
#!/bin/sh
sudo apt-get -y install python-software-properties pkg-config vim smartmontools gdisk
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo add-apt-repository ppa:team-xbmc-svn/ppa
sudo add-apt-repository ppa:tldm217/tahutek.net
sudo apt-get update
sudo apt-get -y install apt-fast
sudo apt-fast -y install xbmc xinit x11-xserver-utils nvidia-current sysv-rc-conf upower preload alsa-utils
wget
http://launchpadlibrarian.net/59511828/cgroup_patch
chmod +x cgroup_patch
sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf
echo 'options snd-hda-intel enable_msi=0 probe_mask=0xfff2' | sudo tee -a /etc/modprobe.d/sound.conf
sudo reboot
*******************************************************
part2.sh
*******************************************************
#!/bin/sh
echo change all MM to 00 by pressing the M key then press esc
sudo alsamixer
sudo alsactl store 0
sudo adduser xbmc --gecos XBMC
sudo usermod --group audio,video,fuse,cdrom,plugdev xbmc
sudo apt-fast -y install xbmc-live
echo '[Actions for xbmc user]' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'Identity=unix-user:xbmc' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'Action=org.freedesktop.devicekit.upower.*;org.freedesktop.consolekit.system.*' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'ResultActive=yes' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'ResultAny=auth_admin' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'ResultInactive=yes' | sudo tee -a /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
echo 'pcm.hdmi03 {' |sudo tee -a /home/xbmc/.asoundrc
echo ' type hw' |sudo tee -a /home/xbmc/.asoundrc
echo ' card 0' |sudo tee -a /home/xbmc/.asoundrc
echo ' device 3' |sudo tee -a /home/xbmc/.asoundrc
echo '}' |sudo tee -a /home/xbmc/.asoundrc
echo 'pcm.!default hdmi03' |sudo tee -a /home/xbmc/.asoundrc
echo If you want to delete services you dont do that next then press q to quit
sudo sysv-rc-conf
sudo reboot
*******************************************************
NOW do you want native bluray support
OK then go here:
http://forum.xbmc.org/showthread.php?tid=95425
I'll try and clean this up over time...
JOSH: you downlaoded and chmod +x cgroup_patch
but i didnt see you run it? (does a script run it? or did you just skip something?)...and what is it?
let me know if anyone finds any issues!
Update: in case anyone is interested Im now playing a full blueray iso...
top - 00:13:51 up 9 min, 1 user, load average: 0.47, 0.55, 0.34
Tasks: 131 total, 1 running, 128 sleeping, 0 stopped, 2 zombie
Cpu(s): 5.1%us, 2.1%sy, 0.0%ni, 91.8%id, 0.1%wa, 0.0%hi, 1.0%si, 0.0%st
Mem: 4059076k total, 3474260k used, 584816k free, 1172812k buffers
Swap: 4232000k total, 0k used, 4232000k free, 1379480k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1307 xbmc 20 0 738m 193m 53m S 27 4.9 2:30.67 xbmc.bin
1926 xbmc 20 0 706m 519m 6504 S 4 13.1 0:16.54 makemkvcon
654 root 20 0 0 0 0 S 2 0.0 0:06.07 hd-audio0
1601 root 20 0 18276 1296 704 S 2 0.0 0:06.26 mount.ntfs