= Extlinux for CLFS Builds = == Needed Files == Syslinux [[http://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/syslinux-3.73-pre7.tar.bz2]][[BR]] Everything below is only needed if you're following the boot method of the build. NASM [[http://voxel.dl.sourceforge.net/sourceforge/nasm/nasm-2.05.01.tar.bz2]][[BR]] == Changes for Cross-Tools Section == This build is only required if you're using the Boot Method of the build. === Build Nasm === ./configure --prefix=/cross-tools &&[[BR]] make &&[[BR]] make install[[BR]] == Changes for Boot Section == This build is only required if you're using the Boot Method of the build. You can also skip the building of Grub or Lilo. === Build Syslinux === make CROSS_COMPILE=${CLFS_TARGET}- installer &&[[BR]] install -m 755 extlinux/extlinux /cross-tools/bin &&[[BR]] install -d -m 755 /cross-tools/syslinux &&[[BR]] install -m 644 mbr/mbr.bin /cross-tools/syslinux[[BR]] === Configure Extlinux === First we erase the current MBR on the disk, next we will install the MBR for Extlinux on the Primary Boot Drive. I will assume the Primary Boot Drive is /dev/sda.[[BR]] dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] dd if=/cross-tools/syslinux/mbr.bin of=/dev/sda[[BR]] Second we will install the Extlinux.sys file for bootup. This is the bootloader.[[BR]] install -d ${CLFS}/boot[[BR]] extlinux --install ${CLFS}/boot[[BR]] Now we will create our extlinux.conf file. Change root_device to your root partition of your Primary Boot Drive.[[BR]] cat >> ${CLFS}/boot/extlinux.conf << "EOF"[[BR]] default boot[[BR]] prompt 0[[BR]] timeout 10[[BR]] [[BR]] label boot[[BR]] kernel clfskernel-boot[[BR]] append rw root=root_device[[BR]] EOF[[BR]] == Changes for Final-System Section == === Build Nasm === ./configure --prefix=/usr &&[[BR]] make &&[[BR]] make install[[BR]] === Build Syslinux === Now we will build the final version of the Syslinux, and we will copy the menu.c32 file over so we can have a menu at bootup. make installer &&[[BR]] make install &&[[BR]] cp -ar /usr/share/syslinux/menu.c32 /boot[[BR]] === Configure Extlinux === First we erase the current MBR on the disk, next we will install the MBR for Extlinux on the Primary Boot rive. I will assume the Primary Boot Drive is /dev/sda. We repeat this step from above. Reinstalling this ensures us that we are using the currently built version of the file. When Syslinux is cross-compiled, some files are not made and the premade ones are. This will ensure that we use the ones we just built.[[BR]] dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] dd if=/usr/share/syslinux/mbr.bin of=/dev/sda[[BR]] Second we will installed the Extlinux.sys file for bootup. This is the bootloader.[[BR]] extlinux --install /boot[[BR]] Now we will create our extlinux.conf file. Change root_device to your root partition of your Primary Boot Drive.[[BR]] cat >> /boot/extlinux.conf << "EOF"[[BR]] default menu.c32[[BR]] prompt 0[[BR]] menu title CLFS Boot Menu[[BR]] [[BR]] timeout 60[[BR]] [[BR]] label linux[[BR]] menu label CLFS Kernel {kernel_version}[[BR]] menu default[[BR]] kernel clfskernel-{kernel_version}[[BR]] append rw root=root_device[[BR]] [[BR]] label boot[[BR]] menu label CLFS Boot Stage Kernel[[BR]] kernel clfskernel-boot[[BR]] append rw root=root_device[[BR]] EOF[[BR]]