Build a new Linux From Scratch (LFS) system using QEMU's x86_64 emulation for your platform.
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.
To do this assignment, you will need to use QEMU, a virtualization technology similar to VirtualBox; it can be installed on your machines via:
$ apt-get install qemu qemu-kvm qemu-systemYou then need to create two new QEMU image files:
% cd qemu-images % qemu-img create salix.img 11G % qemu-img create lfs.img 11G
Please use two 11 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. Likewise, your host system should need about 11 gigabytes.
As to your "host system", please use Salix 14.2's XFCE install image. Salix is a Slackware distribution, and it is an outstanding platform to build LFS from.
Once you have your installation image, you can boot it and install Salix to the salix.img image:
% qemu-system-x86_64 -cdrom salix64-xfce-14.2.iso -hda salix.img -boot d -m 2048 -enable-kvm
Once you have installed Salix to the image salix.img, you can now boot it up, adding your target lfs.img image where you will begin building LFS 7.10:
% qemu-system-x86_64 -hda salix.img -hdb lfs.img -boot d -m 2048 -enable-kvm
The installation book for LFS 7.10 can be found here. Please start reading from the beginning, and do all of the installation work through the end of chapter 9. 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.8G 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.
Once you have completed the installation, you can test it with:
% qemu-system-x86_64 -hda lfs.img -boot d -m 2048 -enable-kvm
Please note that the final deliverables for this project will be a completed LFS 7.10 lfs.img file and a tar file containing a copy of your $LFS/tools directory made at the end of Chapter 5. These should be placed on a 16 gigabyte or larger flash drive, and given to me during my office hours. (If you don't have a suitable flash drive, I can lend you one; also, if my office hours are not convenient, let me know and we can schedule a different time.)
Extra credit: You can earn extra 5 points of credit for this semester if you turn this in by Monday, November 14. No credit will be given for assignments turned in late, so start on this early if you intend to do this.