Documentation - Turtle Kevux - Installing Turtle Kevux
Author: Kevin Day
Description: Turtle Kevux Documentation for installing the system.
Keywords: Kevin Day, Kevux, FLL, Featureless, Linux, Library, Distribution, Open-Source, Turtle, Documentation

# Installing Turtle Kevux

## Partitioning the System

WARNING: Partitioning a system can be dangerous, do not perform these operations on a system with important information on it.
Get practice on a harddrive that you can afford to have it's data lost before doing this on a working system.
Due to the complexity and risks of partitioning, this tutorial is mostly going to assume you have an entire harddrive to be formatted.
The partitioner tool can be found on the effective "Start Menu" under Utilities -> Disk Partitioner.
NOTE: For the more experienced users, fdisk and pdisk both exist on the system as well as the mke2fs and similar utilities.

The first thing you will have to figure out is which harddrive (if you have more than one) are you using.
If you cannot figure out what harddrive to use, then do not continue until you have properly identified your correct harddrive.
On the top-right of the partitioner, there is a drop down box that has something like /dev/sda.
This drop-down box is used to select the correct harddrive.

There are some important names and rules that must be learned at this point.
Harddrives can be broken down into pieces that are called partitions.
Harddrives can be broken down into at most 4 partitions.
To increase the number of available partitions, an extended partition must be created.
Extended partitions should be avoided unless you need them and then you usually want to place them as the last partition (sda4, for example).
Now that you have the partitions taken care of, lets focus on the filesystems.
The filesystems are pretty technical and specify how the data is stored and retrieved.
What you need to worry about is what Operating System uses which partitions.
In general, the ntfs filesystem is used by the Microsoft Windows Operating System.
Standard usb memory sticks generally use the vfat filesystem, which is used by old Microsoft Windows Operating Systems (Windows 98 and older).
Linux Operating Systems (like Kevux) use the ext3, ext2, and linux swap filesystems.
If general, you want to use ext3 for linux because it can handle large filesystems quickly.
If you have a usb memory stick to run Kevux off of, then use ext2 to increase the potential lifetime of the stick (for highly technical reasons).
The linux swap filesystem is used to help extend memory, but because you are using a Kevux system, yuu will probably not need any swap.
Of course, if you have an old system, say 128 or less MB of ram, then feel free to create a linux swap filesystem of perhaps 512MB.
The grey space that has unallocated means that a partition is not created for that particular area.
What this means is that the unallocated area will not be available for use.
Don't use NTFS for any linux system.

Again, this example is assuming that you are going to use the entire harddrive.
Make sure to delete any existing partitions by selecting each individual partition and deleting that partition (partition -> delete).
Once everything is deleted, you should only see a single massive unallocated area.

Now you should be ready to create partitions.
First you should create the boot partition.
The boot partition should be of one of the following sizes: 16MB, 32MB, 64MB, 128MB, or 256MB.
The latter is beyond more than enough space.
The filesystem should be ext2 but can safely be ext3.
Next you need to create the root partition.
The root partition should be of one of the following size: 2048MB, 4096MB, 8192MB, 16384MB, 32768MB, 65536MB.
The latter is more than enough space, in fact, it is 64 Gigabytes.
Now all the remaining space will be your home partition.
Just fill up every last bit available.

## Mounting the CD-Rom

Okay, so you need to mount (use) the cdrom.
If you have only 1 cdrom drive, then you can simply type in console: mount /mnt/cdrom/01
If you have more than one, then you can try mounting them until you get the correct one.
In such a case, the next command following above might be mount /mnt/cdrom/02
Of course, you can almost guarantee getting the correct cdrom with the following command: mount LABEL=Turtle-0.8.8-live /mnt/cdrom, where 0.8.0 is the version of Turtle Kevux that you are mounting.
Once the cdrom is mounted, you can access the contents at the location it was mounted on.
This means that if you ran the command: mount /mnt/cdrom/03, then you will find the cdrom contents in the directory /mnt/cdrom/03.
Another example is if you mounted the cdrom with mount LABEL=Turtle-0.8.8-live /mnt/cdrom, then you will find the contents of the cdrom in the directory /mnt/cdrom

