@echo off cls set usbdrv= set usbdir= set kernel= set initrd= set options= set param1= if "%ramdrv%"=="" set path=a:\freedos;a:\bin_usb if not "%ramdrv%"=="" set path=%ramdrv%\freedos;%ramdrv%\bin_usb :PLACES echo. echo ======== USB Drive-Letter ? ======== set /p usbdrv= echo. echo ======== USB Directory ? ======== set /p usbdir= if not exist %usbdrv%:\%usbdir%\*.* pause file not found !!! press any key to continue ... if not exist %usbdrv%:\%usbdir%\*.* GOTO PLACES echo. echo Directory found ... cdd %usbdrv%:\%usbdir%\ REM ### find kernel ### for %%x in (altker64,altker32,rescuecd,vmlinuz1,bzImage1,bzImage,kernel,vmlinuz,linux) do if exist .\%%x set kernel=%%x if "%kernel%"=="" GOTO NOKERNEL echo. echo kernel found ... filename = %kernel% echo. REM ### find initrd ### for %%x in (initram,initram.igz,initrd1.img,initrfs.gz,miniroot,miniroot.gz,miniroot.img,minird,minird.img,minird.gz,minirt,minirt.img,minirt.gz,initrd,initrd.gz,initrd.img) do if exist .\%%x set initrd=%%x if "%initrd%"=="" GOTO NOINITRD echo. echo initrd found ... filename = %initrd% echo. :OPT REM ### find options.txt ### echo. echo ======== [ options.txt ] Directory ? ======== echo. echo 1. ==== Same directory ==== echo 2. ==== Floppy = A: ==== echo 3. ==== Ramdrive ==== echo 4. ==== none ==== echo. echo ================================================ choice /C:1234X Type Number: if ERRORLEVEL 5 GOTO END if ERRORLEVEL 4 GOTO NONE if ERRORLEVEL 3 GOTO RAMD if ERRORLEVEL 2 GOTO FLOPPY if ERRORLEVEL 1 GOTO SAME :NONE set options= GOTO BOOT :RAMD if exist %ramdrv%\options.txt set options=%ramdrv% if "%options%"=="" pause options.txt not found !!! press any key to continue if "%options%"=="" GOTO OPT echo. echo options.txt found ... GOTO BOOT :FLOPPY if exist a:\options.txt set options=a: if "%options%"=="" pause options.txt not found !!! press any key to continue if "%options%"=="" GOTO OPT echo. echo options.txt found ... GOTO BOOT :SAME if exist .\options.txt set options=. if "%options%"=="" pause options.txt not found !!! press any key to continue if "%options%"=="" GOTO OPT echo. echo options.txt found ... GOTO BOOT :BOOT REM ### linld boot ### echo. echo ======== [ tuika no parameter ] arimasuka ? ======== set /p param1= echo. if "%options%"=="" GOTO NOOPT if not "%param1%"=="" GOTO BOOT2 linld image=%kernel% initrd=%initrd% vga=normal cl=@%options%\options.txt if ERRORLEVEL 1 GOTO ERROR :BOOT2 copy %options%\options.txt %options%\temp.txt echo %param1%>>%options%\temp.txt linld image=%kernel% initrd=%initrd% vga=normal cl=@%options%\temp.txt if ERRORLEVEL 1 GOTO ERROR :NOOPT if not "%param1%"=="" GOTO NOOPT2 linld image=%kernel% initrd=%initrd% if ERRORLEVEL 1 GOTO ERROR :NOOPT2 linld image=%kernel% initrd=%initrd% "cl=%param1%" if ERRORLEVEL 1 GOTO ERROR REM ### error! ### :NOKERNEL echo. echo Can't find kernel !!! pause GOTO ERROR :NOINITRD echo. echo Can't find initrd !!! pause GOTO ERROR :ERROR echo. echo error !!! echo. echo ========================== linld command =========================== echo linld image=filename initrd=filename vga=normal cl=@A:\options.txt echo linld image=filename initrd=filename vga=normal "cl=nnn=xxx mmm=xxx" echo ==================================================================== echo. echo Please Retry ! echo. GOTO END :END