Sunday, June 19, 2011

Aspire ONE (Model 0751H) GMA500 widescreen display setup on Fedora 14

Before installation of the problematic Poulsbo driver on Ferdora 14 (freshly installed), please try the followings first:

$ su -c 'yum clean all'
$ su -c 'yum update'

Reboot to let the updated kernel running.

Install rpmfusion free and non-free repositories rpms:

$ su -c 'yum localinstall --nogpgcheck \
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

Thanks to AdamW's articles, the correct steps are listed here:

To install Poulsbo driver:

$ su -c 'yum –enablerepo=rpmfusion-nonfree-updates-testing \
install xorg-x11-drv-psb'

To fix the problem of missing psb.ko for whatever updated kernel:

$ su -c'yum –enablerepo=rpmfusion-nonfree-updates-testing \
install akmod-psb'

Reboot to take effect for widescreen display.

Optimize the following sections in /etc/X11/xorg.conf:

Section "Device"
Identifier  "Videocard0"
Driver      "psb"
Option      "IgnoreACPI"
Option      "MigrationHeuristic" "greedy"
Option      "ShadowFB" "true"
EndSection

Section "Extensions"
Option     "Composite" "Enable"
EndSection

Section "Screen"
Identifier "screen1"
Device "Videocard0"
DefaultColorDepth 24
EndSection

Section "DRI"
Mode 0666
EndSection

Edit /etc/grub.conf as follows:

Add the following parameters to the end of line of kernel command:

elevator=noop mem=896m acpi_osi=Linux acpi_backlight=vendor

Reboot and see if the system performance is improved.

Friday, June 17, 2011

An Open Source version of RedHat Enterprise Linux

I have been looking for other alternatives which mimics or offers free version of Enterprise OS like RedHat Enterprise Linux. Two of them have been found so far, like CentOS and Scientific Linux.

RHEL6 has been released for a while but CentOS didn't quite catch up with the latest version of RHEL, so I turned to use Scientific Linux which has version 6 now. Also, the fancy of SL6 may be due to its support by famous national laboratories around the world, such as Fermilab and CERN. These labs are working on high energy physics and make use of SL6 inside their IT infrastructure.

SL6 is actually rebuilt from the source RPMs of RHEL6. People are working on security fixes and put them upstream back to RedHat repository. This makes SL6 binary compatible with RHEL6. Now I use SL6 on my Aspire ONE netbook as well.

The good thing that I have experienced is the high quality of software packages as compared with other open source edition of Linux which may crash and make your system useless in some occasions. You may not obtain the latest update in time but the stability and reliability offered by typical enterprise class system is certain.
Although "Scientific" is not a cool name to me, it is surely a good choice of enterprise class OS in production environment.

Site reference:
http://www.scientificlinux.org/

Wednesday, June 1, 2011

User Privileges for MySQL administration and automation

To automate MySQL administration like using auto backup script, the user privileges play an important role on how MySQL server to be control with enough security measures to prevent mis-using such user role.

Assuming "mysqldump" and "mysqladmin" are going to be used in such automation, the following privileges should be clearly identified and applied to a particular user role for successful MySQL administration:


  • SUPER
  • SELECT
  • SHOW DATABASES
  • SHOW VIEW
  • LOCK TABLES
  • RELOAD
  • SHUTDOWN
  • PROCESS
  • REPLICATION SLAVE
  • REPLICATION CLIENT

Example of assigning privileges:
>c:\xampp\mysql\bin\mysql –u –p –-port=3306
Enter password: ************

mysql>CREATE USER ‘replica’@’localhost’ IDENTIFIED BY ‘password’;
mysql>GRANT REPLICATION SLAVE ON *.* TO ‘replica’@’localhost’;


For details of particular privilege, please refer to the manual page:
http://dev.mysql.com/doc/refman/5.5/en/privileges-provided.html

Converting EXT3 partition into EXT4 on Ubuntu

EXT4 type partition is the successor of EXT3, but it may not be turned on by default installation. Indeed, EXT4 driver is backward compatible with EXT3/EXT2 partition. The conversion from EXT3 to EXT4 partition is straight forward.

Please backup important data and software you have been using on Ubuntu Linux.

BEFORE DOING ANYTHING, PLEASE SHUTDOWN ALL LAMPP RELATED PROCESSES:
$ sudo /opt/lampp/lampp stop
To switch the existing Ext3 file system to the new Ext4 driver, it is necessary to edit a configuration called "fstab":
$ sudo nano /etc/fstab
Look for ext3 on the line that defines your disk and change it to ext4.

To ensure the right device to be converted, you may check the name of the device by issuing the following command:
$ df -h

Make a note of the device as you will need it in the next step. In the example above, the device for the encrypted partition is "/dev/mapper/encrypted".

Next reboot your system. This is required so that you switch to the Ext4 Kernel driver. Do not continue without rebooting first.

Enable Ext4 features:
$ sudo tune2fs -O extents,uninit_bg,dir_index /dev/mapper/encrypted
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!

After running this command (specifically, after setting the uninit_bg parameter), it is also important to run fsck to fix up some on-disk structures that tune2fs has modified:
$ e2fsck -yfDC0 /dev/mapper/encrypted
Notes:

Running fsck will complain about "One or more block group descriptor checksums are invalid" - this is expected and one of the reasons why tune2fs requests to fsck.
By enabling the extents feature new files will be created in extents format, but this will not convert existing files to use extents. Non-extent files can be transparently read and written by Ext4.
If you convert your root filesystem ("/") to ext4, and you use the GRUB boot loader, you will need to install a version of GRUB which understands ext4. Your system may boot OK the first time, but when your kernel is upgraded, it will become unbootable (press Alt+F+F to check the filesystem).
If you do the conversion for the root fs on a live system you'll have to reboot for fsck to run safely. You might also need to add rootfstype=ext4 to the kernel's command line so the partition is not mounted as ext3.

WARNING:
It is NOT recommended to resize the inodes using resize2fs with e2fsprogs 1.41.0 or later, as this is known to corrupt some filesystems.
If you omit "uninit_bg" on the tunefs command, you can skip the fsck step.

Installing open-vm-tools on Ubuntu Guest VM

To help boost the performance of Ubuntu Guest VM, it is recommended to install VMware tools. The problem is it may not fully compatible with various release of Ubuntu. Ubuntu do have their own repository of Open VM tools for use. So, why not have a try on it?

Installing open-vm-tools from Ubuntu repository:

The VMware tools are part of open-vm-tools. Make sure that the "multiverse" repository is enabled and do:

Install kernel headers so modules will work
We need this on a 10.04 guest running in a Fusion 3 host
$ apt-get install linux-headers-virtual
Install kernel modules
$ apt-get install --no-install-recommends open-vm-dkms
EITHER: install tools for an xorg install
$ apt-get install open-vm-tools
OR: a headless install
$ apt-get install --no-install-recommends open-vm-tools

Direct Upgrade Ubuntu from 9.04 to 9.10

Ubuntu upgrade from 9.04 to 9.10 can never be easy like this:

Before the actions, it is essential to backup any running database and web server for disaster recovery and then turn them off completely.

You can easily upgrade over the network with the following procedure.

1. Start System/Administration/Update Manager

2. Click the Check button to check for new updates.

3. If there are any updates to install, use the Install Updates button to install them, and press Check again after that is complete.

4. A message will appear informing you of the availability of the new release.

5. Click Upgrade.

6. Follow the on-screen instructions.

Finally, reboot the system and see all changes.

There was compatibility issue regarding XAMPP package since people complained they couldn't get XAMPP based server startup after the reboot. In my case, it did happen before. In recent trial of GUI upgrade directly from Ubuntu Update Manager, the problem seems to be solved. I have even got another notice from Update Manager about Ubuntu upgrade to version 10.04 as well.