Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

May 1, 2012

Home Server Moving to Ubuntu


The Home Server

After running Fedora 10 (EOL'ed Decemter 2009) on my home server for over three years, it's time to upgrade to a newer distro. For better, long-term security supports, CentOS 6 (6.2 is the latest as of the writing) was my 1st candidate to replace the old system, with five more years support till 2017.  I'd like to do it green so burning CDs thing is not an option! With netinstall ISO images populated to the Grub startup options, along with full DVD ISOs mounted as an HTTP share from another temporary web server, we're ready to have fun. My home server is a 12-year old Acer TravelMate 341 equipped with Pentium III 500 MHz CPU and 192 MB RAM. Albeit trivial from today's hardware spec, it still fits my needs like running Web, DHCPd, routing/firewalling/tunnelling, and even SETI'ing.

Acer TravelMate 341, bought in Y2K.

Now What?

I got an error message saying not enough memory to install CentOS after booting the installer.  Even it's listed in the release notes of CentOS 6.2 as a known issue that the installer needs at least 392 MB of memory to work, I still have no idea why a simple task like installers do needs that much of memory.  It SUCKS!



Back in 2009, I replaced all my Fedora desktops to Ubuntu desktop edition because of the Ubuntu superiority but being an RHCE I still want to keep servers running Red Hat distros for some reasons.  But not any more.

Precise Pangolin

Per hardware requirement of Ubuntu 12.04 Server edition, 64 MB is minimal so we're fine with 192 MB. The light-weighted text mode installer looks elegant and the installation took some time less than an hour for the legacy laptop as the whole process is somehow IO bound. Here we have latest kernel 3.2 running on vintage hardware.

More tech info follows:

CPU info:

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 8
model name      : Pentium III (Coppermine)
stepping        : 1
microcode       : 0x2
cpu MHz         : 498.977
cache size      : 256 KB
   :
[Removed for brevity]

Top 10 memory consumers:

top - 07:16:09 up  8:54,  1 user,  load average: 0.68, 0.65, 0.68
Tasks:  66 total,   1 running,  65 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.6%us,  0.6%sy, 31.9%ni, 67.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    183888k total,   158572k used,    25316k free,     3952k buffers
Swap:   352252k total,     6028k used,   346224k free,    50496k cached

 PID  USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 6336 hub       39  19 37104  34m   16 S 31.6 19.4  15:51.47 setiathome_6.03
  907 mysql     20   0  319m  30m 3404 S  0.3 17.2   2:55.00 mysqld
 1055 www-data  20   0 35088 8396 2704 S  0.0  4.6   0:58.57 php-cgi
 6909 hub       20   0  9108 5920 1524 S  0.0  3.2   0:03.28 bash
 4007 hub       20   0 15296 3984 2752 S  0.6  2.2   0:53.95 boinc
  912 snmp      20   0  9984 2928 1736 S  0.0  1.6   0:20.72 snmpd
 6777 root      20   0  9600 2928 2328 S  0.0  1.6   0:00.44 sshd
 6902 hub       20   0  9600 1820 1212 S  0.1  1.0   0:00.06 sshd
  988 www-data  20   0  5792 1772  704 S  0.0  1.0   0:04.42 lighttpd
  891 dhcpd     20   0  5068 1552  968 S  0.0  0.8   0:00.09 dhcpd


The welcome message:

Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic-pae i686)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue May  1 06:08:14 CST 2012

  System load:  0.38              Processes:           67
  Usage of /:   19.6% of 5.24GB   Users logged in:     0
  Memory usage: 17%               IP address for eth1: 192.168.XX.XX
  Swap usage:   1%                IP address for ppp0: XX.XX.XX.XX

Jun 26, 2011

HD DVB on Ubuntu 10.04 (Lucid)

After three years of HD DVB pre-casting, PTS (公視)finally announced the broadcast of Hi Definition DVB channel - HiHD to the center of Taiwan in June 2011 (we still got pre-casting in northern Taiwan tho).  Since HD video is encoded in H.264 and as expected the set-up boxes I'm using do not support this codec.  Buying a new STB with HD capability seems not practical for the time being as HD channels are too few and I've had two STB's already.  Last weekend, bought a NT-500-bucks USB DVB-T tuner from the 3C store nearby, which is an UPMOST DVB190 with a small, cute antenna. The antenna is not required in this case as  I'll use the one from current STB, which has much better reception.  The Ubuntu version used is 10.04 (Lucid), not only it's a long-term-support (LTS) version, but also the rtl2832u driver support and stability of resolution switch between the laptop and TV set is much better than the buggy 11.04 (Natty). A few to-do list items follow:

