Part II - Installation
[/b]
Sorry for the late post. It's not like this thread is begging to be read or anything. Here goes part II where we will actually install the OS.
You should have burned a live CD which you can boot from. Make sure your computer is set up to boot from CD (most are already). Boot your computer with the CD inserted and you should get a prompt to boot Linux. Hit <enter> to continue. You will see a bunch of text scroll by the screen and eventually you will get to the root "#" prompt. If you are familiar with DOS this is equivalent to the "C:\" prompt. Currently you are running on a virtual disk (or a RAM disk if you prefer). This basically gives you a work area to start from. The CDROM drive should also be available.
Linux Basics
[/b]
At this point I thought it would be a good idea to give some basic Linux/Unix command line examples so that users new to Linux can feel a little more comfortable before continuing. If you are already familair with Linux you can skip down to the next section titled "Setting up the network".
Linux/Unix uses a command line interface that resembles DOS (actually DOS ripped off a lot of this stuff from Unix). To get a directory listing you use the command "ls". The ls command has many options, but the ones I use most are -l for "long listing" and -a for "All file types". The -a will display hidden files. The -l gives a nice format to the listing. Try the ls command. You will notice that the -l listing gives additional information. Notice especially the data that begins each line, something like this "drwxr-xr-x" or "-r--r--r--". These are file type/permissions for each file. the files that start with "d" are directories. the "rwx" are the read, write, and execute permissions. The "-" means the option is not available. There are three sets of read/write/execute permissions. The first set is the permissions for the owner of the file, the second set is for the group(s) permissions, and the third is for everyone on the system. So a file with these permissions : -rwxr-xr-- has full read write execute for the owner of the file, read and execute for the group associated with the file, and read only permission for everyone else. You can tell what the owner and the group of the and file is by :
ls -l
-rw------- 1
erpl08 iss 4307 Jun 17 10:00 FAQ.xdh
drwx------ 2 erpl08 iss 1024 Jun 17 10:00 SCCS
-rw------- 1 erpl08 iss 15119 Jun 17 10:00 commands.xdh
-rw------- 1 erpl08 iss 266 Jun 17 10:00 concepts.xdh
The two highlighted words are the owner and the group for the file FAQ.xdh. The group name is italicized to hightlight it from the owner. So the owner of the files is erpl08 and the group is iss. The example file above only allows the user erpl08 to read and write to the FAQ. Not a good idea since you want most users to be able to at least read the FAQ. So lets try changing the permissions of the file. Note that as root user, which you are logged in as part of the install, has permission to everything so be careful what you do as root. Since you are on a RAM disk you can't do any damage now. At this point though just make a note of what you can do with chmod and not actually type it in. So to chmod a file from -rw------- to -rw-r--r-- we would type
chmod 644 FAQ.xdh
Why are we using numbers to change the permissions you may ask? Well if you look at each permission as a bit (Binary digit), or as either on or off you have three bits: r w x or 1 1 1 = 7 If we turn off x we get : r w - or 110 = 6. Do you see? So to set the permission of the file to -rwxr-xr-x we would set 111 101 101 = 7 5 5 or chmod 755 FAQ.xdh. There are letter combinations that you can use with chmod, but I prefer the numbers since that's how I learned to use the command. Once we get a fully installed OS you can play around with the "man" command which is the manual pages command. Manual pages let's you read the instructions for how to use installed Linux programs/commands.
To change directories in Linux you use the "cd" command much like on DOS. The big difference with Linux is there are no drive letters and the directorie slashes go this "/" way instead of "\". So to cd to /bin directory you would type : "cd /bin". To find out which directory you are in you type the "pwd" command.
The last command I want to cover is the "mount" command. On Linux and a lot of other OS's you have the concept of disk partitions. Some people just allocate there whole 80GB hard drive to C:\ on Windows, but Linux users try to seperate there disks a little for stability and recovery reasons. Gentoo Linux likes you to have at least 2 partitions : /boot and / (or root). If you have a really big disk you may want other partitions. We will leave that to the installation information that follows. Anyways, the mount command allows you to activate and deactivate partitions, other than root /. You use mount when you put a new CD in your drive or when you want to mount a remote drive on you Linux system. The way mount works is you create a mount point or more simply explained an empty directory on your root file system (/). Once you have a mount point you tell Linux what device you want to mount and where to mount it (your mount point). So the easy example would be your CDROM drive. You could create a mount point from your root partition by typing "mkdir /CDROM". One other thing to note about Linux is that it is case sensitive so CDROM and cdrom are totally different words because one is uppercase and the other is lower case. Now that we have a mount point we could mount the CDROM drive to the mount point by typing "mount /<devicename> /CDROM". You will notice that I have <devicename> in the command. You would not type that word, but the name of the device. On my system the device for the CDROM drive is :
/dev/ide/host0/bus0/target1/lun0/cd or as Linux was so kind to idenitfy this withe a simple /dev/hdb via a symbolic link.
What's a symbolic link? It's a pointer to a file. We can talk about that later though. So to mount my CDROM I would type:
mount /dev/hdb /CDROM
I could then type "cd /CDROM" and then do an ls -l to get a listing on the top level directory on the inserted CDROM.
There are other ways around this, but I thought I would expose the command to you now since you will see it a lot in the instructions provided by Gentoo online. You can also just type the command "mount" and press <enter> to see what you currently have mounted. Well that's it for the basiscs of Linux. If something was not clear please feel free to post in this thread or create a new thread in the Linux forum if you so wish.
Setting up the network
[/b]
This section picks up at section 4 of the Gentoo install instructions at
http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chap4. You definitely want to look at the instructions there since I will be mostly commenting on what is not clear in these instructions and what I experienced. As the manual suggests you should check and see if the boot CDROM program set networking up for you. It didn't for me, but it's worth a shot. Simply type /sbin/ifconfig to see if you have an "eth0" device configured. If you only see a "lo" device then you will need to setup the network driver yourself. It's not too hard. The instructions provide an automatic tool to use, but I found it was easier to run the 2 command line instructions they show in the manual configuration paragraph:
Code listing 4.6: Static IP Network Configuration
# ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
# /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1 $IFACE
where $IFACE = eth0
and $IPNUM = the LAN IP address of the machine you are installing Linux to usually 192.1.1.x ( I just picked 4 for the last digit because no machines on my LAN had that number yet)
and $BCAST = 192.1.1.255 Broadcast address for the network
and $NMASK = 255.255.255.0
and $GATEWAY = the IP address of your router, mine is 192.168.1.1
I can't speak for how this will work if you only have one machine, since I have a home network and use a router. The instructions online seem to assume you are on a network. They do have a link to a thread in the Gentoo forums here :
http://forums.gentoo.org/viewtopic.php?t=43025 that may be helpful. Anyways, here is what I had to type in to get the network up:
/sbin/ifconfig eth0 192.168.1.4 broadcast 192.168.1.255 netmask 255.255.255.0
/sbin/route add -net default gw 192.168.1.1 netmask 0.0.0.0 metric 1 eth0
The only step left to getting networking running was to edit/create the script called "/etc/resolv.conf". The only real problem I had at this point of the installation was that they did not include the "vi" editor that I am used to using on Linux/Unix systems. Instead they had this weird editor called "nano" for file editing. You have to hold down the <control> key and a letter to save the file or exit from the program. I guess I am just not used to that. Anyways open the file like the manual says and input your 2 values for your DNS server. If you have a linksys router like me this info can be found on the status screen from
http://192.168.1.1/index.html.
type nano -w /etc/resolv.conf
And input this:
Code listing 4.7: /etc/resolv.conf template
domain mydomain.com
nameserver 10.0.0.1
nameserver 10.0.0.2
Just replace the 2 numbers above with what you see on your router status screen for DNS.
After that last step I was then able to "ping -c 3
www.yahoo.com" like the manual suggested and I was sending/receiving packets. Network should be go at this point. I must say I was impressed with how easy it was to setup networking on Gentoo Linux.
Hopefully I have not scared everyone off at this point. I think now is a good time to break. We will continue with the next section of the Gentoo Linux install instructions titled "Setting system time and date" and I plan to finish the install instructions in our next segment on Installing Gentoo Linux.