OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

6.2.3. Mounting Virtual Kernel File Systems‌

Now mount the remaining virtual kernel filesystems:


mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc

mount -vt sysfs sysfs $LFS/sys mount -vt tmpfs tmpfs $LFS/run

mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620 mount -vt proc proc $LFS/proc

mount -vt sysfs sysfs $LFS/sys mount -vt tmpfs tmpfs $LFS/run


The meaning of the mount options for devpts:


gid=5

This ensures that all devpts-created device nodes are owned by group ID 5. This is the ID we will use later on for the tty group. We use the group ID instead of a name, since the host system might use a different ID for its tty group.

mode=0620

This ensures that all devpts-created device nodes have mode 0620 (user readable and writable, group writable). Together with the option above, this ensures that devpts will create device nodes that meet the requirements of grantpt(), meaning the Glibc pt_chown helper binary (which is not installed by default) is not necessary.


In some host systems, /dev/shm is a symbolic link to /run/shm. The /run tmpfs was mounted above so in this case only a directory needs to be created.


if [ -h $LFS/dev/shm ]; then

mkdir -pv $LFS/$(readlink $LFS/dev/shm)

fi

if [ -h $LFS/dev/shm ]; then

mkdir -pv $LFS/$(readlink $LFS/dev/shm)

fi


Top OS Cloud Computing at OnWorks: