Saturday, September 25, 2010

PCLinuxOS Progresses Undeterred


If computer is your hobby, you will, sooner or later, run into Linux. Cos only Linux (not Mac, Windows or any other OS) gives you that power to tweak/tinker, virtually every bit and piece of the OS. That's why there are so many distributions, so many forks, spins, respins, and multitude of application software for a single task. No surprise, many hobbyists come, wander in the linux world, but a few really stick to it, rest go. Cos? Not all the distributions are polished, stable, easy and powerful. Most often sticking to linux depends on hitting a good no-nonsense distribution (like PCLinuxOS, Mint or Mepis) at the first chance. IMO, PCLinuxOS tops the list of distros that care for new-converts.

PCLinuxOS is one that compelled me to stick to Linux. Of course, I'd been exposed to linux from RedHat 5, but that was a compulsion from the then employer. Putting Linux on my home desktop started with PCLinuxOS, way back in 2005. A lot has been changed ever since: numerous desktop wannabe distributions have come up, kernel/userland has gone through a sea change, GNU applications have seen many increments. Similarly, PCLinuxOS development and participation have undergone much changes. First mis-considered as a Mandriva fork, PCLinuxOS has developed a personality of its own. Some devs/projects (granular, pclosbe, intux, sam, unity) have forked away. Some alleged the way PCLinuxOS develops, saying it dictatorship managed, orthodox.. bla...bla... But seems all that have happened for good. It's become unique; taken the best pieces from the linux world and put them together like no one has done before.

My Linux love started with PCLinuxOS though these days I dabble more with Debian, CentOS and SuSe. It's official compulsion. But when it comes to recommending a distro to someone interested in Linux I utter "PCLinuxOS", it comes to my tongue as a reflex. I am so used to it!

Well, enough prophesy. Now onto something current with it. I have started liking PCLinuxOS ever more for a few reasons. They are:

#1 Multiple Flavors: KDE is the flagship and default desktop environment for PCLinuxOS. And I am happy to see that though it lags (for good) a few numbers back in kernel and userland, it keeps abreast with the KDE4 increments. The latest quarterly update was a joyride. Previously skeptic on KDE4 moves, I fell for it on its 4.5.1 iteration. What tremendous amount of efforts gone into making it! In addition to KDE, there are half a dozen of variants including gnome and lxde. Seems they are also getting enough polishing. If you like PCLinuxOS, desktop environment is not a matter of concern. Download a variant you like or pull in the meta package of that DE from pclinuxos repo. Either way you will have success. Rest assured, you won't face any glitches that you generally expect from a so called bleeding edge desktop.

#2 PCLinuxOS magazine: These days PCLinuxOS has bringing out its monthly magazine regularly religiously. I am sure it won't win a FOSS award for the literature. But it has a lot to make us mortals happy and engaged in Linux. The mag has a systematic approach to teach newbies essential commandline magic, use/management of popular desktop environments and developments specific to PCLinuxOS. It has those fun stuff elements also that you expect from a community or school magazine.

#3 Development Decisions and Friendly Forum: PCLinuxOS's sheer care for consumer desktop becomes evident from its development and discussions. Keeping close to kde4 development, choosing bfs over cfs, and listening to members' (at times packaging for them) queries are a few of the activities that prove it. It may not be the best FOSS distro.. It may not punch opensource nouvau... It may not jump to the nascent kernel, but it makes sure that your piece of graphics, sound, printer or wireless device work as painlessly as possible. It might never have shown off the reflected-glory of banning non-free bytes, but it makes sure that you won't waste your precious time fighting with your hardware.

Sunday, September 19, 2010

Linux: How to Replace Grub2 with Grub Legacy

RHEL 6 Beta 2 is still pushing grub legacy forward. No doubt it's going to stay with RHEL for some couple of years more. It somehow gives a little hint that grub2 is still little too complicated and experimental. However, if you are not that panicky Redhat/Centos person, you will get grub2 imposed upon you. Because the the rest of the distributions in Linux world has already been moved to grub2 land of boot configuration.

