14.3. Rebooting the System

If you built your final system using the boot method, just run shutdown -r now to reboot again, using your newly-built kernel instead of the miminal one currently in use. If you chrooted, there are a few more steps.

The system you have created in this book is quite minimal, and most likely will not have the functionality you would need to be able to continue forward. By installing a few extra packages from CBLFS while still in our current chroot environment, you can leave yourself in a much better position to continue on once you reboot into your new CLFS installation. Installing a text mode web browser, such as Lynx, you can easily view the CBLFS website in one virtual terminal, while building packages in another. The GPM package will also allow you to perform copy/paste actions in your virtual terminals. Lastly, if you are in a situation where static IP configuration does not meet your networking requirements, installing packages such as Dhcpcd or PPP at this point might also be useful.

Now that we have said that, lets move on to booting our shiny new CLFS installation for the first time! First exit from the chroot environment:

logout

Then unmount the virtual file systems:

umount ${CLFS}/dev/pts

if [ -h ${CLFS}/dev/shm ]; then
  link=$(readlink ${CLFS}/dev/shm)
  umount -v ${CLFS}/$link
  unset link
else
  umount -v ${CLFS}/dev/shm
fi

umount ${CLFS}/dev
umount ${CLFS}/proc
umount ${CLFS}/sys
umount ${CLFS}/run

Unmount the CLFS file system itself:

umount ${CLFS}

If multiple partitions were created, unmount the other partitions before unmounting the main one, like this:

umount ${CLFS}/usr
umount ${CLFS}/home
umount ${CLFS}

Now, reboot the system with:

shutdown -r now

Assuming the boot loader was set up as outlined earlier, CLFS 3.0.0-SYSVINIT will boot automatically.

When the reboot is complete, the CLFS system is ready for use and more software may be added to suit your needs.