# Saving time installing Gentoo.

## dE_logics

Gentoo takes a long time and attention to install, and you might not have that much time; but you can squeeze 1 hour a day for the purpose. This is enough to get Gentoo installed within a week or 2 with your complete desktop environment at hand.

You won't require a spare machine for this purpose, just (preferably) an external disk or spare space in your hardrive where you will be installing Gentoo for the mean time.

Assuming you're using a Linux distro as your mainstreme OS (other wise it's not recommended using Gentoo), you can chroot and install Gentoo using the Handbook (i.e all the time running and doing your primary work on your mainstream OS; and might be installing Gentoo for a break). During the compilation process (which takes a lot of time), you can work on your mainstream OS like you would do normally...just let the compile be done in the background (you can lower it's priority also if it hinders your work); that's what I say in the signature.

To test if the installation is bootable (in case you're installing to partitions on your main HDD/SSD), just take a small external flash disk and write the GRUB  MBR to it, and then make it point to your installed boot/root partition of your installed Gentoo. That way your main disk will be unmodified and yet will let you will be able to boot into Gentoo. If you're installing to an external disk, just keep your main HDD/SSD untouched while you install Gentoo to the external.

Alternatively, you might like to modify the grub.conf of your mainstream OS (i.e if you're using GRUB) to add an entry for Gentoo, this will too ensure that your main OS is bootable all the time regardless of how much disasters you face with Gentoo. If you're using GRUB2 in your main OS, then just update-grub as root...it will add entries to your main list of OSs after reading the grub.conf in your Gentoo /boot/grub folder (install GRUB not GRUB2 (9999) for the mean time to avoid complications; but actually you can do it with GRUB2 also with a few more modifications).

After you've booted into Gentoo, emerged whatever you need (in a chrooted environment in to save time, multitasking), you might start trying it, and then might make it your mainstream OS safely without wasting any time in disaster recovery.

----------

## phajdan.jr

If you want to save time installing Gentoo, I'd recommend using a lightweight desktop environment, like xfce. Seriously, I think that most time compiling is spent on huge things like qt, kde, or gnome.

----------

## nativemad

For slower machines (like atom or older centrino or even celeron) i normally do the whole install/compilation in a chroot on a much faster server (watch out for compatible cflags!!). 

When everything is in place, i just copy the whole chroot over to the target machine (rsync, scp, or nfs&cp) and start debugging the boot process there. For major updates (like kde) i also update the chroot and just rsync again.

Ok, i have to admit that gentoo is the only *nix OS that i currently use... therefore i don't need to test it like dE_logics suggests!   :Wink: 

----------

## Sadako

 *phajdan.jr wrote:*   

> If you want to save time installing Gentoo, I'd recommend using a lightweight desktop environment, like xfce. Seriously, I think that most time compiling is spent on huge things like qt, kde, or gnome.

 Couldn't agree more.

tbh, if I wanted to use gnome I'd probably look at any of the number of gnome-based distros instead.

Although, wrt KDE, there are very few options which are actually based on kde rather than stuffing it over a gnome-based system (kdebuntu, ugh...), so gentoo would be an alternative to opensuse if you don't mind the compile times.

But with the huge updates even minor revbumps to either gnome or kde entails, I really think gentoo is more suited to any desktop but those two.

----------

## dE_logics

 *nativemad wrote:*   

> For slower machines (like atom or older centrino or even celeron) i normally do the whole install/compilation in a chroot on a much faster server (watch out for compatible cflags!!). 
> 
> When everything is in place, i just copy the whole chroot over to the target machine (rsync, scp, or nfs&cp) and start debugging the boot process there. For major updates (like kde) i also update the chroot and just rsync again.
> 
> Ok, i have to admit that gentoo is the only *nix OS that i currently use... therefore i don't need to test it like dE_logics suggests!  

 

Yup. compiling in a netbook is a bad idea.

Also if you emerge kdebase-meta, it doesn't take that much time...I completely migrated from xfce to kde in ~12 hours and without slowing down my work.

----------

## d2_racing

 *dE_logics wrote:*   

> Yup. compiling in a netbook is a bad idea.
> 
> Also if you emerge kdebase-meta, it doesn't take that much time...I completely migrated from xfce to kde in ~12 hours and without slowing down my work.

 

Indeed, netbook shouldn't be use to compile something. They should be use only to surf the net  :Razz: 

----------

## Sadako

 *d2_racing wrote:*   

>  *dE_logics wrote:*   Yup. compiling in a netbook is a bad idea. 
> 
> Indeed, netbook shouldn't be use to compile something. They should be use only to surf the net 

 Hey, they're not that bad, most of them are quite a bit faster than the machines a lot of us starting running gentoo on (such as my still-in-use 500MHz mobile pentium 3...).

Stop making me feel old, you damn whippersnappers!

Also, get off my lawn.

----------

## d2_racing

Indeed, if you compare with the Y2K technology at that time, they are lightning fast.

----------

## bobspencer123

yeah one of my first gentoo installs was on 350 mhz processor on some ancient ibm laptop (I think it may have been a PII -- ouch  :Wink:  ) It took like 16 hours or something just to do firefox.

----------

## Sadako

 *bobspencer123 wrote:*   

> yeah one of my first gentoo installs was on 350 mhz processor on some ancient ibm laptop (I think it may have been a PII -- ouch  ) It took like 16 hours or something just to do firefox.

 Remember not touching the machine for a couple of days while it tries to compile openoffice, only to have it fail after about 48 hours for some random reason?

I do...

----------

## nativemad

 *Hopeless wrote:*   

> Remember not touching the machine for a couple of days while it tries to compile openoffice, only to have it fail after about 48 hours for some random reason?
> 
> I do...

 

lol, yes i remember!   :Razz: 

After a failed build one could just emerge --sync and it was mostly already fixed within the tree!

----------

## dE_logics

I really like the qt interface of the compiled OO.

The compiling paid off...

----------

## Bircoph

 *dE_logics wrote:*   

> Yup. compiling in a netbook is a bad idea.
> 
> 

 

I can't agree with this. If distcc is used netbook is an exellent place to compile.

I have Atom-N270 netbook (with 2GB RAM), Athlon-XP and Celeron D. The latter are good distcc-helpers and their utilization provides better results than chrooting to netbook from athlon-xp and using celeron d as a helper.

However, correct distcc setup is non-trivial, especially with cross compilation.

On my netbook I have 2200+ packages installed. Complete world rebuild was needed when I switched to -Wl,--as-needed flag and it took about 8 days. 5 or 6 of them were spend on compilation itself (with --keep-going) and another days were spend to resolve arisen compilation failures.

----------

## roki942

 *nativemad wrote:*   

> For slower machines (like atom or older centrino or even celeron) i normally do the whole install/compilation in a chroot on a much faster server (watch out for compatible cflags!!). 
> 
> When everything is in place, i just copy the whole chroot over to the target machine (rsync, scp, or nfs&cp) and start debugging the boot process there. For major updates (like kde) i also update the chroot and just rsync again.
> 
> Ok, i have to admit that gentoo is the only *nix OS that i currently use... therefore i don't need to test it like dE_logics suggests!  

 

When you copy it over are there any dirs you leave out? Any details on setting up the rysnc?

When you do a major update do you rsync the whole netbook back over to your server?

I'm abit confused about:

a)rsyncing dirs like /dev, /proc etc 

b)when you later do a major update - what about the various config files in the home dirs, etc

c)can you rsync the update to a running system

