Difference between revisions of "User:Esev/LinuxMCE Install Notes"

From LinuxMCE
Jump to: navigation, search
(Misc tweaks)
Line 93: Line 93:
 
After rebooting, video display will be lost.  See [[AV_Wizard_Step_by_Step#Section_II|Section II of the AV Setup Instructions]].  In my case, I needed to press '3' for Component video.
 
After rebooting, video display will be lost.  See [[AV_Wizard_Step_by_Step#Section_II|Section II of the AV Setup Instructions]].  In my case, I needed to press '3' for Component video.
  
==== Misc tweaks ====
+
==== Reconfigure the DNS Server ====
 
Add the following to /etc/bind/named.conf.forwarders
 
Add the following to /etc/bind/named.conf.forwarders
 
   forwarders {10.234.32.194;};
 
   forwarders {10.234.32.194;};
 
   forward only;
 
   forward only;
  
 +
==== Boost MySQL's RAM ====
 
The core has lots of RAM.  Give more to MySQL to make it run faster.  Edit /etc/mysql/conf.d/lmce-my.cnf and add
 
The core has lots of RAM.  Give more to MySQL to make it run faster.  Edit /etc/mysql/conf.d/lmce-my.cnf and add
 
   innodb_buffer_pool_size=256M
 
   innodb_buffer_pool_size=256M
  
 +
==== Adjust the firewall rules ====
 
Add the firewall rules: Advanced>Network>Firewall rules
 
Add the firewall rules: Advanced>Network>Firewall rules
* Allow ports 80, 3306, and 22.   
+
* Allow ports 80, 3306, 5900, and 22.   
 
* Then remove the iptables line that was added to /etc/rc.local
 
* Then remove the iptables line that was added to /etc/rc.local
  
Add MySQL users
+
==== Add MySQL users ====
 
   USE mysql;
 
   USE mysql;
 
   GRANT ALL PRIVILEGES ON pluto_main.* TO 'HADesigner'@'10.234.32.XXX' IDENTIFIED BY 'password';
 
   GRANT ALL PRIVILEGES ON pluto_main.* TO 'HADesigner'@'10.234.32.XXX' IDENTIFIED BY 'password';
 
   GRANT ALL PRIVILEGES ON *.* TO 'eric'@'10.234.32.XXX' IDENTIFIED BY 'password';
 
   GRANT ALL PRIVILEGES ON *.* TO 'eric'@'10.234.32.XXX' IDENTIFIED BY 'password';
 
   FLUSH PRIVILEGES;
 
   FLUSH PRIVILEGES;
 +
 +
==== Install x11vnc ====
 +
apt-get install x11vnc
 +
to start: x11vnc -display :0
  
 
=== MythTV Setup ===
 
=== MythTV Setup ===

Revision as of 03:20, 17 October 2010

Install Core/Hybrid

I think the kernel that ships with 0810 is too old for my hardware. Several devices need updated drivers. These drivers need to be placed onto a USB drive before beginning. You can view all the hardware for my setup on the LinuxMCE Setup page.

Boot the Snapshot DVD

These instructions were created for 0810 snapshot 23326. When booting from the DVD, change the kernel options to include "all_generic_ide" http://ubuntuforums.org/showpost.php?p=5436513&postcount=7

Create four partitions

  1. 500MB ext3 for /boot
  2. 4GB swap
  3. 200GB ext3 for /
  4. Rest of the drive XFS for /home

First Boot

Get the primary network card (eth0) working

 # Using a USB drive, copy the drivers for r8168, r8169, e1000, and hid to /root/drivers
 # extract, compile, and install the r8168 driver
 depmod -a /lib/modules/`uname -r`/kernel/drivers/net/r8168.ko
 rmmod r8169
 modprobe r8168
 /etc/init.d/networking restart

Install sshd so I can complete the installation from the comfort of my couch

 apt-get update
 apt-get install openssh-server

More driver installs

 # Replace the buggy r8169 module so it doesn't incorrectly auto detect my primary network card
   make
   cp r8169.ko /lib/modules/`uname -r`/kernel/drivers/net/
   depmod -a /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko
 # Install the driver for the secondary network card (eth1) (e1000e driver)
   cd src && make install
   modprobe e1000e
 # Install the updated HID driver to support the Gyration_GYR4101US remote
   make
   cp hid.ko /lib/modules/`uname -r`/kernel/drivers/hid/
   depmod -a /lib/modules/`uname -r`/kernel/drivers/hid/hid.ko
 # Rebuild initramfs
   echo "r8168" >> /etc/initramfs-tools/modules
   update-initramfs -uvk `uname -r` | tee ~/updateinit.txt

Setup a RAID 1 across both drives

First install mdadm

 apt-get install mdadm

Then follow the directions here making the changes noted below.

 # /dev/md0 is sd[ab]1 - /boot
   mdadm -C /dev/md0 -n2 -l1 -e1 missing /dev/sdb1
   mke2fs -j -L boot /dev/md0 
 # /dev/md1 is sd[ab]5 - swap
   mdadm -C /dev/md1 -n2 -l1 -e1 missing /dev/sdb5
   mkswap -L swap /dev/md1
 # /dev/md2 is sd[ab]6 - /
   mdadm -C /dev/md2 -n2 -l1 -e1 missing /dev/sdb6
   mke2fs -j -L root /dev/md2
 # /dev/md3 is sd[ab]7 - /home
   mdadm -C /dev/md3 -n2 -l1 -e1 missing /dev/sdb7
   mkfs.xfs -f -l size=64m -d agcount=4 -i attr=2,maxpct=5 -L home /dev/md3

Inside the /dev/md2 chroot, replace /etc/fstab with

 LABEL=root /               ext3    relatime,errors=remount-ro 0       1
 LABEL=boot /boot           ext3    relatime                   0       2
 LABEL=home /home           xfs     relatime,allocsize=512m    0       2
 LABEL=swap none            swap    sw                         0       0

Use the LABEL=root in the grub kernel arguments too

 title           Ubuntu 8.10, kernel 2.6.27-17-generic - drive 1
 root            (hd0,0)
 kernel          /vmlinuz-2.6.27-17-generic root=LABEL=root ro quiet splash                               
 initrd          /initrd.img-2.6.27-17-generic
 quiet
 
 title           Ubuntu 8.10, kernel 2.6.27-17-generic - drive 2
 root            (hd1,0)
 kernel          /vmlinuz-2.6.27-17-generic root=LABEL=root ro quiet splash
 initrd          /initrd.img-2.6.27-17-generic
 quiet

Adding /dev/sda to the RAID array takes around three hours to complete on my 1TB drives

Temporarily disable the firewall

When LinuxMCE is installed, it firewalls connections coming from the primary interface (eth0). Before installing, add the following to /etc/rc.local

 /sbin/iptables -P INPUT ACCEPT

This will be removed later after things are installed and the firewall can be properly configured from the web interface

Install LinuxMCE

At this point, the 0810 Installation Instructions can be followed.

AV Setup Wizard

After rebooting, video display will be lost. See Section II of the AV Setup Instructions. In my case, I needed to press '3' for Component video.

Reconfigure the DNS Server

Add the following to /etc/bind/named.conf.forwarders

 forwarders {10.234.32.194;};
 forward only;

Boost MySQL's RAM

The core has lots of RAM. Give more to MySQL to make it run faster. Edit /etc/mysql/conf.d/lmce-my.cnf and add

 innodb_buffer_pool_size=256M

Adjust the firewall rules

Add the firewall rules: Advanced>Network>Firewall rules

  • Allow ports 80, 3306, 5900, and 22.
  • Then remove the iptables line that was added to /etc/rc.local

Add MySQL users

 USE mysql;
 GRANT ALL PRIVILEGES ON pluto_main.* TO 'HADesigner'@'10.234.32.XXX' IDENTIFIED BY 'password';
 GRANT ALL PRIVILEGES ON *.* TO 'eric'@'10.234.32.XXX' IDENTIFIED BY 'password';
 FLUSH PRIVILEGES;

Install x11vnc

apt-get install x11vnc to start: x11vnc -display :0

MythTV Setup

LinuxMCE does not have information about the cable providers in my area, so I need to hand-modify a few parameters to get things working properly.

  • For each of the tuner cards, go to the Antenna port and set the source to 1. This sets the source to be the LMCE-Default source, a dummy source that is supposed to just be a place holder for cards which are not yet configured.
  • Launch the MythTV setup and go into 3. Video sources. Down arrow and choose LMCE-Default. Set it up with my schedulesdirect account. Now the dummy LMCE-Default source contains valid data and will be used with the Antenna ports of my cards.