Unofficial Linux Starter Guide — Based on Ubuntu 6.04 (Dapper Drake)

Disclaimer

Copyright (c)  2006  Justin Sojda
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Acknowledgements

Information in this guide has been taken freely and copied and/or modified in whole and/or in part from the following source(s) as allowed by the GNU Free Documentation License Version 1.2, November 2002.

Original 'Unofficial Ubuntu 5.04 Starter Guide' by Chua Wen Kiat.
Modified 'Unofficial UbuntuGuide' for Breezy 5.10 by Richard Harvey and Associates.
Modified 'Unofficial Ubuntu 5.10 (Breezy Badger) Starter Guide' by University of Latvia Linux Center Associates.

More acknowledgements will be added in due time.


Guide Objectives

People are probably wondering why start this guide in the first place. It is already being maintained somewhere else so why bother making it??? If you take a look at the guide objectives then it becomes more clear to why this guide is good for Ubuntu and Linux in general.

  1. To produce a guide aimed at the newest version of Ubuntu.
  2. To add command line tutorials aimed at new users.
  3. To add content from other guides (GFDL only) so that it is all located in one place.
  4. Not to reinvent the wheel. Orginal content will be limited other than making sure the content works with the newest version of Ubuntu.
  5. To find people that wish to help maintain this guide, or parts of this guide, and to help translate.


General Notes

  1. This is an Unofficial Ubuntu/Linux Starter Guide. It is not associated with Ubuntu and Canonical Ltd.
  2. The guide is tested on a full installation of the newest version of Ubuntu x86 Install CD.
  3. If you see a ‘black’ box, this means you have to execute the commands in Terminal mode (Applications -> Accessories -> Terminal) or use the content of that box as mentioned in some other instructions.
  4. To reduce typo mistakes, copy and paste the commands into Terminal mode (right click on the commands -> ‘Copy’ or ‘Paste’. You can also use Ctrl+C to copy and Shift+Insert to paste it)
  5. ‘sudo’ means superuser do. ‘sudo’ will prompt for ‘Password:’. Please specify the user password.
  6. If you want more information about any command, simply look at the manual page for it using the “man” command. For example, “man sudo” will display the manual page for the “sudo” command.
  7. If you are tired of typing “apt-get” all the time, Read How to apt-get the easy way (Synaptic)?
  8. ‘apt-get’ and ‘wget’ requires Internet connection to install/update/download programs
  9. To download file, right click on the link -> Select ‘Save Link As…’ -> Make sure file name and extension are correct
  10. Some multimedia applications may not load/produce sound, Read How to configure sound to work properly in GNOME?
  11. For any feedbacks, suggestions, discussions and bugs report to the author, please post comments: Here
  12. May the “humanity to others” spirit be with you always…
  13. This guide is based on Ubuntu, but that doesn’t mean things won’t work on other Linux distributions.
  14. Updates will be done frequently. It is always UNDERCONTRUCTION!!!
  15. To do a Quick Search just press <Ctrl> – F in your browser and type in what your looking for.


Getting Started

What is Ubuntu ?

Where to view Ubuntu screenshots ?

Where to find a list of all the programs/libraries that comes with Ubuntu ?

Where to download Ubuntu ?

Where to order Ubuntu CDs for absolutely FREE ?

Where to find help for Ubuntu ?

Where to look for new programs ?

Where to look for style elements for your desktop ?


How to Partition a Hard Drive for Linux ?

How to choose a partitioner ?

It is recommended to use a nice graphical Linux partitioner like QTParted or gparted. QTParted can be found on the Live SimplyMepis CD. The text based partitioner included with Ubuntu can be used, but isn’t as easy (especially for a new user) to use and it just doesn’t look as nice!!! 😉 There is also a gparted Live CD available, but I think the SimplyMepis CD is better since it boots into a fully functional desktop. Because new versions of Linux are released everyday it is recommended a multi-partition be done. By setting up the Linux Box like this, the working distribution doesn’t have to be removed before the next one is setup.

What are the Linux partition basics ?

Linux sees all types of partitions unlike some other operating systems. First Linux names the hard drive and then Linux names the partition by a number. The first hard drive is hda, the second hard drive is hda2, etc. So the 3rd partition on the 2nd hard drive would be hdb3. Only 4 primary partitions are allowed. To get more partitions one of the primary partitions can be turned into an extended parititon. Then the extended partition can be sub-divided into logical partitions which act just like primary partitions.

What is the “root” partition ?

The / partition is called the root partition and is the top directory of Linux. It contains all the files necessary for Linux o/s to run. 5GB is more than enough for most linux distributions.

What is the Linux-Swap partition ?

The Linux-Swap partition is something you generally create once and then forget about. This is an amount of disk space in which Linux temporarily writes data from RAM to free up memory for other processes. The swap partition is different from all others in that it is not used to store files in, so it won’t be dealt with in any further detail here.

How big should the Swap partition be ?

Usually 1-3 X the size of your RAM depending on who you talk to. But it really depends on how much RAM you have, the speed of your computer, and what you are doing on your computer. If you have 256mb Ram it would be safe to make the swap 512mb. If your computer keeps going into swap and using it on a regular bases, then it is probably time to go out and buy some more RAM!!! I have 1GB Ram and my computer never uses swap, even when multitasking 10 things at a time.

What is a filesystem ?