Thanks

----------

## nativemad

 *roki942 wrote:*   

> 
> 
> When you copy it over are there any dirs you leave out? Any details on setting up the rysnc?
> 
> When you do a major update do you rsync the whole netbook back over to your server?
> ...

 

a) If you leave (exit) the chroot on the server, then no entries in proc will stay there (unmount it!!)... The dev files can be synced with rsyncs -D option.

b) The -u option will only take the differences...(rsync at least /etc from the target back to the Server before an update world, but i personally just leave out the huge /home).

c) Yes, this can be done! -a normal emerge -uD world also replaces binaries of potentially running apps...   :Wink: 

Basically it just the following...

Serverside:

mkdir -p /some/chroot

cd /some/chroot

tar -xvjpf stageblabla

mkdir /some/chroot/usr/portage

mount -o bind /usr/portage /some/chroot/usr/portage

cp /etc/resolv.conf /some/chroot/etc/

mount -t proc none /some/chroot/proc

chroot /some/chroot (or for x86 "linux32 chroot /some/chroot")

---follow the handbook to get a kernel, fstab, passwd and everything as far as kde---

exit

umount /some/chroot/proc

Clientside:

boot via systemrescuecd or something with rsync (the gentoo minimal cd isn't an option!!)

cfdisk the partitions

mke2fs the partitions

mount the partitions somewhere like /mnt/gentoo

rsync -urlvopgtD --del --exclude=usr/portage/distfiles/* root@server:/some/chroot /mnt/gentoo

grub --no-floppy (and install it on the mbr)

unmount everything and reboot

If you had to adjust something and would like to sync it back to the server, then

rsync -urlvopgtD --del --exclude=usr/portage/distfiles/* --exclude=/proc/* --exclude=/home/mad/* / root@server:/some/chroot/

After an update on the server just switch the source and target around in the rsync command above!  :Wink: 

I hope that explains it a bit better!   :Razz: 

----------

## roki942

 *nativemad wrote:*   

> 
> 
> I hope that explains it a bit better!  

 

It sure does!

Thanks a lot!

----------

## devsk

Or get yourself an i7 920 D0 and OC it to 4Ghz with HT on and set MAKEOPTS and --jobs to 16. All of kdebase-meta (assuming all non-kde stuff is in place) compiles in 30-45 mins. All of qt-4 compiles in less than 15 minutes. Updates can be sped up even further with ccache. I have disabled ccache (too many small files!) and the update from 4.3.4 to 4.4.2 still finished in 29 mins.

Or better install opensolaris and prefix portage. Emerge times are 15-25% better (python emerges in 45 seconds compared to 55 secs on Linux, cmake emerges in 38 secs compred to 53 seconds on Linux) on Opensolaris with same hardware compared to Linux.

Gentoo (and portage) rocks on modern hardware! No limits!

----------

