Install MAKEDEV by running the following commands:
sed "s/# 9/9/" MAKEDEV >$LFS/dev/MAKEDEV &&
chmod 754 $LFS/dev/MAKEDEV &&
cp $LFS/dev/MAKEDEV $LFS/dev/MAKEDEV-temp &&
cd $LFS/dev &&
patch -Ni $LFS/usr/src/MAKEDEV-2.5.patch
The actual creation of the device files in $LFS/dev will be taken care of in chapter 6.
sed "s/# 9/9/" MAKEDEV >/dev/MAKEDEV: By default the Makedev script only creates the hda1-hda8 and hdb1-hdb8 devices. By replacing "# 9" by "9"'s in the MAKEDEV script, it will create hda1-hda20, hdb1-hdb20 and possible others (like hdc and hdd)
chmod 754 /dev/MAKEDEV: This sets the permissions of the MAKEDEV script to mode 754 which makes it executable only for owner and group and readable by everybody.
The MAKEDEV package contains the MAKEDEV script.
MAKEDEV is a script that can aid you in creating the necesarry static device files that usually reside in the /dev directory.