If you are one among those looking to replace grub2 with grub legacy, follow the few steps to achieve just that. The steps here pertain to Debian Testing, Ubuntu, Mint and other Debian/Ubuntu derivatives. You might have to change the steps as per your special distribution and its packaging system.

  • Open a terminal, be the super user - sudo su if you are using Ubuntu and the likes, su for pure debian and the rest
  • Remove grub2 - apt-get remove grub-pc
  • Instal grub legacy - apt-get install grub
  • Install grub in MBR or wherever you think appropriate for your condition - grub-install /dev/sdx (replace "x" with appropriate character as per your partition tree)
  • Update grub legacy - update-grub

Have a look at my menu.lst (click on the screenshot below) file in grub legacy on Ubuntu Lucid setup. Is not it simple and sane?

Saturday, September 18, 2010

Red Hat Certification for RHEL 6

Red Hat Hat has already rolled out two betas of its next major enterprise linux - RHEL6. It's been very late - almost twice the time (18-28 months) mentioned in RHEL 5 product document. It will still take considerably time pushing the release date to the end of 2010 or the beginning of 2011. Because rolling out a release is not the only thing, the big "E" in RHEL demands for certification, and Red Hat is pursuing certification for its next major Linux OS and virtualization.

Red Hat is paving the way for government agencies and enterprises to use its new technology to create secure, virtualized IT environments (KVM) and private clouds. The company is also into an agreement with Atsec information security to certify Red Hat Enterprise Linux 6 under Common Criteria at Evaluation Assurance Level 4. The certification covers the KVM hypervisor that enables an OS to run virtually without the need for a physical server, reducing the number of energy resources a data center requires. It also takes SELinux along with virtulization to ensure virtual resources run in separate containers.

Red Hat already has achieved Common Criteria certification 13 different times on four different Linux platforms. Alongside acquiring those certifications, Red Hat has also a lot to do in relation to RHEL 6 training, deployment and hardware compliance with many vendors and partners.

Saturday, September 11, 2010

Linux, Google, Android and Mobile Devices

Based on the Linux kernel and GNU software, Android is the most popular (33% of all units sold) mobile (smartphone) operating system of our time. developed by Google and is based on the Linux kernel and GNU software.

Under the Hood

Linux might still be a playground for hobbysts. But linux-drived software are going places. Deep inside Android software stack consists of Java applications on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Among others android has put together the surface manager, OpenCore, SQLite, OpenGL ES 2.0, WebKit, SGL, SSL and Bionic libc, very well. In all it consists of 12 million lines of code - 3 million lines of XML, 2.8 million lines of C, 2.1 million lines of Java, and 1.75 million lines of C++.

The Reception

With a decent beginning 2007, Android has attracted maximum attention from users, mobile handset manufacturers and software developers. The reception of Android has been the warmest. Till date there are 70,000 apps approved for it and some 100,000 have been submitted. Open Handset Alliance, a consortium of 78 companies (including Texas Instruments, Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel, T-Mobile, PacketVideo, ARM Holdings, Atheros Communications, Asustek Computer Inc, Garmin Ltd, Softbank, Sony Ericsson, Toshiba Corp and Vodafone) is devoted to advancing open standards for mobile devices through Android.

Sunday, September 5, 2010

How to Install/Run Turbo C/C++ IDE on Linux

Borland Turbo C/C++ IDE is not the best, not at all recommended on production floor. But it's still the mainstay in majority of schools and colleges, especially in India. GCC/G++ on linux is better for hardcore programming. However, from a beginner's perspective, it lacks those nice contextual buttons/menus and interface of Borland Turbo C/C++ IDE.

Thanks Dosbox! You can install/run Turbo C/C++ IDE on linux too. Just follow these steps.

#1 Install Dosbox

Installing dosbox is a child's play.
If you are running Debian or Ubuntu, open the terminal as a root user and enter:
apt-get install dosbox

If you are running Red Hat, Centos or Fedora, open the terminal as root user and enter:
yum install dosbox

#2 Download Turbo C/C++ IDE

Google a bit, and you will easily find Turbo C installers for Windows/DOS in a zipped archive format.

#3 Extract Turbo C/C++ Archive in your home (~) directory

#4 Run (Alt+F2) Dosbox or open dosbox from programs menu (it sits generally under Applications > Games)

#5 Mount your home (~) in root