A filesystem is the “method” used to organise data on a disk. It controls the allocation of disk space to files, and associates each file with a filename, directory, permissions, and other information. Ext3 is journalized and allows for easy recovery of lost data. It is the most used and recommend filesystem for Linux and is the one KrazyPenguin is recommending as well.

Basic Partition Setup
Number Partition Type Name Size Directory Description
1 Primary ext3 hda1 5GB / Linux 1 – Used for main Linux Distro.
2 Primary ext3 hda2 5GB / Linux 2 – Used for secondary Linux Distro.
3 Primary ext3 hda3 5GB / Linux 3 – Used for testing Linux Distros.
4 Extended N/A hda4 rest none The Extended Partition counts as a mount point but is left unmounted.
5 Logical swap hda5 1GB Linux-Swap Used as a shared swap space partition between the distros.
6 Logical ext3 hda6 rest /home Home is shared by all installed Linux distros.


Grub Bootloader

What is the Grub ?

Grub is a bootloader that comes with Ubuntu (and many other Linux Distros). The Ubuntu installation gives 2 choices for boatloaders, one being the Grub and the other is Lilo. This section we will just concentrate on the Grub.

How is Grub Installed ?

Grub is installed during installation of Ubuntu. When asked you can choose to install Grub or not to install Grub. It should be installed into the MBR.

What is the MBR ?

The MBR stands for Master Boot Record and is a small program that is executed when a computer boots up.

Will Grub find my other operating systems ?

Grub also detects and sets up other Linux/Ubuntu distributions found on the hard drive. If it fails to set up an operating system correctly, then the Grub can be edited.

How to edit the Grub ?

Many times another Linux distribution won’t get setup properly in the Grub menu. When this happens we need to edit the Grub menu. If you have another Linux Distro installed on your hard drive, and it is bootable, than the editing can be done from this distro. Otherwise you will need to use a live cd to boot the computer and then edit the Grub menu. Either way, you are doing the same thing.

What file needs to be edited ?

The file that needs to be edited is found here: /boot/grub/menu.lst (that isn’t a one but a ‘l’ as in ‘Larry’). To edit from Ubuntu open a terminal and type ‘sudo gedit /boot/grub/menu.lst’. This procedure will vary depending on the distribution being used.

What part of menu.lst needs to be edited ?

When you look at menu.lst you will notice stanzas like in the following example. Sometimes we need to edit a stanza or add a stanza in order to boot another linux distro.

Example of a stanza in the menu.lst file:
title Ubuntu, kernel 2.6.15-15-386
root (hd0,1)
kernel /boot/vmlinuz-2.6.15-15-386 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.15-15-386
savedefault
boot

How to edit the stanza ?

title < put anything here that you want >
root (hdx,y) where x=(harddrive-1)and y=(partition of root-1)
kernel < type in the kernel then add ‘root=dev/hdax ro quiet splash’ where x is the partition number >
initrd < type in the initrd information here – it should match the kernel >
savedefault < just savedefault — simple eh! >
boot < just boot — nothing else >

Can a stanza be copied and pasted from another menu.lst file ?

Definitely!!! If a menu.lst is available from another o/s’s root directory that won’t boot, it is easier to just copy and paste the stanza(s).
How to reinstall the Grub ?

Using the Dapper 6.04 Install CD
-> select 'rescue' -> choose languange -> choose keyboard -> choose hostname
(note: For language/keboard/hostname it doesn't matter what is selected, these setting won't be changed.)
-> select the partition that the grub was on : dev/discs/disc0/partx 
where x=partition number
- then choose 'hdz' for the MBR, where z is the harddrive (0 being the first, 1 being the second)


Repositories

These are the repos for Ubuntu Dapper Drake 6.04 that should be used in a easy to read format. Use these if you want to unlock the full potential of Dapper Drake.
In a terminal: sudo gedit /etc/apt/sources.list and delete all and paste this:

deb http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse

Install Automatix

Currently no version is available for Dapper!!! Use this program for quick setup of your Ubuntu Box when the Dapper version is released..
The thread with instructions is found here: http://ubuntuforums.org/showthread.php?t=66563. This will also change the repositories (located at /etc/apt/sources.list) and upgrade the system.


Upgrading All Packages

How to do Automatic Updates ?

Ubuntu has a program named Ubuntu Update Manager which automatically updates/upgrades packages. A little icon in the kicker bar will appear when new upgrades are available. Just click it to and follow the instuctions.

How to do Manually Updates ?

Open a Terminal
sudo apt-get upgrade
Default Settings: These should be kept, so press 'N'  or 'Enter' when asked what to do, unless
the package strongly recommends configuring a setting.					
Other useful commands:	
Description of a Package ->	Terminal --> apt-cache show < package >
Removing unused packages -> apt-get clean && apt-get autoclean		 

Dist-Upgrade

dist-upgrade = upgrade packages, possibly remove or add needed packages, potential system breakage. It should only be performed if you are testing a distribution or if you are upgrading to the next version. If upgrading to the next version of a linux distro then the repos might have to be changed. They do for Ubuntu.

Here is the commands:
$sudo apt-get update
$sudo apt-get dist-upgrade

If system breakage is experienced then the package that apt-get is telling you it can’t be upgraded needs to be downloaded from the Ubuntu Packages site. Then the following command needs to be executed:
$sudo dpkg -i –force-overwrite name.deb
If that does not fix it you are stuck with reinstalling like you would have had to have done anyway.

Leave a Reply

Your email address will not be published. Required fields are marked *