Changes between Version 22 and Version 23 of bootloaders/syslinux


Ignore:
Timestamp:
05/12/17 20:39:58 (7 months ago)
Author:
r4$K19nlypCPX8kt
Comment:

Code-blocks adj to 'preformatted' style; was already present on grub{-legacy,2} btldr pages.

Legend:

Unmodified
Added
Removed
Modified
  • bootloaders/syslinux

    v22 v23  
    1616=== Build Nasm === 
    1717 
    18 ./configure --prefix=/cross-tools &&[[BR]] 
    19 make &&[[BR]] 
    20 make install[[BR]] 
     18{{{ 
     19./configure --prefix=/cross-tools && 
     20make && 
     21make install 
     22}}} 
    2123 
    2224== Changes for Boot Section == 
     
    2830 
    2931==== IA32/64: ==== 
    30 EFI_IA_NBITS=64    # 32 or 64 . 
    31  
    32 make PREFIX=cross-tools efi${EFI_IA_NBITS} &&[[BR]] 
    33 make PREFIX=cross-tools efi${EFI_IA_NBITS} install[[BR]] 
     32{{{ 
     33EFI_IA_NBITS=64        # 32 or 64 . 
     34make PREFIX=cross-tools efi${EFI_IA_NBITS} && 
     35make PREFIX=cross-tools efi${EFI_IA_NBITS} install 
     36}}} 
    3437 
    3538=== Build Syslinux === 
    3639 
    37 make CROSS_COMPILE=${CLFS_TARGET}- installer &&[[BR]] 
    38 install -m 755 extlinux/extlinux /cross-tools/bin &&[[BR]] 
    39 install -d -m 755 /cross-tools/syslinux &&[[BR]] 
    40 install -m 644 mbr/mbr.bin /cross-tools/syslinux[[BR]] 
     40{{{ 
     41make CROSS_COMPILE=${CLFS_TARGET}- installer && 
     42install -m 755 extlinux/extlinux /cross-tools/bin && 
     43install -d -m 755 /cross-tools/syslinux && 
     44install -m 644 mbr/mbr.bin /cross-tools/syslinux 
     45}}} 
    4146 
    4247=== Configure Extlinux === 
     
    4550the Primary Boot Drive. I will assume the Primary Boot Drive is /dev/sda.[[BR]] 
    4651 
    47  
    48 dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] 
     52{{{ 
     53dd if=/dev/zero of=/dev/sda bs=446 count=1 
     54}}} 
    4955 
    5056==== Bootcode ==== 
    51 BOOTCODE_TYP='gpt' ;    # 'gpt' (for GPT) or empty-string (for MBR).[[BR]] 
    52 dd bs=440 conv=notrunc count=1 if=/cross-tools/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda[[BR]] 
     57{{{ 
     58BOOTCODE_TYP='gpt' ;        # 'gpt' (for GPT) or empty-string (for MBR). 
     59dd bs=440 conv=notrunc count=1 if=/cross-tools/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda 
     60}}} 
    5361 
    5462Second we will install the Extlinux.sys file for bootup. This is the bootloader.[[BR]] 
    55 install -d ${CLFS}/boot[[BR]] 
    56 extlinux --install ${CLFS}/boot[[BR]] 
     63{{{ 
     64install -d ${CLFS}/boot 
     65extlinux --install ${CLFS}/boot 
     66}}} 
    5767 
    5868Now we will create our extlinux.conf file. Change root_device to your root partition of your 
    5969Primary Boot Drive.[[BR]] 
    6070 
    61 cat >> ${CLFS}/boot/extlinux.conf << "EOF"[[BR]] 
    62 default boot[[BR]] 
    63 prompt 0[[BR]] 
    64 timeout 10[[BR]] 
    65 [[BR]] 
    66 label boot[[BR]] 
    67         kernel clfskernel-boot[[BR]] 
    68         append rw root=root_device[[BR]] 
    69 EOF[[BR]] 
     71{{{ 
     72cat >> ${CLFS}/boot/extlinux.conf << "EOF" 
     73default boot 
     74prompt 0 
     75timeout 10 
     76 
     77label boot 
     78        kernel clfskernel-boot 
     79        append rw root=root_device 
     80EOF 
     81}}} 
    7082 
    7183== Changes for Final-System Section == 
     
    7385=== Build Nasm === 
    7486 
    75 ./configure --prefix=/usr &&[[BR]] 
    76 make &&[[BR]] 
    77 make install[[BR]] 
     87{{{ 
     88./configure --prefix=/usr && 
     89make && 
     90make install 
     91}}} 
    7892 
    7993=== Build GNU-EFI === 
    8094 
    8195==== IA32/64: ==== 
    82 EFI_IA_NBITS=64    # 32 or 64 . 
    83  
    84 make PREFIX=usr efi${EFI_IA_NBITS} &&[[BR]] 
    85 make PREFIX=usr efi${EFI_IA_NBITS} install[[BR]] 
     96{{{ 
     97EFI_IA_NBITS=64        # 32 or 64 . 
     98make PREFIX=usr efi${EFI_IA_NBITS} && 
     99make PREFIX=usr efi${EFI_IA_NBITS} install 
     100}}} 
    86101 
    87102=== Build Syslinux === 
     
    90105over so that we can have a menu at bootup. 
    91106 
    92 make installer &&[[BR]] 
    93 make install &&[[BR]] 
    94 cp -ar /usr/share/syslinux/menu.c32 /boot[[BR]] 
     107{{{ 
     108make installer && 
     109make install && 
     110cp -ar /usr/share/syslinux/menu.c32 /boot 
     111}}} 
    95112 
    96113=== Configure Extlinux === 
     
    102119the pre-made ones are used instead. This reinstall will ensure that we now use the ones we just built.[[BR]] 
    103120 
    104 dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] 
     121{{{ 
     122dd if=/dev/zero of=/dev/sda bs=446 count=1 
     123}}} 
    105124 
    106125==== Bootcode ==== 
    107 BOOTCODE_TYP='gpt' ;    # 'gpt' (for GPT) or empty-string (for MBR).[[BR]] 
    108 dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda[[BR]] 
     126{{{ 
     127BOOTCODE_TYP='gpt' ;        # 'gpt' (for GPT) or empty-string (for MBR). 
     128dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda 
     129}}} 
    109130 
    110131Second we will install the extlinux.sys file for bootup. This is the bootloader.[[BR]] 
    111 extlinux --install /boot[[BR]] 
     132{{{ 
     133extlinux --install /boot 
     134}}} 
    112135 
    113136Now we will create our extlinux.conf file. Change root_device to your root partition of your 
    114137Primary Boot Drive.[[BR]] 
    115138 
    116 cat >> /boot/extlinux.conf << "EOF"[[BR]] 
    117 default menu.c32[[BR]] 
    118 prompt 0[[BR]] 
    119 menu title CLFS Boot Menu[[BR]] 
    120 [[BR]] 
    121 timeout 60[[BR]] 
    122 [[BR]] 
    123 label linux[[BR]] 
    124         menu label CLFS Kernel {kernel_version}[[BR]] 
    125         menu default[[BR]] 
    126         kernel clfskernel-{kernel_version}[[BR]] 
    127         append rw root=root_device[[BR]] 
    128 [[BR]] 
    129 label boot[[BR]] 
    130         menu label CLFS Boot Stage Kernel[[BR]] 
    131         kernel clfskernel-boot[[BR]] 
    132         append rw root=root_device[[BR]] 
    133 EOF[[BR]] 
     139{{{ 
     140cat >> /boot/extlinux.conf << "EOF" 
     141default menu.c32 
     142prompt 0 
     143menu title CLFS Boot Menu 
     144 
     145timeout 60 
     146 
     147label linux 
     148        menu label CLFS Kernel {kernel_version} 
     149        menu default 
     150        kernel clfskernel-{kernel_version} 
     151        append rw root=root_device 
     152 
     153label boot 
     154        menu label CLFS Boot Stage Kernel 
     155        kernel clfskernel-boot 
     156        append rw root=root_device 
     157EOF 
     158}}}