CNT5605 - 2019 Summer

Assignment: Linux From Scratch 8.4 installation preliminaries

Objective

Build a new Linux From Scratch (LFS) system using QEMU's x86_64 emulation for your platform. ALL WORK ON THIS ASSIGNMENT MUST BE DONE IN THE NETWORKING LAB IN LOVE 016. I will verify that your machine has been used to do this assignment. All testing of your work products will be done on your assigned machine.

DO NOT RUN QEMU AS ROOT!

Assignment Details

Building Linux From Scratch (LFS) is a challenging and rewarding exercise for a system administrator. In doing this assignment, you will become thoroughly familiar with all of the parts of a Linux system.

Create a new QEMU image file "lfs-8.4.img" in a subdirectory called "qemu-images/".

% cd qemu-images
% qemu-img create lfs-8.4.img 11G
      

Please use an eleven gigabyte partitions; LFS is a source code install with heavy testing requirements, and 11 gigabytes give you a generous amount of space to work in.

As to your "host system", please use your Arch image to do this build. It's an excellent platform for building Linux From Scratch.

So, the first step is to boot your image arch.img, adding your target lfs-8.4.img image where you will begin building LFS 8.4:

% qemu-system-x86_64 -hda arch.img -hdb lfs-8.4.img -boot c -m 8192 -enable-kvm
      

The installation book for LFS 8.4 can be found here. Please start reading from the beginning; you should be finished with Chapter 5 by June 5. Please note that your mount point /mnt/lfs should be pointed at /dev/sdb1.

Filesystem        Size    Used  Avail  Use%  Mounted on
/dev/root         10.8G    4.2G   6.1G   45%  /
/dev/sdb1         10.8     374M   9.9G    4%  /mnt/lfs
      

I would suggest adding an entry to /etc/fstab so that you don't have to remount /mnt/lfs by hand each time you reboot.

/dev/sdb1   /mnt/lfs     ext4   defaults   0   1
    

The admonitions in chapter 2 "Building LFS in stages" are an excellent checklist for making sure that your build is a success. In particular, you must make sure that each time that you reboot your Arch host system that you follow the guidelines in Mounting and Populating /dev and Mounting Virtual Kernel File Systems

Please note that the final deliverables for this project will be a completed LFS 8.4 lfs-8.4.img file, and an intermediate copy of the same file from the end of Chapter 5 named lfs-CHAPTER5.img.

(Chapter 5 is where you build your intermediate tool chain before going into the chroot environment.) You should be finished with Chapter 5 by Wednesday, June 12, and we will meet in the lab that day so that we can verify your progress.

The initial deadline for finishing this project is Monday, June 24.