]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - INSTALL/grub/localboot.cfg
Update ru_RU.txt (#2120)
[Ventoy.git] / INSTALL / grub / localboot.cfg
1
2 if [ "$grub_platform" = "pc" ]; then
3 menuentry "$VTLANG_LB_SBOOT_WINDOWS" --class=boot_windows --class=F4boot {
4
5 set partid=3
6 while [ $partid -le 128 ]; do
7 if vt_check_part_exist $partid; then
8 for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
9 if [ -f ($vtoydev,$partid)/$bt ]; then
10 set root=($vtoydev,$partid)
11 ntldr /$bt
12 boot
13 fi
14 done
15 else
16 break
17 fi
18 vt_incr partid 1
19 done
20
21 if search -n -s -f /Boot/BCD; then
22 for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
23 if [ -f /$bt ]; then
24 if regexp '^hd0' $root; then
25 ntldr /$bt
26 else
27 drivemap -s hd0 $root
28 ntldr /$bt
29 fi
30 break
31 fi
32 done
33 elif search -n -s -f /NTDETECT.COM; then
34 drivemap -s hd0 $root
35 ntldr /ntldr
36 else
37 echo "Windows NOT found ..."
38 fi
39 }
40
41 menuentry "$VTLANG_LB_SBOOT_G4D" --class=boot_g4d --class=F4boot {
42 if search -n -s -f /grldr; then
43 ntldr /grldr
44 else
45 echo "Grub4dos NOT found ..."
46 fi
47 }
48
49 menuentry "$VTLANG_LB_SBOOT_HDD1" --class=boot_disk --class=F4boot {
50 set root=(hd0,1)
51 chainloader +1
52 boot
53 }
54
55 menuentry "$VTLANG_LB_SBOOT_HDD2" --class=boot_disk --class=F4boot {
56 set root=(hd1,1)
57 chainloader +1
58 boot
59 }
60
61 menuentry "$VTLANG_LB_SBOOT_HDD3" --class=boot_disk --class=F4boot {
62 set root=(hd2,1)
63 chainloader +1
64 boot
65 }
66
67 else
68
69 menuentry "$VTLANG_LB_SBOOT_WINDOWS" --class=boot_windows --class=F4boot {
70
71 set partid=3
72 while [ $partid -le 128 ]; do
73 if vt_check_part_exist $partid; then
74 if [ -f ($vtoydev,$partid)/EFI/Microsoft/Boot/bootmgfw.efi ]; then
75 set root=($vtoydev,$partid)
76 terminal_output console
77 chainloader /EFI/Microsoft/Boot/bootmgfw.efi
78 boot
79 elif [ -f ($vtoydev,$partid)/efi/Microsoft/Boot/bootmgfw.efi ]; then
80 set root=($vtoydev,$partid)
81 terminal_output console
82 chainloader /efi/Microsoft/Boot/bootmgfw.efi
83 boot
84 elif [ -f ($vtoydev,$partid)/VTEFI/Microsoft/Boot/bootmgfw.efi ]; then
85 set root=($vtoydev,$partid)
86 terminal_output console
87 chainloader /VTEFI/Microsoft/Boot/bootmgfw.efi
88 boot
89 fi
90 else
91 break
92 fi
93 vt_incr partid 1
94 done
95
96 if search -n -s -f /EFI/Microsoft/Boot/bootmgfw.efi; then
97 terminal_output console
98 chainloader /EFI/Microsoft/Boot/bootmgfw.efi
99 boot
100 elif search -n -s -f /efi/Microsoft/Boot/bootmgfw.efi; then
101 terminal_output console
102 chainloader /efi/Microsoft/Boot/bootmgfw.efi
103 boot
104 else
105 echo "Windows NOT found ..."
106 fi
107 }
108
109 if [ "$grub_cpu" = "i386" ]; then
110 menuentry "$VTLANG_LB_SBOOT_IA32EFI" --class=boot_uefi --class=F4boot {
111 set VTOY_SEARCH_NO_VTOYEFI=1
112 if search -n -s -f /efi/boot/bootia32.efi; then
113 unset VTOY_SEARCH_NO_VTOYEFI
114 terminal_output console
115 chainloader /efi/boot/bootia32.efi
116 boot
117 elif search -n -s -f /vtefi/boot/bootia32.efi; then
118 unset VTOY_SEARCH_NO_VTOYEFI
119 terminal_output console
120 chainloader /vtefi/boot/bootia32.efi
121 boot
122 else
123 unset VTOY_SEARCH_NO_VTOYEFI
124 echo "BOOTIA32.EFI NOT found ..."
125 fi
126 }
127
128 menuentry "$VTLANG_LB_SBOOT_XORBOOT" --class=boot_xorboot --class=F4boot {
129 set VTOY_SEARCH_NO_VTOYEFI=1
130 if search -n -s -f /efi/xorboot/xorboot32.xor; then
131 unset VTOY_SEARCH_NO_VTOYEFI
132 terminal_output console
133 if [ -f /efi/xorboot/bootia32.efi ]; then
134 chainloader /efi/xorboot/bootia32.efi
135 elif [ -f /efi/xorboot/xorboot.efi ]; then
136 chainloader /efi/xorboot/xorboot.efi
137 fi
138 boot
139 elif search -n -s -f /vtefi/xorboot/xorboot32.xor; then
140 unset VTOY_SEARCH_NO_VTOYEFI
141 terminal_output console
142 if [ -f /vtefi/xorboot/bootia32.efi ]; then
143 chainloader /vtefi/xorboot/bootia32.efi
144 elif [ -f /vtefi/xorboot/xorboot.efi ]; then
145 chainloader /vtefi/xorboot/xorboot.efi
146 fi
147 boot
148 else
149 unset VTOY_SEARCH_NO_VTOYEFI
150 echo "xorboot NOT found ..."
151 fi
152 }
153 elif [ "$grub_cpu" = "arm64" ]; then
154 menuentry "$VTLANG_LB_SBOOT_AA64EFI" --class=boot_uefi --class=F4boot {
155 set VTOY_SEARCH_NO_VTOYEFI=1
156 if search -n -s -f /efi/boot/bootaa64.efi; then
157 unset VTOY_SEARCH_NO_VTOYEFI
158 terminal_output console
159 chainloader /efi/boot/bootaa64.efi
160 boot
161 elif search -n -s -f /vtefi/boot/bootaa64.efi; then
162 unset VTOY_SEARCH_NO_VTOYEFI
163 terminal_output console
164 chainloader /vtefi/boot/bootaa64.efi
165 boot
166 else
167 else
168 unset VTOY_SEARCH_NO_VTOYEFI
169 echo "BOOTAA64.EFI NOT found ..."
170 fi
171 }
172 else
173 menuentry "$VTLANG_LB_SBOOT_X64EFI" --class=boot_uefi --class=F4boot {
174 set VTOY_SEARCH_NO_VTOYEFI=1
175 if search -n -s -f /efi/boot/bootx64.efi; then
176 unset VTOY_SEARCH_NO_VTOYEFI
177 terminal_output console
178 chainloader /efi/boot/bootx64.efi
179 boot
180 elif search -n -s -f /vtefi/boot/bootx64.efi; then
181 unset VTOY_SEARCH_NO_VTOYEFI
182 terminal_output console
183 chainloader /vtefi/boot/bootx64.efi
184 boot
185 else
186 unset VTOY_SEARCH_NO_VTOYEFI
187 echo "BOOTX64.EFI NOT found ..."
188 fi
189 }
190
191 menuentry "$VTLANG_LB_SBOOT_XORBOOT" --class=boot_xorboot --class=F4boot {
192 set VTOY_SEARCH_NO_VTOYEFI=1
193 if search -n -s -f /efi/xorboot/xorboot.xor; then
194 unset VTOY_SEARCH_NO_VTOYEFI
195 terminal_output console
196 if [ -f /efi/xorboot/bootx64.efi ]; then
197 chainloader /efi/xorboot/bootx64.efi
198 elif [ -f /efi/xorboot/xorboot.efi ]; then
199 chainloader /efi/xorboot/xorboot.efi
200 fi
201 boot
202 elif search -n -s -f /vtefi/xorboot/xorboot.xor; then
203 unset VTOY_SEARCH_NO_VTOYEFI
204 terminal_output console
205 if [ -f /vtefi/xorboot/bootx64.efi ]; then
206 chainloader /vtefi/xorboot/bootx64.efi
207 elif [ -f /vtefi/xorboot/xorboot.efi ]; then
208 chainloader /vtefi/xorboot/xorboot.efi
209 fi
210 boot
211 else
212 unset VTOY_SEARCH_NO_VTOYEFI
213 echo "xorboot NOT found ..."
214 fi
215 }
216 fi
217
218
219 fi
220
221 menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
222 echo "Return ..."
223 }