README

Below is the README file that was released on the 8th September 2008 (GMT+1) with Blue Square Linux 2008.08 Felix LiveCD-R2.

Welcome to Blue Square Linux.
This is a quick guide to installing BSL onto your system.
Written: 8th September 2008

1.	Introduction
2.	Networking (optional)
3.	Partitioning the hard drive
4.	Formatting the hard drive
5.	Mounting the hard drive
6.	Running the scripts
7.	Setting up the boot loader
> 7a.	Installing the boot loader
> 7b.	Adding BSL to another distribution
8.	First boot
9.	License

1. Introduction
-------------------------------
Blue Square Linux is created by Jonathan Norman based on the 
Linux From Scratch project. BSL is aimed at developer workstations
and servers with compilation tools and stable software. BSL 2008.08 
Felix is the first public release so please enjoy :)

Website: bluesquarelinux.co.uk
Email: jonathan [at] bluesquarelinux.co.uk

Before you can install BSL you are required to log in as the
root user and follow the steps below.

2. Networking (optional)
-------------------------------
If you do not require access to your network or the internet
then you may skip this stage.

Release 2 of the LiveCD has added networking and DHCP support.
In order to use the network you are required to load the correct
kernel module for your network card. After you have done this
you will then be able to start network support on the LiveCD.
The network card modules are located in:

/lib/modules/2.6.25.10/kernel/drivers/net

Assuming that you are using the PCnet32 network card that is common
for the VMware and VirtualBox software you will have to issue these
commands to first load the module then start the networking support.

$ insmod /lib/modules/2.6.25.10/kernel/drivers/net/pcnet32.ko
$ /etc/rc.d/init.d/network start

3. Partitioning the hard drive
-------------------------------
Assuming that you wish to install BSL to your primary master IDE 
hard drive, Your hard drive will be /dev/hda but it has no partitions
on it. Open the hard drive with the fdisk partition editor.

$ fdisk /dev/hda

Linux requires two partitions. A root partition for the OS and
a swap partition for virtual memory. First we will make the root
partition on the hard drive. Technically the swap partition is not
required but it is strongly recommended.

Press "n" to create a new partition and then select "p" for
"primary partition". Now enter "1" (one) because this is the first partition.
For the first cylinder just press the return key for the default.
Say you have a 40GB hard drive and you wish to have 2GB swap at the end.
For the last cylinder enter "+38G" (40GB - 2GB = 38GB).

To make the swap partition you press "n" followed by "p" like before.
Enter "2" or "3" (two or three respectfully) depending on if you want
to have /dev/hda2 or /dev/hda3 as your swap. As there is 2GB of
space left at the end of the hard drive you simply have to hit the
return key to use the default values for the cylinders.

Once you are finished press "p" to check out the new partition map and
also make a note of your root and swap partitions, as you will need them
later on. Once you are ready press "w" to write this information to the
partition table.

4. Formatting the hard drive
-------------------------------
Before you can use your hard drive it needs to be formatted. The default 
file system for BSL is XFS but you may wish to use ext3 for example.
The below will show you how to format the hard drive in XFS or ext3
using the /dev/hda example from above. ONLY DO ONE OF THE BELOW COMMANDS.

XFS
$ mkfs.xfs /dev/hda1

ext3
$ mkfs.ext3 /dev/hda1

This will format your root partition and now make it usable. Next
you will format your swap partition.

$ mkswap /dev/hda2


5. Mounting the hard drive
--------------------------------
In order to be able to install BSL to your hard drive you need to mount
it first. To do that you first need to make a mount point. The first
command creates a mount point called "drive" under the "/mount" directory.
The second command mount your target drive of /dev/hda1 to this.
If you used ext3 instead of XFS replace "xfs" with "ext3" in the second
command.

$ mkdir -v /mount/drive
$ mount -t xfs /dev/hda1 /mount/drive


6. Running the scripts
--------------------------------
There are shell scripts that will install BSL located inside 
/root/scripts and the one that you will use is called "install.sh". 
This is the master script with runs all of the others and sets
important variables. There are two ways to run the script.

With DESTDIR:
$ DESTDIR=/mount/drive /root/scripts/install.sh

Without DESTDIR:
$ /root/scripts/install.sh
# Please enter the mount point you wish to install Blue Square Linux
to (e.g. /mnt/hda) :

At this point you should now enter "/mount/drive" because this is
your mount point.

During the scripts you will be asked for a hostname, this is the name you
wish to call your computer by. The hostname must not contain any spaces or
symbols. You will also be asked for your root partition (/dev/hda1), your 
root file system (xfs) and your swap partition (/dev/hda2). These should 
have been noted down from step 2. After this the script will finish the 
installation itself.

7. Setting up the boot loader
-------------------------------
If you are installing BSL to a blank hard drive please follow step 6a.
If you want to add BSL as a boot option under another linux distribution
follow step 6b.

7a. Installing the boot loader
--------------------------------

Before your installation can be booted into you need to install GRUB.
GRUB is the boot loader used by BSL and in order to install it you
first need to mount /dev and /proc in your installation.

$ mount -v --bind /dev /mount/drive/dev
$ mount -t proc proc /mount/drive/proc

Now you can chroot into your installation. Without /dev and /proc mounted
you will not be able to install GRUB to your MBR. To chroot into your
installation run the below command.

$ chroot /mount/drive

Once inside the chroot you should now open up the GRUB console.

$ grub

Tell grub what hard drive you want to use as your root partition.
GRUB uses it's own naming structure for drives and partitions
so /dev/hda1 becomes (hd0,0) because hda is your first hard drive,
"o" (zero) and the "1" (one) is your first partition (also zero).

> root (hd0,0)

The last stage in the installation of GRUB is to write the boot
loader to your MBR. This will be (hd0) for /dev/hda.

> setup (hd0)
> quit

Now your GRUB is installed to the MBR is complete you will now exit the
chroot and unmount the /dev and /proc devices that you mounted earlier.
At this point you will also unmount the installation point

$ exit
$ umount /mount/drive/proc
$ umount /mount/drive/dev
$ umount /mount/drive

7b. Adding BSL to another distribution
-------------------------------
You will need to add the following lines to the bottom of
/boot/grub/menu.lst . This is the grub configuration files and is
read at boot time and listed the boot options installed. This option
is for advanced users because you will have to substitute the values
of "root" and "root=" .

title Blue Square Linux 2008.08 Felix
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 vga=789

8. First boot
------------------------------
When you first boot your BSL system you will be asked to login,
because you have not created any users you should login as the "root"
user. There is no password yet but once you login you should see a file
called "first_boot.sh". Run this file and it will rebuild the RPM database
and will also ask you to set a root password.

9. License
--------------------------------
Copyright (c) 2008, Jonathan G. Norman
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, 
are permitted provided that the following conditions are met:

   	* Redistributions of source code must retain the above copyright notice,
	  this list of conditions and the following disclaimer.

	* Redistributions in binary form must reproduce the above copyright notice,
	  this list of conditions and the following disclaimer in the documentation
	  and/or other materials provided with the distribution.
 
	* Neither the name of the Blue Square Linux nor the names of its contributors
	  may be used to endorse or promote products derived from this software without
	  specific prior written permission.

Redistribution of the installation shell scripts, without modifications, are
permitted provided that the following conditions are met:

	* Redistribution of installation scripts must be as part of the Blue
	  Square Linux LiveDVD.

	* Redistribution of installation scripts with modifications to RPM_TOP and
	  TOP variables are permitted.

	* Redistribution of installation scripts with modifications to RELEASE_NAME,
	  RELEASE_VER and ARCH variables are not permitted.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.