Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP/TRICK]: Speed up your stage 1 multiple installs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2021
Location: Republic of California

PostPosted: Sun Feb 22, 2004 1:24 am    Post subject: [TIP/TRICK]: Speed up your stage 1 multiple installs Reply with quote

This TIP is geared towards those new to Gentoo but can be implemented into an existing install of Gentoo || users without access to a local network distfile server. I suggest cut, pasting and printing this since you most likely won't be accessing the forums during your install. This can be applied to a stage 1, 2 or 3 install && to users that are planning a reinstall.

Requirements: Semi large hard drive to create 2 usable partitions. I suggest 40GB only because that's the smallest drive I have. You just need to remember that Gentoo is NOT a small distro. Average disc space used for workstations can reach up to 2-3GB, not including downloaded distfiles.

Synopsis
By default, Gentoo's installation process makes it's repository of files downloaded for emerges in a default folder. This folder resides on your / (root) drive. The first time you install Gentoo is exciting yet makes you feel like you are watching paint dry. This becomes especially redundant when your first install fails and you try again (this is especially true for users that start at stage 1 such as myself). Think about your 3rd, 4th or 5th install failing. Think about the installs failing at first reboot. Each time you attempt a reinstall, you format your drive and wipe out everything you've downloaded. How's about that? Don't worry, a pretty large percentage of gentoo users have walked this walk.

An alternative to this default behavior would be to create a local network distfile server as described here. If a local network server is not feesable, the next decent alternative would be to add an additional partition and saving all downloaded files to that partition. Doing either one of these alternatives not only reduces the amount of time consumed during downloads but you also help reduce the amount of overhead placed on gentoo distfile servers.

Step 1: Create Your Partition
If you are reading this part, I'm going to assume that you're in the process of installing Gentoo linux or you are running an existing Gentoo installation and simply wish to use this tip.

If you already have an extra partition usable under linux, you can skip this. If not, you'll need to create an extra partition using fdisk. After creating partition, make sure you create your file system and format.

If you follow the Gentoo Install docs, it walks you through fdisk and creation of required partitions. You can use this as a guide in creating your extra partition. You'll need to make sure it's large enough for a decent sized repository of files. I suggest, at minimum, 5GB just to be safe.


Step 2: Mount Your Spare Drive
If you're reading this part, I'm going to assume you are at the point of a Gentoo install where you are instructed to mount your root and boot drives and proc or you are running an existing Gentoo installation and simply wish to use this tip.

For newly created partition
- This portion applies to you if this is your very first install.

Once you have mounted the required mount points, it's time to mount your extra partition. Since the actual install takes place in a chrooted environment and your chroot is '/mnt/gentoo', you'll need create the mount point for you extra partition somewhere in /mnt/gentoo. I suggest
Code:
mkdir /mnt/gentoo/spare_drive

where spare drive is any name you choose. Then you'll need to mount it with
Code:
mount /dev/hdXY /mnt/gentoo/spare_drive (for IDE)
OR
mount /dev/sdXY /mnt/gentoo/spare_drive (for SCSI)

where X = ide/scsi drive and Y = partition. After you've mounted your extra partition, I suggest doing
Code:
mkdir /mnt/gentoo/spare_drive/portage
mkdir /mnt/gentoo/spare_drive/portage/distfiles

only because this most resembles the default configuration.

For existing partitions
- This portion applies to you only if this is not your first install and you've used this tip in your previous install attempt.

You don't need to create anything. You simply need to mount the partition. Do
Code:
mount /dev/hdXY /mnt/gentoo/spare_drive (for IDE)
OR
mount /dev/sdXY /mnt/gentoo/spare_drive (for SCSI)



Step 3: Editing /etc/make.conf
If you're reading this part, I'm going to assume you are at the point of a Gentoo install where you are instructed to edit make.conf or you are running an existing Gentoo installation and simply wish to use this tip. In short, this step needs to be performed before bootstrap or emerging of any package, for consistancies sake.

Code:
nano -w /etc/make.conf

Locate the following directive --> #DISTDIR=${PORTDIR}/distfiles and change it to DISTDIR=/spare_drive/portage/distfiles making sure you remove the # sigh and set DISTDIR to the directory you've created on your extra partition. Please note that you will not need to make the directive point to /mnt/gentoo/spare_drive/portage/distfiles because you should already be in your chrooted environment.


Step 4: Editing /etc/fstab
If you're reading this part, I'm going to assume you are at the point of a Gentoo install where you are instructed to edit fstab or you are running an existing Gentoo installation and simply wish to use this tip.

This part is self explanatory. This step is to remind you to add this partition/mount point to fstab. For more information on fstab, click here.

Extra Notes
- Be sure to NOT reformat your extra partition if you need to reinstall or you lose all data and thus this tip is null.
- Every time you need to reinstall, you need to follow steps 2-4.
- If you are applying this tip to an existing install, make sure you copy all content from /usr/portage/distfiles to your new location.

More Notes
- This guide is aimed at new Gentoo users or those interested in trying Gentoo
- This tip disregards the bandwidth of user doing the install and is meant to reduce overhead on the contributed servers many kind institutions donate, namely Oregon State, since it seems to have the larest repository of packages. In other words, I don't care if you have an OC-48 directly to your door, you'd still be adding overhead to servers.
- This is meant to reduce the amount of time consumed during a stage 1-3 install waiting for packages to download.

I hope this helps users and I hope the time saved discourages new users from giving up. Please add comments or amend to my steps, especially if I've missed anything.

Peace
Back to top
View user's profile Send private message
2sheds
n00b
n00b


Joined: 27 Feb 2004
Posts: 48
Location: Sydney, Oz

PostPosted: Sun Feb 29, 2004 9:23 am    Post subject: Reply with quote

Man I love this trick! I have to pay for bandwidth and so after 4 unsuccessful attemots at getting my Stage 1 install to work perfectly, I was starting to get $#@#$! off. Great suggestion - it shoul be added to the install guide, as it seems not only noobs like me are having difficulty getting it right first time.

Thanks again - now for install no.5....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum