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 -------------------------------- Dated: 04.01.2011 Refer to LICENSE file for new lisence.