From Windows-Wimp to Command-Line Warrior. Part 12: Downloading and unpacking the system files, Gentoo handbook, page 5

2 September 2005

In page 5 of the handbook you have to download a stage file and a portage snapshot. The 'stage' file is a starting set of system files and folders. The 'portage snapshot' is a starting set of 'portage' files.

Portage is Gentoo's unique and advanced package management system. In your portage directory is a load of very small files (thousands if not tens of thousands of them) that act like a database of all the programs that exist for the Gentoo system. These files (called ebuilds) tell the Gentoo system how to get and install any program you like.

Page 5 of the handbook talks about proxies, if you do not know what that means and are sitting at home then don't worry about it. Proxy servers are mostly used in big institutions like universities and major companies etc.

Getting the stage file

If you made the universal CD because you are installing on a computer without internet access then follow the instructions in the handbook for that.

In this series we are going to download a stage from the Internet. We will use the Links browser, usage instructions were given in part 8.

You need to go to the Gentoo mirror site (you can also click this link from inside the handbook):

> links www.gentoo.org/main/en/mirrors.xml

Choose the link closest to you. The hosts tend to be enlightened Universities, responsible and friendly Internet Service Providers, GNU/Linux User Groups and others. You may want to check out these universities and ISPs next time you want to take a course or buy internet services :) !

It doesn't matter if you choose an HTML or FTP mirror. Just choose one nearby so it will be as fast as possible to download. Click on the mirror to enter the site and click on the 'releases' directory.

You then need to choose your architecture, hopefully you know this by now, if not then the main ones are:

> x86 for 32-bit AMD/Pentium IBM clones - the bog standard PC. amd64 for 64 bit (x86_64) platforms such as AMD 64 etc (you cool dude). ppc for Apple Mac G3 and G4s etc. ppc64 for the Apple Mac G5 (you lucky person).

Choose the latest release, it will be the highest year followed by a dot (.) and the highest number. At time of writing it is '2005.1'. Next choose 'stages'.

To repeat, to download a file in Links you highlight it by hovering your cursor over it and then press 'd'.

Firstly download the checksum file this begins 'stage3' and ends md5, this is used to check that your file downloaded okay. (You can see the full name in the links bar at the bottom). Next download the stage file, this begins 'stage3' and ends '.bz2'.

Go and make yourself a cup of tea or coffee as this may take ten minutes (depending on the speed of your Internet Connection). You could also check the news in another terminal by using one of the following commands, (note these links are clickable):

links news.bbc.co.uk/text_only.stm

links www.google.co.uk/news?ned=tuk

Checking the download

Quit Links (or go back to the handbook) and in a terminal where you are in the /mnt/gentoo directory (use 'cd /mnt/gentoo' if you are not there already). Use 'pwd' if you are confused as to where you are! Use the following command to check the download:

md5sum -c stage3-amd64-2005.1.tar.bz2.md5

A note on completion

I have mentioned this elsewhere in this blog numerous times, but I'll repeat it here. Clever use of completion is the key to success on the Command Line. The 'Tab' key is the completion button. Tab is often represented as an arrow - it is on the left above 'Caps Lock' but below '1'.

To type the above command, use tab completion as follows, where ! represents a good slap of the Tab key:

> md5! -c s!.!

Unpacking the file

The stage file comes compressed in an archive. Therefore the next step is to unpack the file, the command will look something like this:

> tar -xvjpf stage3-amd64-2005.1.tar.bz2

Don't forget to Tab-complete on the stage name!

All the filenames will be printed on the screen. Unless you are Data from Star Trek, I wouldn't bother trying to read it. If you have a quite old computer you may want to take another break away from the machine.

When that is done, you can type the command 'ls' which will show you the folders that a normal GNU/Linux filesystem has.

Now you have to do basically the same thing again to get the portage snapshot. Go back to the mirror list using Links (see above) and now go into the 'snapshots' directory. Download the latest .tar.bz2 file (and if you want the md5 file to check the download - see above).

If you have a slow internet connection then another walk around the house might be in order!

This command checks the snapshot (of course your date in the filename will be different):

> md5sum -c portage-20050831.tar.bz2.md5sum

The check will say 'OK' for a successful download.

> portage-20050831.tar.bz2: OK

Now it is time to unpack the portage snapshot archive, note that the destination has '/usr' on the end:

> tar -xvjf /mnt/gentoo/portage-20050831.tar.bz2 -C /mnt/gentoo/usr

Sorting out make.conf

