how to pass arguments to a defaut floppy image

Try looking for help here if you are having problems with the Ultimate Boot CD.

Moderators: Icecube, StopSpazzing

Locked
Message
Author
xufux
Posts: 5
Joined: Tue Aug 16, 2005 11:34 pm

how to pass arguments to a defaut floppy image

#1 Post by xufux » Wed Aug 17, 2005 8:59 am

Hi,
i'm trying to create a dos floppy image to replace the freedos.img provided in UBCD.

i want to use it like like that:

Code: Select all

isolinux memdisk initrd=/images/mydos.img ubcdcmd=mycmd
where mydos.img = the image of my dos floppy
and mycmd = parameter given to mydos.img

i can't find any web site explaining this.
So if someone can give me some advices, he's welcome !

thanks

Victor Chew
Posts: 1363
Joined: Mon Feb 21, 2005 10:59 pm
Contact:

#2 Post by Victor Chew » Thu Aug 18, 2005 1:22 am

You need BCDW.COM from the "bin" directory in freedos.img. The DOS commands to get the boot parameter can be found in UBCD.BAT in the same directory:

Code: Select all

rem ---- BCDW ----
if not exist %ramdrv%\bin\bcdw.com goto _bcdw
bcdw CheckForBCDW
if errorlevel 1 goto _bcdw
bcdw FindBootableCDLetter
if errorlevel 1 goto _bcdw
bcdw GetBootImageCommandLine
if errorlevel 1 goto _bcdw
if "%cd1%"=="" set cd1=%BCDW_CDROM%:
set ubcdcmd=%BCDW_CL%
:_bcdw

xufux
Posts: 5
Joined: Tue Aug 16, 2005 11:34 pm

#3 Post by xufux » Thu Aug 18, 2005 3:22 am

i've watched in UBCD.BAT and in the AUTOEXEC.BAT from freedos.img but i don't understand how it works:

i've put BCW.COM on my floppy image, and added the dos command you gave me but each call to bcdw return 1

do you have a step by step tutorial about this ?

this is what i've done:

on "myfloppy.IMG"
added the file "BCDW.COM"
added theses lines at the end of AUTOEXEC.BAT:

Code: Select all

rem ---- BCDW ----
if not exist %ramdrv%\bin\bcdw.com goto _bcdw
bcdw CheckForBCDW
rem if errorlevel 1 goto _bcdw
rem bcdw FindBootableCDLetter
rem if errorlevel 1 goto _bcdw
bcdw GetBootImageCommandLine
if errorlevel 1 goto _bcdw
rem if "%cd1%"=="" set cd1=%BCDW_CDROM%:
set ubcdcmd=%BCDW_CL%
:_bcdw
call \dosapps\%ubcdcmd%\startup.bat
in custom.scn
add line

Code: Select all

if ($lastKey == key[f3]); then isolinux memdisk initrd=/images/myfloppy.IMG ubcdcmd=mydosapp
and i created \dosapps\mydosapp\startup.bat:

Code: Select all

echo BCDW_OK
what happens: myfloppy.img is launch but it seems that the bcdw commands don't work: errorlevel 1 return by bcdw commands

NwDsk
Posts: 27
Joined: Thu Feb 24, 2005 1:32 am
Contact:

#4 Post by NwDsk » Thu Aug 18, 2005 3:38 am

xufux,

Get msubcd.img from nwdsk-beta and rename it to freedos.img and overwrite the one on your ISO with it. It contains a MsDOS 7.10 version of the general UBCD image. When you do not like all the optional modules on it, edit the image (with WinImage or so) and remove the modules from dirs \level0, \level1 and \level2 that you do not like. They are all optional except the CDROM module (and maybe VC).

Success,

Erwin

xufux
Posts: 5
Joined: Tue Aug 16, 2005 11:34 pm

#5 Post by xufux » Thu Aug 18, 2005 4:05 am

that doesn't work: i replaced freedos.img with msubcd.img as you said but it doesn't load my dos apps: must miss something but don't know what.

nevermind: i don' t what to get rid of freedos and replace it with something as complicated as it.

all i wanna do is to understand the mechanisms of calling dos apps with bcdw.

my floppy boot will be very simple: i aim to use my ghost 2003 floopy (PC-DOS) which only contains USB drivers (no CD, etc)

here's the autoexec:

Code: Select all

@echo off
SET TZ=GHO-01:00
GUEST.EXE
MOUSE.COM

NwDsk
Posts: 27
Joined: Thu Feb 24, 2005 1:32 am
Contact:

#6 Post by NwDsk » Thu Aug 18, 2005 4:26 am

xufux,

Then is any regular dos-app from UBCD working at all or is it just that yours are not working?.
Are you working with UBCD 3.3 using bcdw.csm 2.0a1 in boot\modules (just peek in bcdw.csm with a viewer to see) ?

Try adding the full dos-path '\dosapps\yourapp\startup.bat'.

Like:

Code: Select all

bcdw boot \images\yourdos.img \dosapps\yourapp\startup.bat 
Or:

Code: Select all

isolinux memdisk initrd=/images/yourdos.img ubcdcmd=\dosapps\yourapp\startup.bat
Erwin

xufux
Posts: 5
Joined: Tue Aug 16, 2005 11:34 pm

#7 Post by xufux » Thu Aug 18, 2005 4:32 am

the error with msubcd.img (works OK with freedos.img)

Code: Select all

The memory-resident portion of SMARTDrive is loaded.  
UNPACK: Extracting "A:\level1\VC.CAB"                 
UNPACK: Extracting "A:\level3\AUTORUN3.CAB"           
                                                      
Your program caused a divide overflow error.          
If the problem persists, contact your program vendor. 
                                                      
BOOTDRV:     A:                                       
RAMDRV:      Q:                                       
UBCDDRV:     T:                                       
                                                      
                                                      
Your program caused a divide overflow error.          
If the problem persists, contact your program vendor. 
                                                      
Your program caused a divide overflow error.          
If the problem persists, contact your program vendor. 
                                                      
Your program caused a divide overflow error.          

NwDsk
Posts: 27
Joined: Thu Feb 24, 2005 1:32 am
Contact:

#8 Post by NwDsk » Thu Aug 18, 2005 5:11 am

Hmm, I need to check those errors later. Strange that MsDOS is making problems where FreeDOS rolls on.

How about my remarks on your path-statement with your own dos-image and about the version of bcdw.csm and UBCD?

NwDsk
Posts: 27
Joined: Thu Feb 24, 2005 1:32 am
Contact:

#9 Post by NwDsk » Thu Aug 18, 2005 1:18 pm

About the errors with the msubcd.img:
Allthough I could not reproduce them, msubcd did choke with me on accessing the CDROM when searching for the dos-app when LFN was activated. So I changed LFN (long file names) to be inactive by default instead of active. I just uploaded the corrected msubcd.img again to the same location.

Erwin

Scott Cooper
Posts: 136
Joined: Mon Apr 18, 2005 9:07 pm

#10 Post by Scott Cooper » Wed Aug 24, 2005 2:01 am

If you're aiming for a Ghost 2003 floppy image, you can install Ghost 2003 in Windows and use it's utility to create a bootable floppy. From there you can edit out the unneeded drivers.

Locked