## Mounting the Partition

This will be assuming that you correctly created the partitions and mounted the cdrom based on the tutorials above.
Let us pretend that we only have one harddrive and therefore it's device name will be called /dev/sda.
This means we have 3 partitions, a boot partition at /dev/sda1, a root partition at /dev/sda2, and a home partition at /dev/sda3.
The order in which these are mounted DOES matter.
Now, we need to mount the root partition first.
This is done with the command: mount /mnt/sda/02
Once this is mounted, we need to create the directories that our other two directories will be mounted.
This is done with the command: mkdir /mnt/sda/02/{boot,home}
Now, we need to mount the boot partition.
This is done with the command: mount /dev/sda1 /mnt/sda/02/boot
This command will explicitly mount the /dev/sda1 partition to the location /mnt/sda/02/boot.
Now, we need to mount the home partition.
This is done with the command: mount /dev/sda3 /mnt/sda/02/home
This command will explicitly mount the /dev/sda3 partition to the location /mnt/sda/02/home.
You should now be ready to extract the system.

## Extracting the System

Let us assume that you mounted the cdrom on /mnt/cdrom/.
If you have need to know how to do this, read the Mounting the CD-Rom.
Let us assume that you partitioned the harddrive as explained in Partitioning the System and have mounted the partitions as explained in Mounting the Partition at the location /mnt/sda/02.
There is a program designed to ease the process of the installer and set all permissions correctly.
Do not install without this tool unless you know what you are doing.
The program is called: extract_system.
Change to the extraction point: cd /mnt/sda/02/
Run the extraction program, specifying the mounted cdrom as the source location: extract_system -s /mnt/cdrom/
Wait for the program to finish.
You are now done extracting the system, the system is now effectively installed.
The next step is to configure the system so that it may boot.

## Configuring the System to Boot

