close
Warning:
Can't synchronize with repository "(default)" (GIT backend not available). Look in the Trac log for more information.
- Timestamp:
-
May 12, 2017, 1:39:58 PM (7 years ago)
- Author:
-
M.N. Akhiezer
- Comment:
-
Code-blocks adj to 'preformatted' style; was already present on grub{-legacy,2} btldr pages.
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v22
|
v23
|
|
16 | 16 | === Build Nasm === |
17 | 17 | |
18 | | ./configure --prefix=/cross-tools &&[[BR]] |
19 | | make &&[[BR]] |
20 | | make install[[BR]] |
| 18 | {{{ |
| 19 | ./configure --prefix=/cross-tools && |
| 20 | make && |
| 21 | make install |
| 22 | }}} |
21 | 23 | |
22 | 24 | == Changes for Boot Section == |
… |
… |
|
28 | 30 | |
29 | 31 | ==== 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 | {{{ |
| 33 | EFI_IA_NBITS=64 # 32 or 64 . |
| 34 | make PREFIX=cross-tools efi${EFI_IA_NBITS} && |
| 35 | make PREFIX=cross-tools efi${EFI_IA_NBITS} install |
| 36 | }}} |
34 | 37 | |
35 | 38 | === Build Syslinux === |
36 | 39 | |
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 | {{{ |
| 41 | make CROSS_COMPILE=${CLFS_TARGET}- installer && |
| 42 | install -m 755 extlinux/extlinux /cross-tools/bin && |
| 43 | install -d -m 755 /cross-tools/syslinux && |
| 44 | install -m 644 mbr/mbr.bin /cross-tools/syslinux |
| 45 | }}} |
41 | 46 | |
42 | 47 | === Configure Extlinux === |
… |
… |
|
45 | 50 | the Primary Boot Drive. I will assume the Primary Boot Drive is /dev/sda.[[BR]] |
46 | 51 | |
47 | | |
48 | | dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] |
| 52 | {{{ |
| 53 | dd if=/dev/zero of=/dev/sda bs=446 count=1 |
| 54 | }}} |
49 | 55 | |
50 | 56 | ==== 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 | {{{ |
| 58 | BOOTCODE_TYP='gpt' ; # 'gpt' (for GPT) or empty-string (for MBR). |
| 59 | dd bs=440 conv=notrunc count=1 if=/cross-tools/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda |
| 60 | }}} |
53 | 61 | |
54 | 62 | Second 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 | {{{ |
| 64 | install -d ${CLFS}/boot |
| 65 | extlinux --install ${CLFS}/boot |
| 66 | }}} |
57 | 67 | |
58 | 68 | Now we will create our extlinux.conf file. Change root_device to your root partition of your |
59 | 69 | Primary Boot Drive.[[BR]] |
60 | 70 | |
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 | {{{ |
| 72 | cat >> ${CLFS}/boot/extlinux.conf << "EOF" |
| 73 | default boot |
| 74 | prompt 0 |
| 75 | timeout 10 |
| 76 | |
| 77 | label boot |
| 78 | kernel clfskernel-boot |
| 79 | append rw root=root_device |
| 80 | EOF |
| 81 | }}} |
70 | 82 | |
71 | 83 | == Changes for Final-System Section == |
… |
… |
|
73 | 85 | === Build Nasm === |
74 | 86 | |
75 | | ./configure --prefix=/usr &&[[BR]] |
76 | | make &&[[BR]] |
77 | | make install[[BR]] |
| 87 | {{{ |
| 88 | ./configure --prefix=/usr && |
| 89 | make && |
| 90 | make install |
| 91 | }}} |
78 | 92 | |
79 | 93 | === Build GNU-EFI === |
80 | 94 | |
81 | 95 | ==== 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 | {{{ |
| 97 | EFI_IA_NBITS=64 # 32 or 64 . |
| 98 | make PREFIX=usr efi${EFI_IA_NBITS} && |
| 99 | make PREFIX=usr efi${EFI_IA_NBITS} install |
| 100 | }}} |
86 | 101 | |
87 | 102 | === Build Syslinux === |
… |
… |
|
90 | 105 | over so that we can have a menu at bootup. |
91 | 106 | |
92 | | make installer &&[[BR]] |
93 | | make install &&[[BR]] |
94 | | cp -ar /usr/share/syslinux/menu.c32 /boot[[BR]] |
| 107 | {{{ |
| 108 | make installer && |
| 109 | make install && |
| 110 | cp -ar /usr/share/syslinux/menu.c32 /boot |
| 111 | }}} |
95 | 112 | |
96 | 113 | === Configure Extlinux === |
… |
… |
|
102 | 119 | the pre-made ones are used instead. This reinstall will ensure that we now use the ones we just built.[[BR]] |
103 | 120 | |
104 | | dd if=/dev/zero of=/dev/sda bs=446 count=1[[BR]] |
| 121 | {{{ |
| 122 | dd if=/dev/zero of=/dev/sda bs=446 count=1 |
| 123 | }}} |
105 | 124 | |
106 | 125 | ==== 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 | {{{ |
| 127 | BOOTCODE_TYP='gpt' ; # 'gpt' (for GPT) or empty-string (for MBR). |
| 128 | dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/${BOOTCODE_TYP}mbr.bin of=/dev/sda |
| 129 | }}} |
109 | 130 | |
110 | 131 | Second we will install the extlinux.sys file for bootup. This is the bootloader.[[BR]] |
111 | | extlinux --install /boot[[BR]] |
| 132 | {{{ |
| 133 | extlinux --install /boot |
| 134 | }}} |
112 | 135 | |
113 | 136 | Now we will create our extlinux.conf file. Change root_device to your root partition of your |
114 | 137 | Primary Boot Drive.[[BR]] |
115 | 138 | |
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 | {{{ |
| 140 | cat >> /boot/extlinux.conf << "EOF" |
| 141 | default menu.c32 |
| 142 | prompt 0 |
| 143 | menu title CLFS Boot Menu |
| 144 | |
| 145 | timeout 60 |
| 146 | |
| 147 | label linux |
| 148 | menu label CLFS Kernel {kernel_version} |
| 149 | menu default |
| 150 | kernel clfskernel-{kernel_version} |
| 151 | append rw root=root_device |
| 152 | |
| 153 | label boot |
| 154 | menu label CLFS Boot Stage Kernel |
| 155 | kernel clfskernel-boot |
| 156 | append rw root=root_device |
| 157 | EOF |
| 158 | }}} |