home *** CD-ROM | disk | FTP | other *** search
/ host-198-236-40-254.wlwv.k12.or.us / host-198-236-40-254.wlwv.k12.or.us.tar / host-198-236-40-254.wlwv.k12.or.us / tsv / BareMetalInstall.iso / make_disk.bat < prev    next >
DOS Batch File  |  2013-12-03  |  1KB  |  46 lines

  1. @ECHO OFF
  2. REM  ----------------------------------------------------
  3. REM  Batch file to create bootable SLAX disk in Windows
  4. REM  usage: make_disk.bat e:\
  5. REM  author: Tomas M. <http://www.linux-live.org>
  6. REM  ----------------------------------------------------
  7.  
  8. if "%1"=="" goto error1
  9.  
  10. echo Copying files to %1 ...
  11.  
  12. xcopy * "%1\" /I /R /E /Y
  13. if not "%errorlevel%"=="0" goto error2
  14. move /Y "%1\boot\vmlinuz" "%1\vmlinuz"
  15. if not "%errorlevel%"=="0" goto error2
  16. move /Y "%1\boot\initrd.gz" "%1\initrd.gz"
  17. if not "%errorlevel%"=="0" goto error2
  18. copy /Y tools\WIN\syslinux.cfg "%1\" >NUL
  19. if not "%errorlevel%"=="0" goto error2
  20.  
  21. echo .
  22. echo Setting up boot sector in %1
  23. tools\WIN\syslinux.exe -fma "%1"
  24. if not "%errorlevel%"=="0" goto error3
  25.  
  26. echo.
  27. echo Successfully installed into %1
  28. goto theend
  29.  
  30. :error1
  31. echo A parameter is required - target disk name.
  32. echo Example: %0 D:\
  33. goto theend
  34.  
  35. :error2
  36. echo Error while copying files. Out of disk space? Don't know
  37. goto theend
  38.  
  39. :error3
  40. echo Error setting up boot sector. The OS won't boot
  41. goto theend
  42.  
  43. :theend
  44. echo.
  45. pause
  46.