How to install Gentoo Linux inside Ubuntu 7.04

Last weekend I spent my day at synack’s office and he showed me the beauty of Gentoo once again. Looking at his awesome setup on his laptop I made up my mind to have Gentoo Linux 2007.o installed on my laptop. I had already installed dual boot - Windows XP and Ubuntu 7.04. I didn’t want to give up(yet) my previous setup because of the work I was working on.

So I said to myself let me try to install Gentoo Linux while I am working on my Ubuntu. After doing some googling I had enough of tips to help me. Just follow these steps to install Gentoo inside Ubuntu:

  1. You will need to install dchroot debootstrap packages, doing
    sudo apt-get install dchroot debootstrap
    will do the trick.
  2. Have your partitions ready to host your Gentoo Linux. You would need at least 1 partition. Use fdisk, Gparted or any other disk management tools out there. After that format it with the file system you want.
  3. Create /mnt/gentoo, /mnt/gentoo/boot
  4. Mount the partitions, mount /dev/sdax /mnt/gentoo
  5. Download stage3 from the nearest local mirror
  6. Extract stage3 into /mnt/gentoo directory - sudo tar xvjpf stage3*.bz2
  7. Get the latest Portage file from the same mirror.
  8. Extract it - tar xvjf /mnt/gentoo/portage-<date>.tar.bz2 -C /mnt/gentoo/usr
  9. Make adjustments in your make file /mnt/gentoo/etc/make.conf
  10. Since you have already working networking you would need to copy the settings to your future Gentoo environment. Do sudo cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
  11. Mount your proc - sudo mount -t proc none /mnt/gentoo/proc and dev mount -o bind /dev /mnt/gentoo/dev
  12. Now we have everything we need to get into the Gentoo environment. Do sudo chroot /mnt/gentoo /bin/bash
  13. Congrats! You are now in your working Gentoo Linux, however we’re not just yet done. Do /usr/sbin/env-update && source /etc/profile
  14. You might wanna do export PS1=”(chroot) $PS1″ so that you won’t by mistake close this terminal.
  15. Ok now have your stuff updated via emerge –sync or if you are behind a firewall emerge-webrsync
  16. emerge world -upvDN and go have some tea, it may take a while.
  17. Once you are done emerge gentoo-sources or emerge vanilla-sources
  18. Go to /usr/src/linux and make menuconfig prepare your kernel, then do make && make modules_install to compile your kernel.
  19. cp arch/i386/boot/bzImage /boot/kernel-2.6.21-gentoo-r8
  20. Now edit your existing grub menu.lst to add the Gentoo boot option.

I think I will stick to Gentoo Linux for now, I personally loved the bleeding-edge technologies they use. Everything is pretty much up to date with the latest releases. Emerge works just great, you can learn about Linux a lot while using Gentoo.

Comments

Leave a Reply

You must be logged in to post a comment.

Categories


Clicky Web Analytics