Next Previous Contents

2. The Filesystem

Our new system is going to live in a file system. So first, we have to make that file system using mke2fs. Then mount it somewhere. I'd suggest /mnt/target. In what follows, I'll assume that this is where it is. You could save yourself a bit of time by putting an entry in /etc/fstab so that it mounts there automatically when the source system comes up.

When we boot up the target system, the stuff that's now in /mnt/target will be in /.

We need a directory structure on target. Have a look at the File Heirarchy Standard (see section Filesystem) to work out what this should be, or just cd to where the target is mounted and blindly do

        mkdir bin boot dev etc home lib mnt root sbin tmp usr var
        cd var; mkdir lock log run spool  
        cd ../usr; mkdir bin include lib local sbin share src
        cd share/; mkdir man; cd man 
        mkdir man1 man2 man3 ... man9

Since the FHS and most packages disagree about where man pages should go, we need a symlink

        cd ..; ln -s share/man man

Next Previous Contents