Inside dosbox type:
mount c ~


#6 Move to the extracted "Turbo C" directory



Type:
c:
cd TURBOC~2



then:
install

It will start the setup. Follow the ncursed instructions to install as shown in the screenshots below.



Just press Enter to continue installation.



Enter C in the "Enter the source drive to use:" option.



Accept defaults and Press F9.



Press any key to continue with the installation





Turbo C/C++ IDE Installation is complete

#7 Running Turbo C/C++ on Linux

Run/open dosbox. Enter the following one by one in the dosbox terminal



mount c ~
c:
cd tc\bin
tc.exe



Turbo C is running on Linux

Saturday, September 4, 2010

Low Cost Linux Netbooks - the Future of Mobile Computing


The trend in technology is towards being ultraportable. Netbook is one such example. It is notebook made ultraportable suiting primarily to the mobile net-users. Many call these computers as subnotebooks as they retain the looks and features of notebooks, with some vital change done in hardware sections such as low powered CPU, energy efficient boards, less display size and lightweight. Owing to its scalability and open-source nature Linux is sitting almost all the major brands of netbooks. Of course, Windows is trying hard to catch up.

Right from the inception in 2007 to this date, linux has shipped on 32% of netbooks. Netbooks have sparked the development of several spins from major distros such as Ubuntu, Fedora and Suse. Examples include Ubuntu Netbook Edition, EasyPeasy, Jolicloud and Moblin.

Asus is the pioneer in introducing the Eee PC series netbooks and it has been reaping the benefits of an early-starter. Its success led other makes such as Acer, Intel, MSI, Dell and Samsung among others to build their versions of netbooks.

While some netbooks found their way into the lives of busy/mobile executives, others have been a student's pride possession for being cheap, rugged, highly power efficient and portable. OLPC and Intel Classmate PC are two such examples.

With Intel still innovating its Atom series of ultramobile processors and AMD keeping up the pace with its Nano series, netbook market has still a lot potential to show. However, Linux will find centerstage in this Intel-AMD fight for ultramobile dominance.

Speeding Up Debian GNU/Linux Desktop - Extreme Performance Tweaks

Why does a desktop, be it Linux or Windows, feel slow?

Because it tries to satisfy all - the vast majority of hardware and the varied requirements of a thousand different users. Result - heavier and sometimes heavily patched kernel, always running and sometimes never used services, and the unperceivable eye-candy that you don't care. Ok, now let's get on to the just right, optimized linux desktop. In the last post we have already talked how to do it on Windows).

SITUATION

  • Desktop hardware: D945GCLF essential board with Intel Atom 230 CPU embedded. 1GB physical RAM.
  • Operating System: Fully updated Debian GNU/Linux Lenny 5.0.5 with custom recompiled kernel

Note: Click on the screenshots to see their real sizes.

STEPS

Boot

