Sunday, 8 August 2010

OpenSUSE 11.3, the best binary KDE distribution or best KDE distribution?

I have been using Gentoo for a few months and it has been a good experience but generally I can't see myself continuing to use it.

The advancement of modern day hardware has made using Gentoo a less time consuming experience.

What would once take days or weeks, now takes hours.

The end result is an optimized system tailored to your needs.

My needs are quite simple, good multimedia functionality, web browsing and office use. So with Gentoo I am able to create a system that can meet my needs and there is the added benefit of that little extra nippy feel and quicker application load times.

Initially I was relying on default use flags set by the kde desktop profile, lets look at an emerge --info output for this profile.

USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk hal iconv ipv6 jpeg kde lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib"

It seems like a lot but that isn't necessarily a bad thing. If a software package has support for ipv6 and it is defined in your use flags, it will be built to support it. If however, it doesn’t have support for ipv6 it wont magically be built in.

I was quite happy with the performance my Gentoo install had using the kde desktop profile but decided to see if I could improve it. So after much tweaking I was able to reduce the use flags to the following,

USE="3dnow X a52 aac acpi alsa amd64 bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr encode exif firefox flac gif gpm hal jpeg kde libnotify mad mmx modules mp3 mp4 mpeg mudflap multilib ncurses ogg opengl pam pcre pdf perl png ppds python qt3support qt4 readline reflection samba sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype usb vorbis x264 xcb xml xorg xv xvid zlib"

So what was the outcome?

The outcome was, packages had fewer dependencies and as a result a few less packages were installed.

Performance / memory consumption wise, absolutely no difference.

Not that I expected to see any. Most of the 485+ packages I happen to have installed use few to none of the use flags.

You can only tweak your system so far. Beyond that you are only engaging in a pointless exercise.

Based on my experience, I see no point in trying to tweak the kde desktop profile.

Infact I am now wondering what would happen if I build all packages to support as much as possible, which is what all your major distributions do.

Will I notice a difference?

I have my doubts.

I stated above that the modern day hardware has made using Gentoo a less time consuming experience but there is also another consequence of having more powerful hardware.

As software packages support more and are built with more functionality, its code size typically increases. Memory consumption therefore goes up and so does execution time. However modern day hardware is having a counter effect on these negative aspects.

Modern day hardware can process code quicker and more memory is readily available. So despite your binary distribution being compiled with generic optimizations and software packages being built to support as much as possible, the performance in most cases is getting better providing your system isn’t old.

Gentoo has lost its appeal on the performance front because for many users the gain ranges from minor to negligible. When you also take into consideration to time it takes to setup / update Gentoo, it simply isn't worth it.

Infact what is the general consensus concerning Gentoo today?

Is it about performance or control?

Interestingly, OpenSUSE 11.3 was released not so long ago and the performance is very nippy. If you haven’t tried it, I suggest you do.

My utter disappointment with OpenSUSE 11.2 (it was very sluggish) is what made me try out Gentoo.

Funnily enough, OpenSUSE 11.3 has changed some of my thoughts about Gentoo.

I once said,

"Gentoo, If you have the time and are willing to put in the effort then why not?"

I now say, because the gain is so small it becomes a pointless effort.

OpenSUSE 11.3 takes 10 to 15 minutes to install and performance is great. Even though I can still feel a little more nippiness in Gentoo and applications load that bit quicker, common sense rules in favour of OpenSUSE.

A superb effort by the OpenSUSE team, they have delivered a well polished and professional product with good performance.

I still believe Gentoo is the most innovating distribution to exist, their package management portage is truly a piece of art. The level of control, the ability to tailor the system and the learning experience cannot be matched by anything else.

The only problem is I am just using it for the wrong reason.

Gentoo and KDE 4.4.5 - A snapshot of the past...

Gentoo isn't about performance, that is only a side effect. The real power behind Gentoo is it's control.

Wednesday, 4 August 2010

How to install Gentoo using a Ubuntu 10.04 Live CD

This blog post will show you how to use a Ubuntu 10.04 Live CD to install Gentoo. You can also easily adapt this guide to work with other Live distributions or installed distributions.

Important Rule:

For a Gentoo (32-bit) install, use a Ubuntu 10.04 (32-bit) Live CD 
For a Gentoo (64-bit) install, use a Ubuntu 10.04 (64-bit) Live CD

You may wish to refer to the Gentoo Handbook throughout,

Gentoo (32-bit) - http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1
Gentoo (64-bit) - http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?style=printable&full=1

Once you have successfully chrooted into your Gentoo system, the fact that Ubuntu was used becomes irrelevant. I therefore see no point in reiterating the Gentoo Handbook after this stage.

However, when you exit the chrooted environment you return to Ubuntu. As a result I have updated step 10.d from the Gentoo Handbook to reflect this.

Please also bare in mind Gentoo is a very customizable platform, certain choices I have made may not suit everyone or you may have your own preferences.

For example, the Gentoo Handbook suggests a separate /boot partition, I will not be doing this.

This guide also assumes you wish to install Gentoo 64-bit, 32-bit users must modify steps accordingly.

Start

Boot from the Ubuntu 10.04 Live CD and make sure you have internet access.


Prepare your Hard Disk

Use Gparted to prepare your hard disk for Gentoo.


I will be formatting my 465.76GB (aka 500GB) disk drive /dev/sda to the following layout,

Click on the picture for a bigger view

As can be seen from the screenshot, the partition setup is the following,

/dev/sda1 formatted to ext4 with 58.59GB ---> This will be my /root partition
/dev/sda2 formatted to ext4 with 403.17GB ---> Intended /home partition
/dev/sda3 as the swap partition with 4096MB

Once Gparted has created the partitions, right click on the swap partition and select 'swapon' from the context menu.

Use Gparted to activate the swap

Close Gparted and open a terminal.



Use the terminal to type the commands presented below.

Mounting your /root partition

sudo mkdir /mnt/gentoo
sudo mount /dev/sda1 /mnt/gentoo
cd /mnt/gentoo

Remember to mount your intended /root partition as /mnt/gentoo. In my case, /dev/sda1

Download and extract Stage3 tarball

Modify the mirrors if necessary, You can find the list of mirrors here, http://www.gentoo.org/main/en/mirrors2.xml

sudo wget -r -l1 -H -t1 -nd -N -np -A.bz2 -erobots=off http://gentoo.virginmedia.com/releases/amd64/autobuilds/current-stage3/

sudo tar xvjpf stage3-*.tar.bz2

Download and extract portage tarball

sudo wget http://gentoo.virginmedia.com/snapshots/portage-latest.tar.bz2
sudo tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr

Modify your make.conf to suit your system

sudo nano -w /mnt/gentoo/etc/make.conf

Chrooting into Gentoo

sudo cp -L /etc/resolv.conf /mnt/gentoo/etc/
sudo mount -t proc none /mnt/gentoo/proc
sudo mount -o bind /dev /mnt/gentoo/dev
sudo chroot /mnt/gentoo /bin/bash

The use of sudo is now no longer required!

env-update
source /etc/profile
export PS1="(chroot) $PS1"

At this point you have successfully chrooted into your Gentoo environment. Just follow the Gentoo Handbook to complete your install.



Remember to replace step 10.d with the following,

Rebooting the system

exit
cd
sudo umount /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
sudo reboot
Misc Notes

If you do decide to follow my partition setup, remember to add an entry in the /etc/fstab for the /home partition and enable ext4 in the kernel.

Enjoy Gentoo!