This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Finalizing the Core OS [July 15, 2012, 11:14 p.m.]



For this task, I've copied a couple of sections in from the CLFS book, and have provided some links to the CBLFS book and other parts of the internet. Your goal here is to get your system to the state where you can boot into it.



 

The File Heirarchy Standard


You can create a standard directory tree with the following commands:

mkdir -pv ${CLFS}/{bin,boot,dev,{etc/,}opt,home,lib,mnt}
mkdir -pv ${CLFS}/{proc,media/{floppy,cdrom},run,sbin,srv,sys}
mkdir -pv ${CLFS}/var/{lock,log,mail,spool}
mkdir -pv ${CLFS}/var/{opt,cache,lib/{misc,locate},local}
install -dv -m 0750 ${CLFS}/root
install -dv -m 1777 ${CLFS}{/var,}/tmp
mkdir -pv ${CLFS}/usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv ${CLFS}/usr/{,local/}share/{doc,info,locale,man}
mkdir -pv ${CLFS}/usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv ${CLFS}/usr/{,local/}share/man/man{1,2,3,4,5,6,7,8}
for dir in ${CLFS}/usr{,/local}; do
  ln -sv share/{man,doc,info} $dir
done

You can learn more about the FHS here,

http://www.pathname.com/

If you came here from chapters 6 and 7, branching from the "To Boot or Chroot?" section, you'll need the following symlinks as well:

ln -sv /tools/bin/{bash,cat,echo,grep,login,pwd,sleep,stty} ${CLFS}/bin
ln -sv /tools/sbin/{agetty,blkid} ${CLFS}/sbin
ln -sv /tools/bin/file ${CLFS}/usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} ${CLFS}/usr/lib
ln -sv /tools/lib/libstd*so* ${CLFS}/usr/lib
ln -sv bash ${CLFS}/bin/sh
ln -sv /run /var/run

 

Making your system bootable


 

Setting up your Sys V Init System


bla bla bla
 

Getting Online


bla bla bla