Friday, December 23, 2011

The OS Install

My goal here is to talk about doing a basic Operating System (OS) installation so that it's ready for the installation of subsequent drivers and packages.

Originally, I wanted to install the latest version of CentOS, which is 6.2 at this time, however I ran into some issues when running the 6.2 installer. As soon as the installer went into the pretty GUI portion of the installation, the computer would freeze up. I'm pretty sure it's a kernel panic and that the issue is with the 2.6.32-220 kernel not liking the nVidia graphics card. I decided to install 6.1 x86_64 and update to 6.2 later on, without updating to the 2.6.32-220.whatever kernel. This could be an issue specific to my setup so anyone else reading this might not run into the same problem. At some point in the near future I plan on revisiting this to see if there are any updated kernels that fix this issue, but then again, I might not bother. If it ain't broke, don't fix it.

I didn't do anything fancy during the installation. I performed a basic install with the following options:
  • Minimal Desktop
  • Enable NTP
  • Disable Kdump
  • Create a user for myself

The disk partitioning ultimately wound up looking like this
[root@htpc ~]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000845ca
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         131     1048576   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             131        8486    67108864   83  Linux
/dev/sda3            8486        9530     8388608   82  Linux swap / Solaris
/dev/sda4            9530      121602   900214784   83  Linux

[root@htpc ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              63G  2.2G   58G   4% /
tmpfs                 2.0G   88K  2.0G   1% /dev/shm
/dev/sda1            1008M   59M  899M   7% /boot
/dev/sda4             846G  249M  802G   1% /var/lib
First thing I did was add the mythtv user. I may need to add additional groups to this user if I run into any permissions issues, but so far, the groups below seem to work out OK.
[root@htpc ~]# useradd -G audio,video,games,cdrom mythtv
[root@htpc ~]# passwd mythtv
I then disabled the firewall and SELinux. If you're not behind a router with a firewall, then you should probably leave the firewall enabled but you may need to do some research to figure out what, if any, ports need to be opened up for MythTV. Since everything is running on the same host, I don't think any ports will need to be opened, but I can't say for sure. SELinux is a totally different beast and I think disabling it will avoid headaches down the road. I like using vi and doing most stuff on the command line, but any text editor should work just fine.
[root@htpc ~]# vi /etc/selinux/config
(change SELINUX parameter from enabled to disabled)
[root@htpc ~]# system-config-firewall-tui
        (go through the menu to disable firewall)
Update to 6.2, without updating the kernel, due to the issue I described earlier.
[root@htpc ~]# vi /etc/yum.conf
     (put in "exclude=kernel*" under [main])
 
[root@htpc ~]# yum update
[root@htpc ~]# reboot
Setup the EPEL and ATrpms repositories
[root@htpc ~]# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
[root@htpc ~]# rpm -ivh epel-release-6-5.noarch.rpm
[root@htpc ~]# rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms
[root@htpc ~]# wget http://dl.atrpms.net/all/atrpms-repo-6-4.el6.x86_64.rpm
[root@htpc ~]# rpm -ivh atrpms-repo-6-4.el6.x86_64.rpm
[root@htpc ~]# vi /etc/yum.repos.d/atrpms-testing.repo
(change enabled from 0 to 1 under [atrpms-testing])
Update to the latest kernel in the 6.1 tree since ATrpms doesn't have modules for the stock 6.1 kernel
[root@htpc ~]# wget http://centos.vipernetworksystems.com/6.1/updates/x86_64/Packages/kernel-2.6.32-131.21.1.el6.x86_64.rpm
[root@htpc ~]# wget http://centos.vipernetworksystems.com/6.1/updates/x86_64/Packages/kernel-devel-2.6.32-131.21.1.el6.x86_64.rpm
[root@htpc ~]# wget http://centos.vipernetworksystems.com/6.1/updates/x86_64/Packages/kernel-firmware-2.6.32-131.21.1.el6.noarch.rpm
[root@htpc ~]# wget http://centos.vipernetworksystems.com/6.1/updates/x86_64/Packages/kernel-headers-2.6.32-131.21.1.el6.x86_64.rpm
[root@htpc ~]# vi /etc/yum.conf
(comment out exclude=kernel*)
[root@htpc ~]# yum install kernel*
[root@htpc ~]# vi /etc/yum.conf
(uncomment out exclude=kernel*)
[root@htpc ~]# reboot
[root@htpc ~]# yum remove kernel-2.6.32-131.0.15.el6.x86_64
And finally, install the nVidia driver. I wanted to do this as soon as possible because it slows down the speed of the GPU fan, which makes a lot of noise when it spins at full speed. I needed to blacklist the nouveau module in grub.conf since it conflicted with the nVidia driver.
[root@htpc ~]# yum install nvidia-graphics290.10 nvidia-graphics290.10-kmdl-$(uname -r)
[root@htpc ~]# vi /boot/grub/grub.conf
add "rdblacklist=nouveau vga=794" to the end of the kernel options
[root@htpc ~]# reboot
Next up, getting the capture card working in CentOS 6 ...

No comments:

Post a Comment