-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu.lst
executable file
·408 lines (329 loc) · 16 KB
/
menu.lst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
#################### ISO Download links ####################
## Recommended download links:
# Windows 10:
# - https://www.microsoft.com/en-us/software-download/windows10ISO/
# - https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet
# Ubuntu:
# - http://releases.ubuntu.com
# Windows 7 PE (Preinstalled Environment)/(Live):
# - https://archive.org/download/win-7-pe/Win7PE_x64.iso
############################################################
timeout 30
default 0
# set colors
#color black/cyan blue/cyan red/light-blue red/cyan
# Pick a suitable splash image depends on highest available resolution
graphicsmode -1 640 100:1000 24:32 && set GM=640
graphicsmode -1 800 100:1000 24:32 && set GM=800
#graphicsmode -1 1024 100:1000 24:32 && set GM=1024
#if "%GM%"=="1024" splashimage /boot/splashimg_1024.bmp
#if "%GM%"=="800" splashimage /boot/splashimg_800.bmp
#if "%GM%"=="640" splashimage /boot/splashimg_640.bmp
#clear
#debug off
# display heading
write (md)0x220+1 !BAT\necho -n -P:0000 $[0133] ((((( AIO USB Drive ))))) \0
initscript (md)0x220+1
#------------------------------------------------------------- Commands saved as comments for later usage
#autonumber boot entries with a space (20) after the number
write 0x8274 0x2001
#autonumber boot entries with a hyphen (2d) after the number
#write 0x8274 0x2d01
#autonumber all entries (ff) including non-boot entries with a space (20) after the number
#write 0x8274 0x20ff
#autonumber all entries (including non-bootable entries) and add a hyphen (2d) after the number
#write 0x8274 0x2dff
#
#title ^F1 Press F1 to Boot From (hd0,0)
#chainloader (hd0,0)+1
#
#title ^Ctrl+F1 Press Ctrl+F1 to boot From (hd0,0)/ntldr
#chainloader (hd0,0)/ntldr
#
#iftitle [find --set-root --devices=h /bootmgr] ^F2 Press F2 to Boot Windows from hard disk
#find --set-root --devices=h /bootmgr
#chainloader /bootmgr
#
#title ^R Reboot
#reboot
#
#title [H] Halt
#halt
#
#------------------------------------------------------------- Commands saved as comments for later usage
#iftitle [if exist (bd)/test.img] find /test.img on any drive and boot to it
#savedefault --wait=2
############################################################
############################################################
############################################################
title boot from 1st HDD ... \n(continue current windows booting) \nBoot from MBR of first hard disk and skip the USB drive
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (hd0)+1
rootnoverify (hd0)
############################################################
############################################################
############################################################
#title - Windows PE : (partitioning + backup/clone + manage + internet ...)
#root()
iftitle [if exist /iso/Win7PE_x64.iso] Load Windows 7 PE x64 \n (partitioning + backup/clone + manage + internet ...) \n for proper/full version, make sure 'Boot' is the 1st partition
set MYISO=/iso/Win7PE_x64.iso
if exist (hd0,1)/boot/.swap_partitions.g4b (hd0,1)/boot/.swap_partitions.g4b (hd0) 1 SURE
find --set-root /boot/.swap_partitions.g4b
cat ()/boot/spaces.txt > ()/Win7PESE.ini
write ()/Win7PESE.ini [IsoInfo]\r\nIsoName=.%MYISO%\r\n
map %MYISO% (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
chainloader (0xff)/BOOTMGR || chainloader (0xff)
############################################################
############################################################
############################################################
#title - Install Windows :
#root ()
iftitle [if exist /iso/Win10_20H2_v2_English_x64.iso] Install Windows 10 20H2 English (x64) \n Win10_20H2_v2_English_x64.iso \n Windows 10 version 20H2
set MYISO=/iso/Win10_20H2_v2_English_x64.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/Win10_20H2_v2_German_x64.iso] Install Windows 10 20H2 German (x64) \n Win10_20H2_v2_German_x64.iso \n Windows 10 version 20H2
set MYISO=/iso/Win10_20H2_v2_German_x64.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/Win10_20H2_v2_English_x86.iso] Install Windows 10 20H2 English (x86) \n Win10_20H2_v2_English_x86.iso \n Windows 10 version 20H2
set MYISO=/iso/Win10_20H2_v2_English_x86.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/Win10_20H2_v2_German_x86.iso] Install Windows 10 20H2 German (x86) \n Win10_20H2_v2_German_x86.iso \n Windows 10 version 20H2
set MYISO=/iso/Win10_20H2_v2_German_x86.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/win10_x64.iso] Install Windows 10 x64 \n win10_x64.iso
set MYISO=/iso/Win10_x64.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/win10_x86.iso] Install Windows 10 x86 \n win10_x86.iso
set MYISO=/iso/Win10_x86.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
############################################################ Windows 7
iftitle [if exist /iso/win7_x64.iso] Install Windows 7 x64 \n win7_x64.iso \n Make sure that the USB device is set as 1st boot option at BIOS settings.\n(not choosed as on-time boot by "F12" key)
set MYISO=/iso/Win7_x64.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
iftitle [if exist /iso/win7_x86.iso] Install Windows 7 x86 \n win7_x86.iso \n Make sure that the USB device is set as 1st boot option at BIOS settings.\n(not choosed as on-time boot by "F12" key)
set MYISO=/iso/Win7_x86.iso
configfile ()/boot/.menuISOWinChooseProdKey.lst
############################################################ Windows XP
iftitle [if exist /iso/win_xp_x86.iso] Install Windows XP Pro SP3 (step1) \n win_xp_x86.iso \n Serial Number : D36RK-QDFFD-BTWWY-BT7KK-43MGM \n *** NOTE : You have to press F6 & load Firadisk driver at the beginning of installation
set MYISO=/iso/Win_xp_x86.iso
if exist (hd0,1)/boot/.swap_partitions.g4b (hd0,1)/boot/.swap_partitions.g4b (hd0) 1 SURE
find --set-root --ignore-floppies --ignore-cd /boot/winvblock.ima.gz
map --mem /boot/winvblock.ima.gz (fd0)
map --mem /boot/winvblock.ima.gz (fd1)
# if this loads the ISO into memory slowly - then you need to run WinContig on the ISO file on your USB drive to speed it up!
map %MYISO% (0xff) || map --mem %MYISO% (0xff)
find --set-root %MYISO%
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
root (0xff)
if not exist (0xff)/i386/setupldr.bin echo WARNING: The ISO is not an XP Install ISO!!! && pause
chainloader (0xff)/i386/setupldr.bin || chainloader (0xff)/I386/SETUPLDR.BIN || chainloader (0xff)
echo -------------------------------------------------------------
echo 1- Press F6 at the beginning of blue screen.
echo 2- Press S to choose a driver for removable media storage.
echo 3- Choose WinVBlock (4th choice) / FiraDisk.
echo 4- Press Enter & proceed the installation process.
echo -------------------------------------------------------------
echo !!!!!!!!!!!!!!! Remember Serial Number !!!!!!!!!!!!!!!!
echo " D36RK-QDFFD-BTWWY-BT7KK-43MGM "
echo -------------------------------------------------------------
echo ~~~ ORIGINAL Recommendations :
echo If you have an AHCI HDD you MUST press F6 when prompted, then hit S to select WinVBlock or FiraDisk (recommended) driver, then hit S again to select your AHCI driver (e.g. Atom Netbook=WinVBlock+ICH7R/DH, DQ67 series 6=FiraDisk+Desktop,Workstation,Server Express)
pause Now quickly hit [Enter] twice (and then F6 if you need to install an AHCI driver) ...
boot
iftitle [if exist /iso/win_xp_x86.iso] Install Windows XP Pro SP3 (step2) \n win_xp_x86.iso
set MYISO=/iso/Win_xp_x86.iso
if exist (hd0,1)/boot/.swap_partitions.g4b (hd0,1)/boot/.swap_partitions.g4b (hd0) 1 SURE
find --set-root --ignore-floppies --ignore-cd /boot/winvblock.ima.gz
# we must load the ISO into memory, so it will be slow to load here ...
map --mem %MYISO% (0xff) || map %MYISO% (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
rootnoverify (hd0,0)
chainloader (hd0)+1
echo -------------------------------------------------------------
echo !!!!!!!!!!!!!!! Remember Serial Number !!!!!!!!!!!!!!!!
echo " D36RK-QDFFD-BTWWY-BT7KK-43MGM "
echo -------------------------------------------------------------
pause Press ENTER and then unplug this USB drive...
boot
############################################################
############################################################
############################################################
#title ----- Ubuntu -----
#root()
iftitle [if exist /iso/ubuntu-20.04-desktop-amd64.iso] Install Ubuntu 20.04 LTS (Focal Fossa) \n ubuntu-20.04-desktop-amd64.iso \n Unix OS \n (loads iso to mem) \n for proper/full version, make sure 'boot/{initrd,vmlinuz}' are from the "[ISO]/casper/…"
set MYISO=/iso/ubuntu-20.04-desktop-amd64.iso
find --set-root %MYISO%
# [Option 1]: To-memory mapping … SLOW
#map --mem %MYISO% (0xff) || map --heads=0 --sectors-per-track=0 %MYISO% (0xff)
# [Option 2]: Non-memory mapping … FASTER, boots well if initrd and vmlimuz(kernel) used, are from inside the ISO
map %MYISO% (0xff)
map --hook
if exist (0xff)/casper/vmlinuz kernel (0xff)/casper/vmlinuz file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/vmlinuz.efi kernel (0xff)/casper/vmlinuz.efi file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/initrd initrd (0xff)/casper/initrd
if exist (0xff)/casper/initrd.lz initrd (0xff)/casper/initrd.lz
boot
iftitle [if exist /iso/ubuntu-18.04.4-desktop-amd64.iso] Install Ubuntu 18.04 LTS (Xenial Xerus) \n ubuntu-18.04.4-desktop-amd64.iso \n Unix OS \n (loads iso to mem)
set MYISO=/iso/ubuntu-18.04.4-desktop-amd64.iso
find --set-root %MYISO%
# [Option 1]: To-memory mapping … SLOW
#map --mem %MYISO% (0xff) || map --heads=0 --sectors-per-track=0 %MYISO% (0xff)
# [Option 2]: Non-memory mapping … FASTER, boots well if initrd and vmlimuz(kernel) used, are from inside the ISO
map %MYISO% (0xff)
map --hook
if exist (0xff)/casper/vmlinuz kernel (0xff)/casper/vmlinuz file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/vmlinuz.efi kernel (0xff)/casper/vmlinuz.efi file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/initrd initrd (0xff)/casper/initrd
if exist (0xff)/casper/initrd.lz initrd (0xff)/casper/initrd.lz
boot
iftitle [if exist /iso/ubuntu.iso] Install Ubuntu \n ubuntu.iso \n Unix OS \n (loads iso to mem)
set MYISO=/iso/ubuntu.iso
find --set-root %MYISO%
# [Option 1]: To-memory mapping … SLOW
#map --mem %MYISO% (0xff) || map --heads=0 --sectors-per-track=0 %MYISO% (0xff)
# [Option 2]: Non-memory mapping … FASTER, boots well if initrd and vmlimuz(kernel) used, are from inside the ISO
map %MYISO% (0xff)
map --hook
if exist (0xff)/casper/vmlinuz kernel (0xff)/casper/vmlinuz file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/vmlinuz.efi kernel (0xff)/casper/vmlinuz.efi file=/preseed/ubuntu.seed boot=casper root=(0xff) iso-scan/filename=%MYISO% quiet splash
if exist (0xff)/casper/initrd initrd (0xff)/casper/initrd
if exist (0xff)/casper/initrd.lz initrd (0xff)/casper/initrd.lz
boot
############################################################
############################################################
############################################################
#title - Partitioning :
#root()
iftitle [if exist /iso/iso_acronis.iso] Acronis Disk Director (from Memory) \n Partitioning \n ISO size ~130MB
set MYISO=/iso/iso_acronis.iso
find --set-root %MYISO%
map --mem %MYISO% (hd32)
map --hook
chainloader (hd32)
############################################################
############################################################
############################################################
#title - Cloning (Backup & Restore) :
#root()
iftitle [if exist /iso/iso_acronisTrueImage.iso] Acronis True Image (from Memory) \n Cloning (Backup & Restore) \n ISO size : ~500MB
set MYISO=/iso/iso_acronisTrueImage.iso
find --set-root %MYISO%
map --mem %MYISO% (hd32)
map --hook
chainloader (hd32)
iftitle [if exist /iso/iso_ghost2003.ima] Norton Ghost 2003 \n Cloning (Backup & Restore)
set MYISO=/iso/iso_ghost2003.ima
find --set-root %MYISO%
map --mem %MYISO% (fd0)
map --hook
root (fd0)
chainloader +1
boot
iftitle [if exist /iso/iso_NortonGhost15.iso] NortonGhost15 \n Cloning (Backup & Restore)
set MYISO=/iso/iso_NortonGhost15.iso
find --set-root %MYISO%
map %MYISO% (hd32)
map --hook
root (hd32)
chainloader (hd32)
boot
iftitle [if exist /iso/iso_ghost15.01.iso] Norton Ghost v15.01 \n Cloning (Backup & Restore)
set MYISO=/iso/iso_ghost15.01.iso
find --set-root %MYISO%
map %MYISO% (hd32)
map --hook
root (hd32)
chainloader (hd32)
boot
iftitle [if exist /iso/iso_ghost15.01.iso] Norton Ghost v15.01 (Alternative : from Memory) \n Cloning (Backup & Restore) \n ISO size : ~200MB
set MYISO=/iso/iso_ghost15.01.iso
find --set-root %MYISO%
map --mem %MYISO% (hd32)
map --hook
chainloader (hd32)
boot
iftitle [if exist /iso/iso_ghost15.01.iso] Norton Ghost v15.01 (Alternative : from Memory & using FiraDisk) \n Cloning (Backup & Restore) \n ISO size : ~200MB
set MYISO=/iso/iso_ghost15.01.iso
map --mem (md)0x800+4 (99)
map %MYISO% (0xff)
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
write (99) [FiraDisk]\nStartOptions=cdrom,vmem=find:%MYISO%;\n\0
chainloader (0xff)/BOOTMGR || chainloader (0xff)
boot
############################################################
############################################################
############################################################
#title - AIO BootCD's :
#root()
iftitle [if exist /iso/iso_hiren.iso] Hirens BootCD (from Memory .. : MiniXP is Full-Loaded) \n AIO BootCD \n ISO size : ~590MB
set MYISO=/iso/iso_hiren.iso
map --mem %MYISO% (0xff)
map --hook
root (0xff)
chainloader (0xff)
boot
iftitle [if exist /iso/iso_ubcd.iso] Ultimate BootCD (from Memory & using firadisk.gz) \n AIO BootCD \n ISO size : ~300MB
set MYISO=/iso/iso_ubcd.iso
find --set-root --ignore-floppies --ignore-cd %MYISO%
map --mem /boot/firadisk.gz (fd0)
map --mem %MYISO% (0xff)
map --hook
root (0xff)
chainloader (0xff)
boot
############################################################
############################################################
############################################################
#title - Commands :
#root()
title ( Choose ISO )
configfile ()/boot/.menuISOFileList.lst
#title CommandLine (grub-legacy)
#commandline
iftitle [if exist (hd0,1)/boot/.swap_partitions.g4b] Swap Partitions : set 'HBoot' as 1st Partition, currently 2nd
set nPartL=NOT_FOUND
parttype (hd0,1) > nul
if #%@retval%>=#7 set nPartL=Data
if exist (hd0,1)/boot set nPartL=Boot
if %nPartL%==NOT_FOUND configfile ()/menu.lst
echo
echo The '%nPartL%' partition will be set as accessible
echo Press any key to continue, ESC to cancel ...
pause && set /a key=*0x4CB00 ! configfile ()/menu.lst
find --set-root /boot/.swap_partitions.g4b
/boot/.swap_partitions.g4b (hd0) 1 SURE
find --set-root /menu.lst
configfile ()/menu.lst
iftitle [if exist (hd0,3)/boot/.swap_partitions.g4b] Swap Partitions : set 'HBoot' as 1st Partition, currently 4th
set nPartL=NOT_FOUND
parttype (hd0,3) > nul
if #%@retval%>=#7 set nPartL=Data
if exist (hd0,3)/boot set nPartL=Boot
if %nPartL%==NOT_FOUND configfile ()/menu.lst
echo
echo The '%nPartL%' partition will be set as accessible
echo Press any key to continue, ESC to cancel ...
pause && set /a key=*0x4CB00 ! configfile ()/menu.lst
find --set-root /boot/.swap_partitions.g4b
/boot/.swap_partitions.g4b (hd0) 3 SURE
find --set-root /menu.lst
configfile ()/menu.lst
title Reboot
#echo Rebooting in 2 seconds
#pause --wait=2
reboot
title Shutdown
#echo Shutting down in 2 seconds
#pause --wait=2
halt