This is the very last step, aside from physically rebooting your computer.
Therefore, you better have read and gone through every other portion of the page.
This will be assuming that the system is properly extracted and mounted at: /mnt/sda/02/.
This will be assuming that you have 3 partitions, a boot, a root, and a home.
NOTE: If at any point during this you need to know what harddrive is what and has what partitions, the command fdisk -l should be used.
You should use the output from fdisk -l to properly configure the etc/fstab file.
Okay, there are two ways to boot your Turtle Kevux System, dynamically or statically.
The static method is less adaptable and slightly more technical given that you have to specify the exact partition locations.
The dynamic method is more adaptable but can under certain cases boot/mount the wrong partitions.
The dynamic method is the preferred method because it can cope better with hardware changes.
Static Method
Edit the file etc/fstab on your new system, which is located at /mnt/sda/02/etc/fstab
Now look for the line that reads: # Turtle-Kevux Basic Layout (Static).
Below this are commented out commands, and a comment is any line that starts with the pound # symbol.
There are two lines to pay attention to, the ones that begin with #/dev/sda1 and #/dev/sda3.
Uncomment these lines by deleting the leading pound # symbol.
These are already pre-configured to work as is based on this documentation.
The next step is to edit the boot/grub/menu.lst file currently located at /mnt/sda/02/boot/grub/menu.lst
There are a lot of notes in this file, so you will need to search for the following lines:
- The line: splashimage=(hd0,0)/boot/grub/turtle_grub.xpm.gz
- The line: title Boot System
The first thing to pay attention to are the lines with (hd0,0).
If you followed the instructions in this documentation, then you will not have to pay attention to these.
However, the importance of these lines deem it necessary to at least make you take not of them for future reference.
Now that that is out of the way, the only line you should have to pay attention is the second line below title Boot System.
It is the line that begins with kernel
On this line, you need to scroll down that entire long line and change finalroot=LABEL=turtle_/ to /dev/sda2
Notice how this information directly relates to what you did with the etc/fstab file that is currently located at /mnt/sda/02/etc/fstab
You are now done with the static configuration, skip below to the grub/mbr installation below.
WARNING: When editing any and all files, don't forget to save them before quitting or all of the typing that you did will have to be repeated.
Dynamic Method
Edit the file etc/fstab on your new system, which is located at /mnt/sda/02/etc/fstab
Now at the very top of the file you should see: # Turtle-Kevux Embedded Layout (Dynamic)
There are two lines to pay attention to, the ones that begin with: #LABEL=turtle_/boot and #LABEL=turtle_/home
Uncomment these lines by deleting the leading pound # symbol.
Notice that each of these lines start with LABEL=, this means that you are using the devices based on a name that you give them.
These devices currently do not have names, so we need to create them.
The names MUST be identical to the names define in the etc/fstab file located at /mnt/sda/02/etc/fstab.
To create the name for the first one, the boot partition which is currently the partition defined at /dev/sda1, you need to type the following: e2label /dev/sda1 turtle_/boot
Notice that there is no LABEL= preceding the turtle_/boot.
If you were to execute the command e2label /dev/sda1 LABEL=turtle_/boot, then your etc/fstab file would have to have the line: LABEL=LABEL=turtle_/boot.
Repeat the process, this time for the root partition currently located at /dev/sda2: e2label /dev/sda2 turtle_/
repeat the process, this time for the home partition currently located at /dev/sda3: e2label /dev/sda3 turtle_/home
If you change the names of these partitions to something else, make sure to reflect the changes in the etc/fstab file which is currently located at /mnt/sda/02/etc/fstab.
WARNING: The command e2label will not work if you did not format the partitions with the ext2 or ext3 filesystems.
WARNING: Because the dynamic method mounts based on names, if two partitions have the same name, then something will most likely go wrong.
This is one of the few problems with the dynamic method.
The next step is to edit the boot/grub/menu.lst file currently located at /mnt/sda/02/boot/grub/menu.lst
There are a lot of notes in this file, so you will need to search for the following lines:
- The line: splashimage=(hd0,0)/boot/grub/turtle_grub.xpm.gz
- The line: title Boot System
The first thing to pay attention to are the lines with (hd0,0).
If you followed the instructions in this documentation, then you will not have to pay attention to these.
However, the importance of these lines deem it necessary to at least make you take not of them for future reference.
Now that that is out of the way, the only line you should have to pay attention is the second line below title Boot System.
It is the line that begins with kernel
On this line, you need to scroll down that entire long line and look at the part that has finalroot=LABEL=turtle_/.
Notice how this information directly relates to what you did with the etc/fstab file that is currently located at /mnt/sda/02/etc/fstab
This is the line that tells the boot process which partition is the root partition.
Because the file is pre-configured to use the dynamic method you will not have to change this unless you gave the root partition a name different from turtle_/.
You are now done with the dynamic configuration, skip below to the grub/mbr installation below.
WARNING: When editing any and all files, don't forget to save them before quitting or all of the typing that you did will have to be repeated.
grub/mbr installation
The grub file was configured, but it was not installed into what is called the mbr (master boot record).
This mbr tells the system how to boot.
Therefore it needs to be installed.
The first step is to start the program by running: grub.
Now, remember those (hd0,0) lines from the boot/grub/menu.lst file currently location at /mnt/sda/02/boot/grub/menu.lst?
Well, now you have to type the following: root (hd0,0)
Don't forget to press the enter key.
That line tells the grub program that you will install to the first harddrive (the 0 to the left of the comma) and to look for the boot/grub/menu.lst file on the first partition (the 0 to the right of the comma) of that harddrive.
The next command installs the grub program to the mbr.
The command to install grub is: root (hd0)
This will install grub to the mbr of the first harddrive.
Now exit the program (assuming everything worked) with the quit command:quit.
You should now be completely finished the installation process and can reboot your machine.
an easy way to do this is type the command: reboot or press the Control + Alt + Delete key sequence.