Change boot timeout in /boot/grub/menu.lst to "0" if you've only one OS installed. I've changed timout to "2" and set default to "1" because my wife needs Windows in autoboot mode. Also, you should add "noresume" (if you don't boot from a resume/rescue partition) in the boot options to speed up booting a little further.



Filesystem

The default filesystem parameters in Linux lean more towards security/stability sometimes hampering performance. You can set "data_writeback" option to all the partitions using tune2fs utility, and add "noatime" option in /etc/fstab. It will speedup the file system.



As you can see in the above screenshot there is no entry for "swap" in my fstab. I've deliberately removed swap partition after observing no use for it on my bare usage. You may also delete the swap, if you have enough RAM (more than 1GB) and you never notice it to run out. Removing swap and using only physical memory speeds up overall responsiveness to a great extent.

Services

The please-all attitude of linux distributions make a default install littered with lots of services. You can disable/delete a few to gain dual benefit - faster boot and snappier desktop experience. On a debian system you can install sysv-rc-conf and uncheck (with caution) unnecessary services.



As you see in the screenshot, my desktop has just 11 services enabled.

Startup Programs

Modern linux desktop starts almost a dozen of startup programs (including bluetooth service, network applet, OpenOffice quickstarter, volume manager, accessibility, Bug reporter, update manager and a lot lot more) to please you. However, you use only a few of them, but your system suffers the toll in terms of memory and cpu usage. You can remove any or all of them as per your requirement.



As you see in the screenshot I've removed all the startup programs. I am using static IP settings (no need of network manager), I rarely use external storage media (no need for gnome-volume-manager, when needed I manually mount the external media), I have set my volume level (no need for that volume applet, when needed I will change settings in the media player/browser volume button)... bla.. bla... bla...

Eye-candy

Don't know about you, but I really don't like gnome-compositing, compiz, beryl, emerald or whatsoever the desktop effects are. Classic XP like look-n-feel is good for me. Even I prefer a desktop with no wallpaper to a pimpified desktop. Solid royal blue fillings on the desktop is enough.



Run gconf-editor (or use gconftool-2 on a terminal and change the settings) to enable "reduced_resources" (/apps/metacity/general/reduced_resources) and "accessibility" (/desktop/gnome/interface/accessibility) to get XP-ish like minimize-maximize effects and a snappier experience.




Speed Up /tmp

Move /tmp and /var/tmp to tmpfs in RAM. Add these two lines in /etc/fstab file

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

Also, speed up flash rendering in firefox by deleting the directory ~/.macromedia, then creating a symbolic link to /tmp as mentioned below.

rm -r ~/.macromedia
ln -s /tmp ~/.macromedia

After, all these changes done, you may reboot your system or just issue the following command in your terminal.

mount -o remount /


Kernel

Kernel is getting heavier and heavier, day by day, owing to ever-emerging desktop hardware and kernel hacks. It's daunting, but you can recompile a kernel just-right for your particular hardware.


As you see in above screenshot, I have recompiled a 2.6.32 kernel for Lenny. The recompiled kernel package weighed only 8MB and took 23.2MB of space after installation, where as the default Lenny 2.6.26 kernel weighted some 20MB and installed some 75MB on my HDD. Besides, the recompiled kernel is bears right settings for a desktop (default lenny kernel is optimized for servers) that on intel atom 230 processor. Recompilation also gave me options to disable swap, virtulization, esoteric/unused filesystem entries, and tons of unnecessary devices from being built into it.

Wednesday, August 25, 2010

Extreme Performance Optimization for a Standalone Windows XP Pro SP3 Desktop

First, apologies for posting Windows Tweaks on a Linux blog. Previously I had also attempted a few similar tweaks on Windows. But, this time the optimization tweaks are extremely paranoiac - only the strong at heart should attempt. Read on to know why ...

WHY

Because She had to do C
I was happy cruising on my good old Debian Lenny till my wify joined MCA. As a part of her 1st semester she has to do a lot of C. The University lab teaches C either on VC++ or TC on Windows. At home though my Debian desktop has a complete development tools and compilers, she is afraid to catch up with the batch, till she catches up with gcc and vi, other fellows might go ahead. That's why I thought it was better to put Windows XP Pro on another partition and install VC++ on top of it. But right after installation the greed for speed and security made me do these extreme optimization tweaks.

OBJECTIVE

My objective was a standalone XP Pro installation enough to do writing programs and compiling them on VC++, do some offline reading, enjoy some music/movies. No networks. No Internet. For networks and internet we (I and my wife) prefer Debian. (Who is going to put Windows and then search for a suitable antivirus, antispyware, and all that BS? Microsoft should make it explicit on every boxed Windows that "By buying Windows you've to make other payments towards Antivirus and antispyware, to some vendors". I don't like the shoddy security of M$.)

Your objective might be optimizing your XP just for Games, Jobworks, Desktop Publishing or Multimedia manipulation. Accordingly, your optimization may change a bit.

HOW

I wanted to squeeze every bit of juice (performance) from XP. That's why I started tinkering everything - from changing BIOS settings to tweaking Windows installation and choosing right kind of software.

BIOS

BIOS has some nitty options to set/control cpu/board fans, and reduce boot time. Also, you can disable all those unnecessary/unused devices and ports on bios further increasing your system responsiveness.

Windows Installation

A vanilla Windows Retail or OEM CD packs everything to satisfy the a vast diversity of machines and users. You can choose a Retail Windows copy and then use some third party tools like nlite to cut it for your requirements. Here, I used nlite to downsize XP. The result was a Tiny XP CD weighing only 150 MB, 1/4 byte size of the original XP.

User Profile and Permission

90% of users run Windows as a privileged user (administrator), because that's what Windows grants profile to the first default user. It's good for the dumb who doesn't like to do anything except point-and-click to install and configure devices and/or software. But default administrator mode brings the risk of security and reduced performance. What I believe every user should do is configure two accounts in Windows: 1st, the administrator account, and 2nd, a non-privileged user. Change the user settings (run "control userpasswords2") to make Windows boot non-privileged account by default. One can use administrator account for administrator tasks only, not for daily computing.

PERFORMANCE TWEAKS

Make a light installation of OS and Application Software

Strip down XP using nlite. Make a minimal installation. Then choose light-weight and custom installation of application software wherever possible. For example, if reading pdf files is what you all need, you should better install Foxit Reader. There's no need to go for a jumbo pack like Adobe Reader that drastically increases installation footprint plus takes toll on your CPU.

Similarly, make a custom installation. For example, don't push in Microsoft Office and do Click>>Click>>OK. Make a custom installation of just the necessary components. I had an enterprise copy of Microsoft Office 2007 that had all the bits and pieces of a productivity suite, but installed only Word, Excel and PowerPoint; Binder, Visio, Project, OneNote and Publisher are not my stuff.

For multimedia, I could have chosen a bunch of apps like Windows Media Player 11, RealPlayer Gold, VLC, WinAmp and bla.. bla.. bla.. But, here what I all did was to install the full version of K Lite Mega Codec Pack. It has all the necessary codecs under the sun plus a sober player interface – Media Player Classic.



Disable unnecessary devices

Disable unnecessary devices also from device manager, if you could not disable them in BIOS or you just could not find the options there. To make my windows installation standalone development/entertainment desktop I disabled all the USB ports plus network adapter. I could have done the same in BIOS, but I really need them on Debian installed on the same desktop. BTW, BIOS on a dual-booted PC is common to both the operating systems. Disabling these devices makes the system a little more responsive. Visit My Computer >> Properties >> Hardware >> Device Manager, and disable all those devices that you don't need. Nothing to worry, you can enable them back when needed.



While on Windows those USB ports are still in use for charging my USB camera and mobile. Power still flows to them, but data transfer is blocked.

Compromise on Eye-Candy

Windows XP won't win a beauty pageant at the time of Windows 7, OS X Snow Leopard and Ubuntu Lucid. However, you can gain a little performance boost by changing the visual-effect settings. It won't affect the beauty of your XP. Visit My Computer >> Properties >> Advanced >> Performance >> Settings >> Visual Effects. And uncheck all effects except "Smooth edges of screen fonts" and "Use visual styles on windows and buttons".



Maintain a constant and moderate virtual memory

Windows XP service pack still thinks that you are running it on a 128MB physical memory, and be how much RAM your system really has it sets a dynamic virtual memory with a threshold of not less than 1GB and an upper limit of 2-3GB. If you are using a desktop pc for home use and have more than 1GB physical memory (RAM). You can set virtual memory to a fixed size. I've set it to 512MB only. It really helps your system to manage the memory better. Visit My Computer >> Properties >> Advanced >> Performance >> Settings >> Advanced, Select "Custom size" and put the same amount of memory for both initial and maximum size.



Disable Error reporting

I don't really see any benefit in keeping Error reporting enabled for a home computer. Visit My Computer >> Properties >> Advanced >> Error reporting, select "Disable".



Turnoff System Restore

Don't panic! Disabling System Restore results in a big speed boost and frees up much memory from the restore points. As long as you have an XP CD, you can pop in that and run rescue in case of worst mishaps.



Disable Remote Assistance

I don't how many of the home users really use Remote Assistance. Do you want somebody to remotely access your pc to fix it? If not, it makes no sense to keep it enabled. Visit My Computer >> Properties >> Remote, and uncheck both "Remote Assistance" and "Remote Desktop".



Turnoff Automatic Updates

Windows XP is almost out of Microsoft Support Cycle. M$ is aggressively pushing forward Windows 7. That means you won't get that valuable updates and patches. These days the only event you will experience is get a nagging WGA check message in case you are using a pirated XP with Automatic Updates on. So, better disable it altogether. It's good for you and your system. Visit My Computer >> Properties >> Automatic Updates, and select "Turnoff Automatic Updates"



Minimize the number of startup programs

If you really care of reduced boot times, low memory footprint and highly responsive system, minimize the number of startup services. I have let just one process "hkcmd" to run on startup. Run msconfig, click on the "startup" tab, and uncheck all that you think you don't need to run everytime on startup.



Disable unnecessary services

Search "Black Vipers Windows XP Service Configuration" on Google and visit the official site to have a thorough understanding of what the Windows XP services, and then decide on what you really need to keep enabled. Besides, the site also lists on what all services you need in three presets – Safe, Tweaked and Geek modes. You can safely choose the "Tweaked" mode of service list configurations. Below is the list of services that I keep enabled. It's perhaps the most effective of all the speed tweaks. It also reduces the memory foot print greatly. It's a must-do tweak for any speed-hungry user. Run services.msc and change your service settings after reading Black Viper's article.



Now the REAL MEAT

After doing all these performance/security tweaks. I experienced a perceivable boost in speed, reduced memory usage and always responsible system. Now, my system boots in just 10 secs and uses a bare 90MB of memory. That means after applying these tweaks you can run Windows XP in full throttle speed in an obsolete PIII PC with as low as 125MB RAM. What more do you expect!

Sunday, August 22, 2010

HP Offers Linux Workstations

Configuring hardware perfectly with Linux sometimes involves fights. Most often linux sits well on modern hardware, but when it doesn't there are hacks and workarounds, but that doesn't always go well. Occasionally devices don't perform the way the manufacture designed it to. However, HP has made it easy by offering linux pre-installed workstations.

With over two decades of UNIX library and device driver focus, the company has become a leader in refining, enabling and testing linux on systems with latest releases and drivers. Plus, the company also leverages its partnership worth name brand hardware/software vendors such as Red Hat, Novell, AMD, Intel, nVidia, ATI and others.

By choosing HP personal desktops/notebooks with linux, you get a fully configured/optimized desktop with Suse (SLED) or Red Hat (RHEL), tested and certified by the respective Linux giants. With the workstation HP offers an HP Installer Kit for Linux, linux user manual, and enough literature (release notes, setup tips, faqs & more).

HP now has Hardware Support Matrix, a detailed online tool providing the latest support information to help you determine the minimum SLED or RHEL update versions required for perfect operation.

Saturday, August 14, 2010

Why Linux Web Hosting?

Let's get the hard facts first - as of July 2010, 5 out of the 10 most reliable internet hosting companies are powered by Linux. The rest 5 are run by others including Windows (just 1). So, what accounts for the success of Linux Web Hosting? Well, many things: history, philosophy, cost, versatility and stability. From the very beginning linux (owing to its unix legacy) is built grounds up for web server and and the Internet, whereas Windows had and keen focus on consumer desktop. That difference is apparent even today.

Linux web hosting wards off those typical susceptibility to viruses and malware that's way too common in a Windows environment. Moreover, LAMP (the stack consisting of Linux, Apache HTTP Server, MySQL and PHP) provides great options (easy to code, develop and deploy) to build a viable general purpose web server. On the hardware and software front, a Linux server beats Windows on multiple aspects. Linux servers stay up for years without a single reboot, reducing downtime to to minimum. For some security fixes, the tech-guy can apply patches using Ksplice without a reboot. Similarly, most of the libraries, services and applications can mostly be upgraded without restarting the running software. Presence of bonafide malware is very rare in Linux (less than 900 pieces compared to 2 million malware detected for Windows). Nevertheless, one can also deploy anti-malware tools such as ClamAV and Panda only to mitigate spread of Windows malware to windows environments, if they are connected in a linux network.

Also, Linux hosting in the context of Apache server, is very easy and common setup that enjoy a huge user base. The open-source philosophy behind it offers countless online and offline helps in the form of tutorials, forums, newsgroups, IRC channels and user groups. That means it's very easy to obtain assistance with any server issues that one might encounter. It is also quicker and easier to apply patches and updates on a Linux server. Finally, Linux hosting charges much less compared to other hosting options.

How about this