Chapter 9 The End

There is nothing for you to do in this chapter. This is the make or break time. Either your machine will boot or it won't. Take a snapshot before rebooting!

Rebooting

To reboot your machine simply click Logout in the LXDE program menu. Then you just need to click Reboot in the resulting window.

After your machine has shutdown, it will reload using a BIOS just like a physical machine. You need to set the boot device to your hard drive. You can do this by pressing F12 at the BIOS screen (select the first hard drive). LFS distro should be the only thing listed there. Next, comes the scary part. The kernel will attempt to load. If your kernel fails you will get a "Kernel Panic!" message. This means you did not compile or install your kernel correctly. Kernel loading is followed by the boot scripts running through the init process. Everything should display a green OK. If not then you have problems. Finally, you should see a login prompt.

After Reboot

Problems?

If you have any problems you will need to come and see me. I can't really give general advice here because each person will probably have something different wrong with their system. So come and see me with your problems.

Success???

Lets suppose your machine worked right off the bat. If your machine booted perfectly, then you will be confronted with a login prompt. Go ahead and login into the root account.

Basic Tools Check

Your basic tools probably installed correctly if you got this far. To check, examine the contents of the /bin and /usr/bin directories by running the command below. The command below display any programs with a zero file size, it should only print the word done.

find {,/usr}/bin -size 0 && echo done

Mouse Deamon Check

Next we need to see if your mouse daemon is working. Try clicking on the VM's window and move your mouse around try highlighting and pasting text using the middle-click.

Network Check

Next we need to see if DHCP worked. To check this we will use two steps first we will see if we have an IP address. Virtual box usually assigns IPs in the 10.0.*.* range. I have given you an example output for the command below. Don't be startled if your output is slightly different than mine. What matters is the inet field has a valid IP range.

ip addr show eth0 | grep inet
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
    inet6 fe80::a00:27ff:feb29:869/64 scope link

Next we need to check if we can talk to the outside world. To do that we will use w3m to lookup a website.

w3m www.google.com

Finally, lets make sure that wget is working by accessing Google via HTTPS. This command should print Success

wget https://www.google.com --no-check-certificate -O/dev/null && echo Success

Fstab Check

We need to check that you mounted all of your filesystems correctly. Issue the command below. The order of the lines may be different, just make sure that the marked entries are there.

mount
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
tmpfs on /run type tmpfs (rw)
devtmpfs on /dev type devtmpfs (rw,nosuid,mode=0755)
/dev/sda2 on /home type ext4 (rw)
/dev/sdb1 on /sources type ext4 (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)

The swap partition is not technically mounted. Swap partitions are listed in the /proc filesystem.

cat /proc/swaps
Filename            Type        Size    Used    Priority
/dev/sda3           partition   785404  0       1

Eject CDROM

Our fake CD is still in the virtual CD drive. We need to eject it so your machine will reboot normally. To eject the CD drive just run the command below. If this was a physical machine, the CD tray would have opened, but because it is a VM it simply ejects and removes the CD from the Guest.

eject /dev/cdrom

If everything works you did it!!!!
Hurray for you!