Jump to content











Photo
- - - - -

multiboot menu in freedos, how to?


  • Please log in to reply
1 reply to this topic

#1 Mike69

Mike69

    Member

  • Members
  • 59 posts
  • Location:Hell

Posted 10 October 2006 - 11:05 AM

hi again,


can someone tell me how to make multiboot menus in freedos (config.sys, autoexec.bat), or link me to somewhere!!

tks

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 10 October 2006 - 12:47 PM

Well, just have a look at the files on fdboot.img (the bootable Freedos 1.0 floppy image) here:
http://gd.tuwien.ac..../1.0/fdboot.img

; FreeDOS 1.0 Final distro by Blair Campbell [Blairdude@gmail.com],
; last update 2005-08-02 by Blair Campbell [Blairdude@gmail.com]
; config.sys loads system drivers. Please edit to suit your needs.
;!SWITCHES=/E
!SWITCHES=/N
menucolor=7,0
MENU ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
MENU º FreeDOS 1.0 Final (2006-July-30) INSTALLATION/LIVE CD º
MENU ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
MENU º 1. Install to harddisk using FreeDOS SETUP (default) º
MENU º º
MENU º 2. FreeDOS Safe Mode (don't load any drivers) º
MENU º º
MENU º 3. FreeDOS Live CD with HIMEM + EMM386 º
MENU º º
MENU º 4. FreeDOS Live CD with HIMEM only º
MENU º º
MENU º 5. FreeDOS Live CD only º
MENU º º
MENU º FreeDOS is a trademark of Jim Hall 1994-2006 º
MENU ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
MENUDEFAULT=1,120

134?!DEVICE=A:\DRIVER\HIMEM.EXE
3?!DEVICE=A:\DRIVER\EMM386.EXE X=TEST
12345?!SHELL=A:\COMMAND.COM A:\ /E:2048 /F /MSG /P=A:\FREEDOS\FDAUTO.BAT
34?!DEVICEHIGH=A:\DRIVER\XDMA.SYS
345?!DEVICEHIGH=A:\DRIVER\XCDROM.SYS /D:FDCD0000
!DOSDATA=UMB
!DOS=HIGH,UMB
!FILES=20
!BUFFERS=20
!LASTDRIVE=Z


Lines beginning with ; are comments
menucolor=7,0 means white on black, as in MS-DOS
Line Beginning with MENU are similar to lines with ECHO command, that will be shown to the screen.
MENUDEFAULT=1,120 means that the default entry is #1, and that after 2 minutes (120 sec.) it will be booted if the user does not make another choice.
134? means that the commands in this line will be executed if the choice is ANY of #1,#3 or #4
etc., etc.

An environment variable %config% is initialised with the chosen #, then process is passed to autoexec, where a check is ade for it's value, rest should be self-explaining.

@echo off
SET DEBUG=N
SET NLSPATH=A:\FREEDOS
set dircmd=/P /OGN /4
set lang=EN
for %%X in ( 3 4 5 ) do if "%config%"=="%%X" goto livecd
SET PATH=A:\FREEDOS;A:\DRIVER

if !%config%==!2 goto safemode

set cputype=80386
getargs >NUL
if "%errorlevel%"=="255" set cputype=80286
if not "%errorlevel%"=="0" if not errorlevel 4 getargs > temp.bat
call temp.bat
del temp.bat

echo Checking for CDROM driver or c:\fdbootcd.iso...
devload /h /qq eltorito.sys /D:FDCD0001>NUL
if not exist FDCD0001 devload /h /qq xcdrom.sys /D:FDCD0001>NUL
if exist FDCD0001 devload /h /qq cdrcache.sys FDCD0001 CDRCACH1 1024 >NUL
if exist c:\fdbootcd.iso a:\driver\shsucdhd /f:c:\fdbootcd.iso >NUL
if exist FDCD0001 set loadcd=FDCD0001
if exist CDRCACH1 set loadcd=CDRCACH1
if exist SHSU-CDH set loadcd=SHSU-CDH
if !%loadcd%==! goto nocd
a:\driver\shsucdx /Q /D2 /D:?%loadcd%,X >NUL
if not exist X:\*.* goto nocd
echo CDROM found, checking for \freedos\setup\odin directory...
if not exist X:\FreeDOS\Setup\ODIN\*.* goto nocd
set path=%path%;X:\FreeDOS\Setup\ODIN
echo CDROM with ODIN found!
ctmouse >NUL
cdd X:\
setup.bat
rem the following should never have to happen
goto end

:livecd
set dosdir=x:\fdos
set path=%dosdir%\bin;X:\FreeDOS\Setup\ODIN
if exist %dosdir%\vim set vim=%dosdir%\vim\vim70
set helppath=%dosdir%\help
set nlspath=%dosdir%\nls
set blaster=A220 I5 D1 H5 P330
if "%config%"=="3" set config=3
if "%config%"=="4" set config=3
a:\freedos\xmssize 5 > NUL
set xms=%errorlevel%
if errorlevel 31 set xms=30
if not "%xms%"=="0" a:\driver\devload /H /QQ A:\DRIVER\CDRCACHE.SYS FDCD0000 CDRCACH0 %xms%000
if not "%xms%"=="0" A:\DRIVER\SHSUCDX.COM /QQ /R /D:CDRCACH0 /L:X
if "%xms%"=="0" A:\DRIVER\SHSUCDX.COM /QQ /R /D:FDCD0000 /L:X
if not exist FDCD0000 goto nocd
if exist %dosdir%\watcom\setvars.bat call %dosdir%\watcom\setvars.bat
a:\freedos\xmssize 50 > NUL
set xms=%errorlevel%
set RD=Z:
if "%xms%"=="0" set RD=C:
if not exist X:\FDOS\BIN\SHSURDRV.EXE goto nocd
if not "%xms%"=="0" SHSURDRV /QQ %xms%M,$RAMDISK,Z
if not "%xms%"=="0" if errorlevel 255 echo Ramdisk not loaded.
if not "%xms%"=="0" if errorlevel 255 set RD=C:
if "%config%"=="3" md %rd%\tmp
if "%config%"=="3" set tmp=%rd%\tmp
if "%config%"=="5" set tmp=c:\tmp
if "%config%"=="3" set temp=%rd%\tmp
if "%config%"=="5" set temp=c:\tmp
if "%config%"=="5" set config=
alias ls=ls --color=always
lh display CON=(EGA,,1)
mode con cp prep=((858) %dosdir%\bin\EGA.CPX)
mode con cp sel=858
ctmouse
a:\freedos\xmssize 10 > NUL
set xms=%errorlevel%
if errorlevel 31 set xms=30
if not "%errorlevel%"=="0" LH lbacache %xms%000 TUNS
a:\freedos\xmssize 99 > NUL
set xms=%errorlevel%
rem ?if exist c:\start\dosstart.bat call c:\start\dosstart.bat
cls
echo Welcome to the FreeDOS LiveCD.
echo.
echo Please type HELP to learn about commands.
echo.
echo Type menu to launch programs such as MPXPlay and VIM.
echo.
goto end
:nocd
echo There is no CDROM, or the wrong CD-ROM!
goto end
:safemode
echo.
localize 0.1 @@@ Welcome to the command prompt. No drivers were loaded.
echo.
:END


Have fun,

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users