Saturday, November 30, 2013

My Gentoo Installation

Preface:

I started using Linux since late 2010 and I was sick of Windows 7 and I thought it would be fun to try Linux for a while and see how it goes. My previous encounters with Linux was when I med school when I tried Fedora core 2. But I didn't have internet back then and I had to replace it with Windows as I couldn't use the system without the multimedia codecs. I always wanted to understand Linux is general. Downloaded the free manuals since I started using Ubuntu and after using it for a month I moved to Fedora and within a year's time I was using FreeBSD on my system. It took me couple of days to get myself started on X server. But I was very much amused by  Matt's page  on FreeBSD. I was very patient to understand how FreeBSD works and all I learnt at the end of trying it for months together is FreeBSD is bit dated technology compared to Linux and hardware drivers follow FreeBSD very slowly and some times they don't quite perform up to the potential since the drivers are poor. I moved back and forth to Arch Linux , Fedora and Debian. Arch Linux is bit over-rated for being simple. Its as bloated as Fedora or Ubuntu.
Debian is really something else and I dont know what magic they do, honestly their package manager has been always been stunning and reliable.  

Why did I try Gentoo:

I saw matt cutts Ted talks video about trying something for 30 days. I always used to look Distrowatch.com for news and new packages in various distros. I have previously gone through the gentoo handbook and I was amazed at the number of steps involved in installation. During my college days I used to do Windows Re-stallation for my Friends computers and it  was too complicated for my friends to do an windows installation. Since I have tried FreeBSD already I had a pretty good idea how to get around my ways in Linux Terminal. I thought I would start with Sabayon mate which was bit beginner friendly according to Distrowatch.com and I used the Fedora familiar anaconda and it was such a breeze to install it. The installation was  solid. I don't have any qualms against Sabayon. But I always want to try the Parent Distro rather than the offspring as I wanted to enjoy the real sense of how the Distro is designed or intended to be used.

The first step:

I downloaded the Gentoo-minimal latest .iso file and downloaded the stage 3 tar ball with it. I used dd tool to write it to my Sandisk 8 GB USB drive. I  have a Lenovo Y580 with core i7 and a small 16GB SSD which I use it to install Linux.  So I  used Sabayon LiveCD instead of gentoo ISO.

Sabayon LiveCD for a cheated install:

I honestly recommend any noob trying to install Gentoo should be using any LiveCD so that they have a working computer and easily install Gentoo in the same computer at the same time. Having a working internet is a must to refer to the official handbook all the time. One has to literally follow the handbook and it has very good examples of scenarios which could help you imbibe the process and intentions of Gentoo.

The install:
 I always assumed that the hardest part of any install is getting X-server work. But when it comes to Gentoo I was bit surprised to know that I was forced to learn my hardware than ever before and I had to configure it properly in kernel. Proper configuration means  you need to know if you have to make your desired kernel variable as an built-in option or modules. If you try copy kernel .config from other distros and compile with the .config in Gentoo it probably won't work since each Distro is designed in a different way around the kernel. I did try the sabayon .config on Gentoo and I ended with a kernel which didn't boot. So either make an effort to learn or use the alternate easiest option genkernel. For some people I guess even using the genkernel might be daunting.

The kernel building:
The building of kernel is a part of installation when compared to any other distro out there.
I used to build custom kernel in Arch Linux which would build all the modules for about 70 mins if I don't use the option of localmodconfig, modprobed_db.

The genkernel took 7 mins to build the kernel on my latest i7 hardware . It was pleasant surprise since I messed with the .config with lack of knowledge. For all the people who said it would take 2-3 days to build Gentoo, I have to say that its all down to hardware. Newer hardware builds kernel without an hitch with make -j9 option on in less than 10 mins. I felt the hardest part was kernel .config and apart from that if you know how to read it can't be any easier.

I would recommend noobs to use genkernel tool for kernel installation. It automates the kernel config to a great deal and avoids the pain of choosing the wrong options in kernel .config. I tried installing kernel manually with the make menuconfig option, but with my Linux knowledge base I couldn't get to a working kernel at any point. Kernel .config needs some serious learning. The options are huge and a single mistake will probably lead to an unbootable kernel.

The post install and X-server:

My system took a total 160 mins  to install gnome-light and xorg-server alone. 
 It downloaded of around 500MB distfile sources.  There were lot of interventions required to reach this point, but its Gentoo we are talking about. Its definitely not a cake walk with just the handbook.

The Grand Gentoo Design: 

Why is Gentoo designed this way? 
 The docs page doesn't do justice to define what makes gentoo for what it is. If anyone has used Gentoo would realize that all the configuration options in Gentoo portage can be done in any other Linux distro except that you would have to do it with more difficulty. 

Emerge is the one of the most advanced source based package manager out there. The configuration options initially looks bit difficult to manage but later you will come to terms with it. There is no linux distro package manager has as many options during an package install as gentoo. The out of tree packages can be managed with layman.I am still yet to find out linux package that is not available in Gentoo repo + layman yet.

 In order to understand Gentoo one has to use Gentoo for a while why its designed that way. I am sure it adds a new dimension to your linux knowledge.



No comments: