Linux From Scratch on Ubuntu Part 2 - Step By Step

Posted by Michael Thu, 18 Jan 2007 09:44:59 GMT

This is Part 2 of a 4 part series. Part 1 is here.

It’s important to note that I’m an advanced Linux geek and I DID READ THE ENTIRE LFS BOOK FROM COVER TO COVER.

That being said, I decided to start with the excellent jhalfs tool which is part of Automated Linux from Scratch to automate my first LFS build.

The spoiler is that I didn’t have much trouble and things went off without any issues.

Since most people are really impatient and don’t want to actually read the book

SHAME ON YOU!

But none the less, here’s a quick overview of what I did:

Installed Ubuntu 6.10 Server in a VMWare VM (you could use any VM software, I just happen to have several available VMWare servers in a build farm) with default options, no additional software on SCSI emulated disks. I used SCSI disks in VMWare because I wanted my LFS fstab file with a sane device layout with IDE disks. I intend to install a number of these custom OS’s on an appliance platform that come prebuilt with IDE hard drives.

I added a single IDE hard drive after the Ubuntu install. I used fdisk to partition the drive with 2 primary partitions, one for the filesystem and one for swap space.

Then it was on to:

export LFS=/mnt/build_dir
sudo mkdir /mnt/build_dir
sudo mke2fs -f /dev/hda1
sudo mount /dev/hda1 /mnt/build_dir
sudo chown -R lfs.lfs /mnt/build_dir
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install openssh-server subversion \
make libncurses5-dev gcc gawk xsltproc bc tidy \
docbook-utils byacc
mkdir ~/src
cd ~/src
wget http://www.linuxfromscratch.org/alfs/downloads\
/jhalfs/stable/jhalfs-2.1.tar.bz2
tar -xjvf jhalfs-2.1.tar.bz2
cd jhalfs-2.1
At this point you can type
make
and you’ll get a nice ncurses based menu to select your options, save the makefile and let it start the build. If you are REALLY LAZY and want all of the work done for you, I’ve made my config files available online. You could continue with:
wget http://download.imapenguin.com/LFS/md/LFS-build-md-1.0.tgz
tar -xzvf LFS-build-md-1.0.tgz 
make
You’ll now get the menuconfig screen, you can just exit, select yes to save your changes and get a cup of tea while it builds for you.

I’ll be happy to help you with any issues at mike@imapenguin.com ONLY IF YOU HAVE ACTUALLY READ THE LFS BOOK! You have to at least make the effort to get free help.

In Part 3, we’ll install the bootloader, do some housecleaning and talk about where to go next.

Posted in , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://weblog.imapenguin.com/trackbacks?article_id=linux-from-scratch-on-ubuntu-part-2-step-by-step&day=18&month=01&year=2007

Comments are disabled