Driver for UPMOST DVB190

It uses a Realtek rtl2832u chip and the driver found on the net is really picky to kernel version. Compiling it on kernel 2.6.32-32 on Lucid 10.04 is pretty straightforward (see instructions here), on the contrary it's a pain on kernel 2.6.38 on Natty (11.04). I think the rtl2832u driver will be included in the newer kernel in future Ubuntu releases. Compiling the driver is really a crazy thing for end-users.

% dmesg | grep DVB
[ 9.888197] dvb-usb: found a 'DK mini DVBT DONGLE' in warm state.
[ 9.889937] DVB: registering new adapter (DK mini DVBT DONGLE)
[ 9.890441] DVB: registering adapter 0 frontend 0 (Realtek RTL2832 DVB-T)...
[ 9.890508] dvb-usb: DK mini DVBT DONGLE successfully initialized and connected.
[ 9.890530] dvb-usb: found a 'DK mini DVBT DONGLE' in warm state.
[ 9.892786] DVB: registering new adapter (DK mini DVBT DONGLE)
[ 9.893250] DVB: registering adapter 1 frontend 0 (Realtek RTL2832 DVB-T)...
[ 9.893316] dvb-usb: DK mini DVBT DONGLE successfully initialized and connected.


ALSA driver update

Unfortunately HDMI audio output is broken in Ubuntu 10.04 (but it works on 11.04). The workaround loading ALSA module manually in /etc/pulse/default.pa does NOT work for me. The quickest way to fix this is updating the ALSA driver from dev repos, which will update ALSA from version 1.0.21 to 1.0.24.

sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
sudo apt-get update
sudo apt-get install linux-alsa-driver-modules-`uname -r`

Reboot to confirm the ALSA update works:

$ grep Version /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.24.


VLC update

I used to run MPlayer for video playback but it's clumsy playing the DVB HD stream with MPlayer. Also tried me-tv, which can do video recording and EPG stuff, pretty cool. But I got the error *Failed to lock to channel* from time to time and it drives me crazy. VLC is our best alternative for now, but it's kinda outdated in Ubuntu 10.04. Need to update it manually:

sudo add-apt-repository ppa:lucid-bleed/ppa
sudo apt-get update
sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc


DVB channels list

The DVB channels list is consolidated from the web and I renamed the channel names in the first column from Chinese to English. Save the list to channels.conf as follows:

PTSHD:569000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2001:2002:200
FTVHD:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:3041:0:304
CTV:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1001:1002:100
CTVN:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1011:1012:101
CTVE:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_1_2:FEC_AUTO:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_8:HIERARCHY_NONE:1021:1022:102
PTS:545000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2011:2012:201
DIMO:545000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2021:2022:202
HAKKA:545000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2031:2032:203
FTV:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:3001:3002:300
FTVT:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:3011:3012:301
FTVN:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:3021:3022:302
TTV:581000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4001:4002:400
TTVN:581000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4011:4012:401
TTVE:581000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:4021:4022:402
CTS:593000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:5011:5012:501
CTS2:593000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:5021:5022:502
CTS3:593000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:5031:5032:503


Finally, run VLC from the command line to watch the DVB programs:

$ vlc channels.conf


Here's a list of key hardware and software used in this case:
  • HDTV - which can do HD 1080p
  • Laptop - ASUS U35J
  • USB DVB-T tuner - UPMOST DVB190 (w/ Realtek rtl2832u chip)
  • Ubuntu 10.04 (Lucid) and 11.04 (Natty) - with latest patch level
  • VLC 1.1.10
  • MPlayer 1.0rc4-4.4.3
Have fun!

Image 1. UPMOST DVB tuner (left) and the HDMI output (right)

 Image 2. FTV HD channel screenshot (1920x1080)

May 10, 2011

RDP v7 over Wine

Got a chance to test out the RDP v7 client shipped in Windows 7 over Wine 1.3.19. The RD gateway (connect from anywhere) is the key feature i need but it seems it's supported in NT 6 (at least 6.1 for Win7) and later.


Configure the OS version to Windows 7 with winecfg does not help, or maybe worse, as all I got is the error complaining missing .MUI files even the .mui counterparts of mstsc.exe and mstscax.dll were provided in the same or en-US, en-US.utf8 folders.


Feeding Wine with the .dll required by mstsc still shows no luck. Let's wait and see if later version of Wine could fix it or not.