Debian Codegraph @

pkg/syslinux/deprecated/makeboot64.bat

raw
1 @echo off
2 setlocal EnableDelayedExpansion
3 title %~nx0
4 rem 01/13/2016 - Added error routine and other minor changes by Robert Rubino
5 rem This batch file was modified by Steven Shiau.
6 rem The original one is from PDLA http://pendrivelinux.com
7 rem This batch file was created by ©2007 PDLA http://pendrivelinux.com
8 cd /d "%~dp0"
9 cls
10 echo -----------------------------------------------------------------
11 echo This batch file will prepare drive %~d0 for boot using syslinux64
12 echo --------------------- WARNING -----------------------------------
13 echo Run this file from your portable USB device ONLY.
14 echo.
15 echo Running this file from your hard drive may overwrite your current
16 echo Master Boot Record (MBR) and render your Windows Operating System
17 echo un-bootable. YOU HAVE BEEN WARNED.
18 echo.
19 echo This batch file is offered in hopes that it will be useful and
20 echo comes with absolutely no warranty. && echo. && echo *** USE AT YOUR OWN RISK ***
21 echo -------------------------------------------------------------------
22 pause
23 cls
24 if %~d0 == %systemdrive% (color 4f && echo Do not run %~nx0 from your local system hard drive. && echo It should only be run from your USB flash drive or USB hard drive. && goto end)
25 rem echo %~d0 | "%windir%\system32\findstr.exe" /B /I "%systemdrive%" && color 4f && echo You can _NOT_ RUN %~nx0 from your local system hard drive! It should only be run from your USB flash drive or USB hard drive. && goto end
26 echo.
27 wmic logicaldisk where caption="%~d0" get filesystem|find "FAT32">nul && echo The USB pendrive has FAT32 formatting. || echo Please format your USB pendrive as FAT32
28 echo Press any key to make drive %~d0 bootable
29 echo or close this window to abort...
30 pause > nul
31 cls
32 syslinux64.exe -d syslinux -mafi %~d0
33 if !errorlevel! neq 0 (
34 color 4f
35 echo.
36 echo ----------------------------
37 echo *** FATAL ERROR ***
38 echo *** %~d0 drive is not bootable for Clonezilla ***
39 echo *** %~nx0 should be run as Administrator ***
40 echo *** or other major failure has occurred ***
41 echo ----------------------------
42 goto end
43 )
44 echo.
45 echo ~~~~~~~~ Congratulations ~~~~~~~
46 echo The hidden file ldlinux.sys has been installed
47 echo Your %~d0 drive should now be bootable.
48 echo //NOTE// If your USB flash drive fails to boot (maybe buggy BIOS), try to use "syslinux64 -d syslinux -sfmar %~d0".
49 echo.
50 :end
51 echo.
52 cd /d %systemdrive%
53 echo *** Press any key to exit this window ***
54 pause > nul