Monday, June 7, 2010

Chapter 6.2. Preparing Virtual Kernel File Systems

Here we go. Following all recomendations (no optimisation, no parallel compiling). Recall from Chapter 5,

The commands in the remainder of this book must be performed while logged in as user root and no longer as user lfs. Also, double check that $LFS is set in root's environment.

Ok, so type "su -" and log in as root. (check echo $LFS, else export LFS=/media/lfs)

This makes "directories onto which the file systems will be mounted:"
mkdir -v $LFS/{dev,proc,sys}

I have no idea what a device node is.The numbers 5 1 and 1 3 appear in the file listing.

mknod -m 600 $LFS/dev/console c 5 1
mknod -m 666 $LFS/dev/null c 1 3
 
crw------- 1 root root 5, 1 2010-06-07 16:43 console
crw-rw-rw- 1 root root 1, 3 2010-06-07 16:43 null

Not really sure what this means: "A bind mount is a special type of mount that allows you to create a mirror of a directory or mount point to some other location.", or rather its purpose.

Here are the outputs ($LFS replacing my real directory) of the mount command. Not sure why each one is different or whether I should worry about it.
  • mount: devpts already mounted or $LFS/dev/pts busy,
    mount: according to mtab, devpts is already mounted on $LFS/dev/pts
  • shm on $LFS/dev/shm type tmpfs (rw)
  • $LFS/proc on $LFS/proc type proc (rw)
  • sysfs on $LFS/sys type sysfs (rw)
Output of df looks very strange for shm:
 /dev/sdb6             9,9G  651M  8,8G   7% $LFS
shm                    760M     0      760M   0% $LFS/dev/shm
Maybe I do not see the others because they are virtual Kernel filesystems? shm is shared memory, it seems.


    No comments:

    Post a Comment