Tuesday 6 July 2010

Linux Amiga Project - Strategy

Before we start formatting and compiling, here is the overview of the whole LFS install process.

The strategy adopted by the LFS book is to use the existing tools on the Host system to build a new set of tools just for the installation of LFS. These tools are known as the 'Toolchain'. Once the base system has been installed the Toolchain can safely be deleted. It is not used in building any of the BLFS software.

When the tool chain has been made, we will then chroot into the LFS partition. This effectively means that we fool the system into thinking that '/media/lfs' is '/'. At this point, as the book says, all we are using of the host system is the running kernel. We now use the Toolchain to build all the packages for a fully functional system.

Once the packages are all installed, we do some configuration to them, and organise the programs that Linux runs when it boots. These steps are explained clearly in the book. The final steps we take are to make the system bootable. First of all we create an /etc/fstab file which contains all the information about where we want our hard disk partitions mounted in the filesystem. This will be a bit tricky with the USB Key, because it varies from machine to machine. We will be using the UUID system to avoid problems with that. Next we will configure and build the kernel.

Compiling your own kernel is certainly one of the reasons to use LFS. Instead of getting a kernel that has support for all the video cards in the world, I only need support for the one I have. Extend this to all the hardware in my system, you can see that I will end up with a very specialised kernel that's smaller and faster to use than a jack of all trades system. It is quite tricky to do this though, and the guides that are out there are not brilliant. Because it is such an individual process a uniform guide is not possible. Hence, the book skips over this procedure. I will set out the Kernel Settings that work for me with my three different systems.

The last step is to install Grub. Grub is a bootloader. It is a bit of software that sits at the beginning of a disk OR partition and tells the PC's BIOS how to load the operating system. Because I am going to be using the whole USB Key to install LFS, this is not a big deal. If I was installing multiple operating systems to the disk, then it is worth noting that I could install Grub to the LFS partition only. I would do this if I already had an operating system on the machine. I could then just tell that system to add the LFS partition as another boot option. It is then all self contained in its own partition.

Once I have done all that I will (hopefully) have a booting system. All I will have to show for it, however, is a flashing command prompt and a text editor. If you are following along, this is hardly the open source computing experience that you were expecting is it? By this stage you will probably have spent the better part of a week getting to this point. As a result you will be inordinately happy and filled with a sense of achievement. You will want to boast to others about your new Linux system built from scratch. If at all possible resist the temptation. You will end up showing them the running system, and they will ask if it is 1981. If they are not IT literate enough to make that joke, they will stare in horrified fascination and ask if 'that' is what you have spent the last week ignoring them to achieve.

At this point to get audio working I will install ALSA, which is fairly straightforwards. I will remember to run alsamixer at the command line to unmute my sound channels before I will get any actual sound. I will also install some networking utilities, and the firmware I need for my wireless network card.

No matter how many nice sounds you get coming out of your system's speakers, or how satisfying it is to ping www.google.com from the command line, I will need to get some sort of graphical interface going, before I am going to impress anyone normal, or indeed run an Amiga Emulator.

Whatever any Linux flavour looks like when it is up and running, it is using the X server to display the graphics. That is pretty much all that X does. The instructions for installing X in BLFS are pretty good. One thing to watch out for is the driver-7.?.wget file. You need to edit that in advance and comment out (put a '#' at the beginning of the line) the drivers that you do not need. This will probably be most of them. If you do not know which drivers you need for your system, then back slowly away from the computer LFS is not for you. It's not too tricky actually, you have file names like xf86-input-keyboard-1.4.0.tar.bz2 and xf86-input-mouse-1.5.0.tar.bz2. These I will need. I am also going to be using this on my laptop, so I also want the synaptics one for the trackpad. The rest is fairly obvious – just match it to whatever video hardware is in the machine.

If you follow the BLFS instructions then when you run X for the first time you will get an xterm window and a clock. The xterm window is a graphical version of the text based command line you have been using.

At this point I will attempt to install the Amiga Emulator.

I should point out at this stage that I will be reproducing the vast majority of the Linux From Scratch commands in the posts which follow. LFS is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.0 License. My personal view is therefore that these Blog posts constitute a Derivative Work under that licence. Insofar as the commands to be repeated are computer software, the MIT Licence contained in the book applies. Both licences are held to be incorporated herein, and can be read here.

Right. We have our plan, we have our basics, we have our prerequisites, and we have our strategy. Let the grand fuck up commence.

No comments:

Post a Comment