You use the groovy yet tiny editor nano, read our guide to nano for editing help.

The handbook explains what you need to do, as does Bob P's installation guide is perhaps helpful here too.

This part can seem the most arcane. Most other GNU/Linux distributions hide this whole process from you. However in Gentoo the make.conf file has enormous power to give you the best possible system.

To get the most of out make.conf will require a bit of reading, so for now don't waste too much time on it. Don't forget that you can make it more complex later.

As I have said throughout this series, the aim at the moment is to get a bootable system - not a system that is extremely optimised but doesn't boot! You can optimise the system later to your hearts content!

What do you have to say?

Show Editing Help

About

Hello, my name is Zeth, I'll be your host here.

Command Line Warriors is about taking control of your own technology, it looks at our experiences of computing; especially using GNU/Linux, the Python programming language, the command-line and issues such as techno-ethics, best practices and whatever is cool now. If you take control of your technology then you are a Warrior too!

This site is your site too which means that you can contribute and get involved. You can leave comments using the facility provided. For me, the comments and discussions are by far the best part of the site. So please do have your say!

Latest Discussions

Zeth

November 29, 2009
Hi Jordan, yes that URL is gone now. I have a new contact form on this site.
Python CGI contact forms

Jordan

November 29, 2009
Zeth attention! Your form, http://zeth.me.uk/contact/, is not working The explorer says connecting ..but nothing happens Sorry for my poor English: I am Spanish Regards
Python CGI contact forms

Jordan

November 26, 2009
Sorry: tell me , not tellme (I'm spaniard) And http://zeth.me.uk/contact/ don't work
You got the touch, you got the power

David Jones

November 25, 2009
Your mad skillz are too l33t! for me. I specifically switched to Google Reader so that I could show people what blogs I read. But I couldn't work out how ...
How to find the fashionable blogs quickly

Brian R. Hickey

November 20, 2009
Symantec picked it up too.
How to bring down Internet Explorer with six words

Zeth

November 17, 2009
Thanks djm, I am the moose here. Christian, assuming one actually does Internationalise the countries, it should still work I guess, as the gettext stuff will happen before the list ...
Countries in Django

Phillip Temple

November 17, 2009
Good start, but: a) wouldn't I want None back rather than 'ZZ'? b) why not add a 'shortcut' boolean, then prepend flagged fields (plus usual '-----' separator) to the actual ...
Countries in Django

djm

November 17, 2009
Am I being a moose or did you mean: from whatever.countries import CountryField instead of from whatever.countries import CharField ? Good post though, cheers.
Countries in Django

Christian Joergensen

November 17, 2009
Wouldn't the ordering get messed up after i18n?
Countries in Django

Steve - Electronic Cigarettes Fan

November 17, 2009
Very well done. Is your blog just you writing? Nicely done, Steven.
Blogger vs Wordpress

vetetix

November 15, 2009
Sorry to bother you nearly two years after you wrote this blog article, but I can't manage to find how to modify an existing field. I am trying to change ...
Three Useful Python Bindings - ClamAV, Apt and Evolution

Manju

November 4, 2009
I am transferring some files using psftp to other device's FAT partition. But the filestamp of the file being transferred is modified to that of FAT device, after the transfer. ...
PuTTY Series: Using PSFTP

iki

November 2, 2009
or simpler: socket.gethostbyname_ex(socket.gethostname())[2]
How to find out your IP address in Python

iki

November 2, 2009
local_ip = set([ i[4][0] for i in socket.getaddrinfo(socket.gethostname(), None) if i[0] == 2 ])
How to find out your IP address in Python

Fred

November 2, 2009
testing rst ------------- - point 1
An Introduction to ReStructuredText

Ano

October 27, 2009
"You simply found the license of the StumbleUpon Toolbar for Internet Explorer." That's possible. I've got some more interesting information to add. Firstly, go to this page: https://addons.mozilla.org/en-US/firefox/addon/138 - this ...
Are your Firefox extensions proprietary software?

Ken

October 21, 2009
Stumbled in here at lunch. This is the best find of the week. Thanks.
Three classic command line tips

Jim

October 19, 2009
Thanks for the rtsp:// post - that's something that has been bugging me for a while!
Three classic command line tips

Zeth

October 18, 2009
Thanks for the comments guys. Great to see the all the gang are still here!
Three classic command line tips

Bubba

October 18, 2009
Is there any way psftp can return the true transfer rates oberved during the actual transfer?
PuTTY Series: Using PSFTP