LFS Build Environment

Would you like to build Linux From Scratch but are unsure of the optimum environment in which to do so? If so, then this how-to is for you. I’ll be showing you how to install a customized Slackware Linux virtual machine that you can utilize in your LFS adventure. The advantage of doing this in a VM is that you leave your base OS untouched and can easily revert to prior images or even start again from scratch (no pun intended) if needed. So roll up your sleeves, grab a cup of Joe or a pint, and get ready to get your geek on.

Prerequisites:

First things first of course is to become familiar with the LFS book. If you really want to know what goes on under the hood of Linux, this is where to start. Once you’re finished building your own Linux From Scratch it’s a very satisfying feeling to see it boot. (Essential Pre-reading)

Next download the latest Slackware Linux ISO. All you need is the first DVD. I recommend if this is your first trip down the LFS hole that you go with the 32-bit version.

And finally download and install the VirtualBox binaries.

To facilitate this process, let’s break it down into the following stages which we’ll cover sequentially:

  1. Create VirtualBox host VM
  2. Tweak/Optimize VM
  3. Install host OS (Slackware)
  4. Connect LFS Drive and Final Setup

Creating the VirtualBox Host VM

Now let’s take a look at how to create an LFS build environment using Slackware as the host in a VirtualBox VM:

Slackware Create VM

Slackware Create VM

Select Linux 2.6 as Slackware is not an option…click Next

Slackware Memory

Slackware Memory

The default of 256 MB of memory is more than sufficient for LFS and Slackware…click Next

Slackware VM HD

Slackware VM HD

Select Create a virtual hard drive now and click Create

Slackware VM HD Type

Slackware VM HD Type

Select VDI (VirtualBox Disk Image) as drive type and click Next

Slackware Dynamically allocated

Slackware Dynamically allocated

Select Dynamically allocated and click Next

Slackware HD Size

Slackware HD Size

Up the drive size to 10 GB to give us a little breathing room (don’t worry it’s dynamically allocated so this is just the maximum it will grow to) and click Create

Slackware VM Manager

Slackware VM Manager

And now our basic LFS VM is ready for use…throttle back though, there’s more optimization that needs to be done before we install our Slackware LFS host VM.

Continue to Tweaking/Optimizing the VM

 

1  2  3  4  5  6