Jump to content











Photo
- - - - -

UBCD5.00 (beta7) grub4dos menu


  • Please log in to reply
127 replies to this topic

#1 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 30 October 2008 - 02:02 AM

It seems that there are people who want a grub4dos menu for Ultimate Boot CD. If you want a grub4dos menu in UBCD500, it is now time to make it.

See: http://www.ultimateb...opic.php?t=1635

#2 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 22 December 2008 - 10:27 PM

Is nobody interested in making grub4dos menu entries for ultimate boot cd V5.00 so a download to the official page can be added?

Download UBCD50beta7 from: http://www.ultimateb...opic.php?t=1698.

#3 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 23 December 2008 - 01:01 AM

I am interested to see grub4dos in UBCD and UBCD4WIN.

However, I can join only a limited number of projects therefore I am not interested in contributing.

#4 was_jaclaz

was_jaclaz

    Finder

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

Posted 23 December 2008 - 09:16 AM

It seems to me that poorman over at http://www.ultimateb...opic.php?t=1635 is willing to do the work.

If he starts from the "base" from ilko:
http://www.boot-land...?...=4486&st=11

I am sure he can do much of the work by himself.

If he has any doubt/needs any help in the "translation", we are here. :cheers:

jaclaz

#5 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 23 December 2008 - 09:55 AM

The last post from him is from 30 Oct 2008 so I don't expect much of it.

There is a problem with GRUB4dos for the fdubcd.img (freedos image), which needs additional command line parameters passed after the memdisk command.

title Ranish Partition Manager V2.40

kernel /isolinux/memdisk ubcdcmd=ranish

initrd /ubcd/images/fdubcd.igz

Info about the Freedos image of UBCD

If you want that you can launch the freedos image with the selected program directly, with the help of the ubcdcmd=ranish parameter, grub4dos needs a change.

The freedos image (fdubcd.igz) gets this parameter from memdisk by the program getargs.com inside this freedos image. The getargs.com program reads the parameters that are passed to memdisk from the memory of memdisk. See: http://people.cs.uch.../downloads.html for the source code.

If you want that you can use grub4dos floppy emulation for booting dosubcd.igz with a command line parameter, you have to write (or ask bean or tinybit) a similar dos program for grub4dos, which is able to read out the command line parameters which are passed to the kernel command line.

If you we have such a program, I will let it incorporate in the freedos image.

Or a similar command to the grub4dos write ADDR VAL command which can use a syntax like:
memdiskargs ubcdcmd=ranish initrd=/ubcd/images/dosubcd.igz
that writes to a specific memory address that can retrieved by getargs.com or a similar program.

#6 was_jaclaz

was_jaclaz

    Finder

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

Posted 23 December 2008 - 01:26 PM

It should be these lines in autoexec.bat:
set _memdisk=

set _linux=

if not exist %ramdrv%\bin\getargs.* goto _ngetargs

getargs >nul

if errorlevel 3 if not errorlevel 4 set _memdisk=3

if errorlevel 2 if not errorlevel 3 set _memdisk=2

if errorlevel 1 if not errorlevel 2 set _memdisk=1

:_ngetargs

if "%_memdisk%"=="" goto _nmemdsk

echo AUTOEXEC: MEMDISK(%_memdisk%)

getargs M >nul

if errorlevel 52 if not errorlevel 53 set _linux=4

if errorlevel 51 if not errorlevel 52 set _linux=3

if errorlevel 50 if not errorlevel 51 set _linux=2

if errorlevel 49 if not errorlevel 50 set _linux=1

if not "%_linux%"=="" echo AUTOEXEC: (%_linux%)LINUX

if not "%_linux%"=="1" goto _nmemdsk

if exist %ramdrv%\bin\modboot.* goto _nmemdsk

Unless I am mistaken, which is very possible :cheers:, it seems to me like memdisk is required anyway for the batch to work, or at least the %_memdisk% variable needs to be defined.

In other words it seems like grub4dos should "emulate" memdisk in order to work with current getargs.com, or, as you proposed ;), write a new (fictional name) getargsg4.com to parse differently memory and find the arguments, which however need to define the %_memdisk% variable.


Definitely it is something that will need tinybit or bean attention.

Personally I like more the idea of the "write ADDR VAL", since it does not need a change in the code.

Do you have any idea about the values of ADDR and VAL?

We could easily write a small batch to translate the actual needed values into a form compatible with grub4dos syntax.

I.e. leaving everything "as is" we submit to the batch the values from the partmgmt.cfg and we'll have the command lines to be added to the corresponding grub4dos .lst entry.

jaclaz

#7 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 23 December 2008 - 02:23 PM

The batch now requires indeed the memdisk variable, which is generated by the getargs.com program (reads the parameters passed by isolinux to memdisk from memory and it includes also the MEMDISK variable itself. This is outputted to a batch file which is run afterwards).
as702 is the maintainer of the freedos image now. So this can be changed easily (e.g.: a grub4dos variable instead of the memdisk one).

Personally I like more the idea of the "write ADDR VAL", since it does not need a change in the code.

Personally I don't like it. It makes it very difficult to understand what is passed to memdisk and it makes the config file very long because you need a lot of write commands below each other.
For a prove of concept the write command is usefull of course.

Do you have any idea about the values of ADDR and VAL?

For the VAL yes (at least I think so).
A memory viewer can be useful to determine the address.

#8 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 23 December 2008 - 06:03 PM

No need to use the obsolete “write addr val” method. :cheers:

Zw2312914 has invented a new approach. He makes use of the existing features of “default” and “savedefault” commands to write an integer value into the file “default”.

Here are the details:

First, create a file DEFAULT in the root dir of the image file. You need to copy the DEFAULT file from the grub4dos release.

Second, map this image file in memory using "map --mem ....... (fd0)", and followed by "map --hook".

Third, in a menu, use "default (fd0)/default" to specify the file DEFAULT for subsequent write by the savedefault command. Note that the DEFAULT file is now in the (fd0), and it is in memory.

Fourth, use savedefault command to write an integer into the file DEFAULT. This integer will act as a parameter that is passed to the image.

Fifth, boot the (fd0).

Sixth, a program in the (fd0) will read the integer stored previously as a parameter and take corresponding measures. Yes, the program can read the DEFAULT file because the DEFAULT file is in the root dir of (fd0).

At first glance, this process is difficult to understand. But this is certainly feasible, and has been in use.

#9 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 26 December 2008 - 04:20 PM

Zw2312914 have invented a new approach. He make use of the existing features of “default” and “savedefault” command to write an integer value into the file “default”.

Thanks, it works (but you have to add a number (e.g.: 0) in the beginning of the DEFAULT file (replace the first space), else you get an error).
  • Ungzip /ubcd/images/fdubcd.igz (rename to fdubcd.img.gz first).
  • Edit mount fdubcd.img.
  • Add a directory /args/ to the image.
  • Rename the DEFAULT file (2048 bytes) of the grub4dos package to grub4dos.arg
  • Change the first space in the grub4dos.arg to a 0.
  • Make grub4do2.arg and a grub4do3.arg file with the same content.
  • Save/unmount the fdubcd.img.
  • Gzip fdubcd.img and save as /ubcd/images/fdubcd.igz.

Converting a UBCD entry which uses the freedos image (fdubcd.igz) and the ubcdcmd= parameter to grub4dos syntax.
e.g.:
MENU LABEL Intel Processor Frequency ID V7.2.20041115 (P3 and below)

TEXT HELP

 Reports information about your Intel CPU, including brand name, rated and

 tested speed, cache memory, technologies and classification. Supports older

 Intel CPU (P3 and below).

ENDTEXT

KERNEL memdisk

APPEND initrd=/ubcd/images/fdubcd.igz ubcdcmd=intelfid
Luckily for us, the “default” and “savedefault” command to write an integer value into a specified file can be done multiple times in the same menu entry.

Make a menu.lst file:
# Save the value after the ubcdcmd= parameter in the grub4do*.arg files

# Because the default command only accepts numbers,

# we have to convert all characters of the ubcdcmd parameter

# to ASCII codes (only the 2 cipher ones).

#

# Each grub4do*.arg file can hold 7 ciphers at maximum,

# we can use only 6 of them because when the total number

# starts with a 0, it will be stripped by grub4dos.

#   e.g.: "0123456" becomes "123456"

#

# We have 3 files to which we can save the ASCII codes (grub4do*.arg).

# So the maximum parameter name of the ubcdcmd parameter

# must be limited to 9 (3 files * 3 ASCII codes).

# The ubcdcmd parameter contains filenames of files without

# extension in the /ubcd/dosapps/ directory.

# The limit of 9 ASCII codes won't give a problem because

# filenames in dos are limited to 8 characters

# ( + 3 for the extension).

#

#

# Use the the following table to convert the charaters after

# the 'ubcdcmd=' parameter to ASCII codes:

#

###################################################

#   0: 48		A: 65		K: 75		U: 85  #

#   1: 49		B: 66		L: 76		V: 86  #

#   2: 50		C: 67		M: 77		W: 87  #

#   3: 51		D: 68		N: 78		X: 88  #

#   4: 52		E: 69		O: 79		Y: 89  #

#   5: 53		F: 70		P: 80		Z: 90  #

#   6: 54		G: 71		Q: 81			   #

#   7: 55		H: 72		R: 82			   #

#   8: 56		I: 73		S: 83			   #

#   9: 57		J: 74		T: 84			   #

###################################################

# We treat small and capital letters the same (A=a=65).

# For dos filenames it doesn't matter if it a small or a capital letter .



title Intel Processor Frequency ID V7.2.20041115 (P3 and below)

	find --set-root /ubcd/images/fdubcd.igz

	map --mem /ubcd/images/fdubcd.igz (fd0)

	map --hook

	chainloader (fd0)+1

	root (fd0)



	# What follows it the replacement of the ubcdcmd=intelfid parameter for grub4dos

	# Write the first 3 characters ('int') in ASCII (=737884) /args/grub4dos.arg

	default (fd0)/args/grub4dos.arg

	savedefault 737884

	# Write the next 3 characters ('elf') in ASCII (=697670) /args/grub4do2.arg

	default (fd0)/args/grub4do2.arg

	savedefault 697670

	# Write the last 2 characters ('id') in ASCII (=7368) to /args/grub4do3.arg

	default (fd0)/args/grub4do3.arg

	savedefault 7368



	boot
When you type vc (F3 to view file content) at the end of the boot process, you can find the right values in the grub4do*.arg files.

So a script can now read and convert the ubcdcmd parameter that is needed to unpack and launch the right package from the /ubcd/dosapps folder.

I am no dosguru so I don't know (yet?) how to do it.

Is there a way to replace (or to add below) the following text with a help text like the menu.c32 and vesamenu.c32 of syslinux can do?
Use the ↑ and ↓ keys to highlight an entry. Press ENTER or 'b' to boot.

Press 'e' to edit the commands before booting, or 'c' for a command line.


#10 was_jaclaz

was_jaclaz

    Finder

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

Posted 26 December 2008 - 08:23 PM

Zw2312914 has invented a new approach. He makes use of the existing features of “default” and “savedefault” commands to write an integer value into the file “default”.

What I do LOVE about grub4dos and it's developers is that with grub4dos and thanks to them you can do almost everything.
What I do HATE about grub4dos developers :cheers: is that to get some info or documentation from them or to get in Western countries what the good Chinese guys already know, is one of the most difficult things in the world.

I guess I'll have to study a bit of Chinese just to keep me up-to-date. ;)


I am no dosguru so I don't know (yet?) how to do it.


Neither am I, but I'll see what I can do. :cheers:


jaclaz

#11 was_jaclaz

was_jaclaz

    Finder

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

Posted 27 December 2008 - 01:05 PM

This is the translation batch (2K/Xp) NOT DOS:
@echo offSETLOCAL ENABLEEXTENSIONsSETLOCAL ENABLEDELAYEDEXPANSION:: makeargs.cmd small batch file to create ubcdcmd grub4dos entries:: by jaclaz 27th December 2008:: USAGE::: makeargs <parameter>:: Example::: makeargs intelfidSET Param=%1IF %1.==. GOTO :EOFECHO # This is the replacement of the ubcdcmd=%Param% parameter for grub4dosSET Chars=%Param:~0,1% %Param:~1,1% %Param:~2,1% %Param:~3,1% %Param:~4,1% %Param:~5,1% %Param:~6,1% %Param:~7,1% %Param:~8,1%SET /A Counter=0SET /A Loop_Counter=0For %%A in (%Chars%) DO (SET /A Counter+=1CALL :code_this %%ASET Triplet_in=!Triplet_in!!Letter!SET Triplet_out=!Triplet_out!!Code!IF !Counter!==3 SET /A Loop_Counter +=1 &CALL :Show_result !Loop_Counter!)IF DEFINED Triplet_in CALL :Show_result 3GOTO :EOF:code_thisSET Letter=%1REM SET LetterFOR %%? IN ( 048 A65 K75 U85149 B66 L76 V86250 C67 M77 W87351 D68 N78 X88452 E69 O79 Y89553 F70 P80 Z90654 G71 Q81755 H72 R82856 I73 S83957 J74 T84) DO (Set this_token=%%?Set this_letter=!this_token:~0,1!Set this_code=!this_token:~1,2!IF /I "%Letter%"=="!this_letter!" SET Code=!this_code!)GOTO :EOF:Show_resultIF %1.==1. SET this_display=first&SET g4d_file=grub4dos.arg IF %1.==2. SET this_display=second&SET g4d_file=grub4do2.arg IF %1.==3. SET this_display=third&SET g4d_file=grub4do3.arg ECHO # Write the !this_display! !Counter! characters (&#39;!Triplet_in!&#39;) in ASCII (=!Triplet_out!) /args/!g4d_file!ECHO default (fd0)/args/!g4d_file!ECHO savedefault !Triplet_out!SET Triplet_in=SET Triplet_out=SET Counter=0GOTO :EOF

jaclaz

#12 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 27 December 2008 - 03:55 PM

I made a new conversion table. It contains all characters of the ASCII code table, except for the non-printable characters (codes 0-31and 127 (=delete)):
ASCII code table: http://web.cs.mun.ca...scii-table.html

So that you can pass almost every command to a dos based image, with only a few modifications to the script (e.g.: pass additional parameters)
.
The numeric values that represent the characters that we want, always consist of 2 (or 4) characters, so it easy to convert them. The numeric values don't contain the number '0' (zero). So we can put 7 ciphers in one DEFAULT file.

Problem that would arise when we use zeros:
Suppose that the value of '20' corresponds with 'A'. When we want to pass 'AAAAA' to the freedos image, we would want to write:
* file1: '2020202'
* file2: '020' ==> grub4dos converts it to '20' = problem!

New conversion table for manual use (conversion-table.txt):
(space) : 110 : 121 : 132 : 143 : 154 : 165 : 176 : 187 : 198 : 219 : 22A : 23B : 24C : 25D : 26E : 27F : 28G : 29H : 31I : 32J : 33K : 34L : 35M : 36N : 37O : 38P : 39Q : 41R : 42S : 43T : 44U : 45V : 46W : 47X : 48Y : 49Z : 51a : 52b : 53c : 54d : 55e : 56f : 57g : 58h : 59i : 61j : 62k : 63l : 64m : 65n : 66o : 67p : 68q : 69r : 71s : 72t : 73u : 74v : 75w : 76x : 77y : 78z : 79! : 81" : 82# : 83$ : 84% : 85& : 86&#39; : 87( : 88) : 89* : 91+ : 92, : 93- : 94. : 95/ : 96: : 97; : 98< : 9911= : 9912> : 9913? : 9914@ : 9915[ : 9916] : 9917^ : 9918_ : 9919&#96; : 9921{ : 9922| : 9923} : 9924~ : 9925[/codebox]New conversion table for usage with script for making the grub4dos entries ([b]conversion-table-grub4dos.txt[/b]):[codebox] 11012113214315416517618719821922A23B24C25D26E27F28G29H31I32J33K34L35M36N37O38P39Q41R42S43T44U45V46W47X48Y49Z51a52b53c54d55e56f57g58h59i61j62k63l64m65n66o67p68q69r71s72t73u74v75w76x77y78z79!81"82#83$84%85&86&#39;87(88)89*91+92,93-94.95/96:97;98<9911=9912>9913?9914@9915[9916]9917^9918_9919&#96;9921{9922|9923}9924~9925[/codebox]New conversion table for usage with script in the freedos image ([b]conversion-table-freedos.txt[/b]):[codebox]11 12013114215316417518619721822923A24B25C26D27E28F29G31H32I33J34K35L36M37N38O39P41Q42R43S44T45U46V47W48X49Y51Z52a53b54c55d56e57f58g59h61i62j63k64l65m66n67o68p69q71r72s73t74u75v76w77x78y79z81!82"83#84$85%86&87&#39;88(89)91*92+93,94-95.96/97:98;9911<9912=9913>9914?9915@9916[9917]9918^9919_9921&#96;9922{9923|9924}9925~[/codebox]Those 3 files can be generated by the following script and uses the content of [b]characters.txt[/b] as input for the characters for which you want a number for use in the grub4dos menu ([b]conversion-table-generator.sh[/b]).For windows users, download unxutils: [url="http://sourceforge.net/projects/unxutils/"]http://sourceforge.net/projects/unxutils/[/url].Place the following executables in the same directory as this script and the [b]characters.txt[/b] file: [b]expr[/b], [b]rm[/b] and [b]sh[/b].[codebox]#!/bin/sh# Generates 3 files based on the input of characters.txt:#   - conversion-table.txt: human readable conversion table#   - conversion-table-grub4dos.txt: conversion table for use with makeargs.cmd#		(small batch file to create ubcdcmd grub4dos entries) of jaclaz#   - conversion-table-freedos.txt: conversion table for use in the freedos image## For windows users, download unxutils:#   [url="http://sourceforge.net/projects/unxutils/"]http://sourceforge.net/projects/unxutils/[/url][/url].# Place the following executables in the same directory as this script# and the characters.txt file: expr, rm and sh.## See [url="http://www.boot-land.net/forums/index.php?showtopic=6119&st=10"]http://www.boot-land.net/forums/index.php?...=6119&st=10[/url]# for more info.## Written on 27 December 2008 by Gert Hulselmans# Check if the file characters.txt exists.if [ -f &#39;characters.txt&#39; ]; then	# Remove 3 files.	rm -f conversion-table.txt	rm -f conversion-table-grub4dos.txt	rm -f conversion-table-freedos.txt	# Start with number &#39;11&#39;	i=11	# Read and process each line of characters.txt	while read LINE; do		echo "$LINE : $i" >> conversion-table.txt		if [ "$LINE" = "(space)" ]; then LINE=&#39; &#39;; fi		echo "$LINE$i" >> conversion-table-grub4dos.txt		echo "$i$LINE" >> conversion-table-freedos.txt		# Increase $i by 1.		i=&#96;expr $i + 1&#96;		# Increase $i by 1 when it ends on a zero.		if [[ "$i" = *0 ]]; then			i=&#96;expr $i + 1&#96;		# When we reach 99 (our &#39;escape character&#39;), change $i to 9911.		elif [ "$i" = "99" ]; then			 i=9911		fi	done < characters.txt	# Convert \n to \r\n for dos.	# Install todos in linux if you don&#39;t have it!	#	Ubuntu: sudo apt-get install tofrodos	# Uncomment the following line if you use linux.	#todos conversion-table*.txt	echo &#39;Files created: conversion-table.txt, conversion-table-grub4dos.txt and conversion-table-freedos.txt.&#39;else	echo "The file &#39;characters.txt&#39; doesn&#39;t exist."fi[/code]On windows, run <strong class='bbc'>conversion-table-generator.bat</strong> (I hope that it works, I don&#39;t have windows).[code=auto:0]@echo offif not exist expr.exe goto NOFILEif not exist rm.exe goto NOFILEif not exist sh.exe goto NOFILEif not exist conversion-table-generator.sh goto NOFILEcall sh.exe conversion-table-generator.shpause > nulgoto END:NOFILEecho Place expr.exe, rm.exe, sh.exe and conversion-table-generator.sh in the same directory as this script.pause > nul:END
If you are interested in making shell scripts (instead of batch files) for windows with the unxutils tools visit: http://tldp.org/LDP/abs/html/ for learning the syntax. I find the syntax much easier than the batch script syntax :cheers: .

characters.txt: contains all characters for which you want a numerical equivalent.
(space)0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!"#$%&&#39;()*+,-./:;<=>?@[\]^_&#96;{|}~
You can add or delete characters from the characters.txt file and generate the conversion-table files with the conversion-table-generator.sh script.

@jaclaz: thanks for the script.
Can you modify it, so it can read the values out of the conversion-table-grub4dos.txt file for more flexibility?

#13 was_jaclaz

was_jaclaz

    Finder

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

Posted 27 December 2008 - 04:28 PM

@jaclaz: thanks for the script.
Can you modify it, so it can read the values out of the conversion-table-grub4dos.txt file for more flexibility?


If I can understand the use of them possibly yes. :cheers:

I mean, the original "problem" as I read it was to convert a string of max length=9 composed of any number in the 0-9 range and any letter in the a-z and A-Z range to the ASCII corresponding codes, making in the meantime a CaSe InSeNsItIvE conversion.

Then divide it in three codes each snippets.

The aim of this is to pass a parameter that represents a file name (no extension) compatible with the 8.3 naming convention for use with UBCD.

In other words my batch is conceived with a KISS approach, what is the utility of using characters that are not compatible with 8.3 naming convention or any that are NOT used in the UBCD image names?

As always, the question, is:
Is this a phylosophical thread or one with a given end goal? ;)

jaclaz

P.S.:
Please whenever posting anything longer than a few lines, use codebox tags instead of code ones.

P.P.S.:
I checked the _getargs.bat file generated on Ramdrive in %TMP% when choosing "ranish":
@SET initrd=/ubcd/images/fdubcd.igz

@SET ubcdcmd=ranish

@SET BOOT_IMAGE=memdisk

@echo A&#58; is MEMDISK

Where are the others variable catch from?
Are they needed?
Could we, once established the "unique" parameter, such as "ubcdcmd=ranish" re-parse the grub4dos menu.lst and get other parameters from the corresponding entry?
Or we could use a simple [code=auto:0] within 3 characters and thus entirely inside the first grub4dos.arg - totally independent from the ubcdcmd ones - and re-parse the menu.lst until we find lines such as:
# [code=auto:0] @SET initrd=/ubcd/images/fdubcd.igz
# [code=auto:0] @SET ubcdcmd=ranish
# [code=auto:0] @SET BOOT_IMAGE=memdisk
# [code=auto:0] @echo A: is MEMDISK
and simply ECHO the corresponding lines into _getargs.bat

Say for example that [code=auto:0] for Ranish is:
H for HDD
P for partition management
R for ranish

or a numeric code like 361 (item 3/item 6/item 1) or an "arbitrary" sequential number, like 258, coming from a conversion table.

#14 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 27 December 2008 - 04:52 PM

What I do LOVE about grub4dos and it's developers is that with grub4dos and thanks to them you can do almost everything.
What I do HATE about grub4dos developers :cheers: is that to get some info or documentation from them or to get in Western countries what the good Chinese guys already know, is one of the most difficult things in the world.

I guess I'll have to study a bit of Chinese just to keep me up-to-date. ;)

jaclaz


Thank you for your praise, jaclaz. You are so kind. Many Chinese friends admire and respect you. If you would appear in the Chinese community, I believe all your fans there are greatly honored.

#15 was_jaclaz

was_jaclaz

    Finder

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

Posted 27 December 2008 - 05:07 PM

Thank you for your praise, jaclaz. You are so kind. Many Chinese friends admire and respect you. If you would appear in the Chinese community, I believe all your fans there are greatly honored.


I guess that the risk of inadventertly say/write something like the original Coca-Cola marketing attempts:
http://www.snopes.co...ore/tadpole.asp
is too big. :cheers:

Please consider your kind invitation as accepted, but though it would be a pleasure to exchange ideas in Chinese, I think it is not doable, at my age and with all the other things I have to do to actually learn anything more than "hello"..... ;)

:cheers:

jaclaz

#16 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 27 December 2008 - 05:30 PM

I guess that the risk of inadventertly say/write something like the original Coca-Cola marketing attempts:
http://www.snopes.co...ore/tadpole.asp
is too big. :cheers:

Please consider your kind invitation as accepted, but though it would be a pleasure to exchange ideas in Chinese, I think it is not doable, at my age and with all the other things I have to do to actually learn anything more than "hello"..... ;)

:cheers:

jaclaz


Maybe I can persuade them to learn Italian, or at least to learn English. :cheers:

#17 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 27 December 2008 - 11:13 PM

If I can understand the use of them possibly yes. :cheers:

I mean, the original "problem" as I read it was to convert a string of max length=9 composed of any number in the 0-9 range and any letter in the a-z and A-Z range to the ASCII corresponding codes, making in the meantime a CaSe InSeNsItIvE conversion.

That was the original idea ;) , but it is possible that the freedos image can get other parameters. e.g.: a parameter that passes the arguments for some programs that when you run them now, only display the usage parameter. So you have to pass the arguments yourself, based on your own preferences :cheers: .


e.g.: Boot Partition (Add partitions to the WinNT/2K/XP boot menu): argument driven program.


/ubcd/dosapps/ubcd.ini contains the information to build the menu inside the freedos image on the fly.

-$ = tells the application to pause (press any key to continue) before returning to the main menu.
-$$ = simply tells it to not return to the menu and exit to the command prompt (useful if the application in question is command-line driven).
"-" will immediately default back to the menu.

http://ultimatebootc...php?p=5631#5631
Info about the freedos image

bootpart; &#34;bootpart.exe &#34;; -$$; Boot Partition &#40;Add partitions to the WinNT/2K/XP boot menu&#41;
So here, it would be handy if the arguments can be passed also.

P.S.:
Please whenever posting anything longer than a few lines, use codebox tags instead of code ones.

Will do it in the future. I thought that the [ code ] command didn't displayed scroll bars because it looks at the size of the code and not to the number of lines :cheers: .

P.P.S.:
I checked the _getargs.bat file generated on Ramdrive in %TMP% when choosing "ranish":

@SET initrd=/ubcd/images/fdubcd.igz

@SET ubcdcmd=ranish

@SET BOOT_IMAGE=memdisk

@echo A&#58; is MEMDISK

Where are the others variable catch from?
Are they needed?

I don't think that the BOOT_IMAGE=memdisk is used somewhere. It is a parameter that memdisk (or isolinux/syslinux) generates on its own. Boot the utility g4u with isolinux - memdisk, it takes a while to boot, so you can see the parameters that memdisk displays.
command line&#58; initrd=/ubcd/images/g4u.igz BOOT_IMAGE=memdisk

Could we, once established the "unique" parameter, such as "ubcdcmd=ranish" re-parse the grub4dos menu.lst and get other parameters from the corresponding entry?
Or we could use a simple [code=auto:0] within 3 characters and thus entirely inside the first grub4dos.arg - totally independent from the ubcdcmd ones - and re-parse the menu.lst until we find lines such as:
# [code=auto:0] @SET initrd=/ubcd/images/fdubcd.igz
# [code=auto:0] @SET ubcdcmd=ranish
# [code=auto:0] @SET BOOT_IMAGE=memdisk
# [code=auto:0] @echo A: is MEMDISK
and simply ECHO the corresponding lines into _getargs.bat

Say for example that [code=auto:0] for Ranish is:
H for HDD
P for partition management
R for ranish

or a numeric code like 361 (item 3/item 6/item 1) or an "arbitrary" sequential number, like 258, coming from a conversion table.

It is possible to do it. It was my first thought.
It should be possible to add a grub4dos parameter (fifth column) to the /ubcd/dosapps/ubcd.ini file, but I think it will have draw backs. If applications are added, deleted or moved ( professional users that can't use programs "not for professional use") to different categories, it might be possible that you have to edit more than one entry in the menu files or that you have to be very careful if you have added and deleted programs, to not use the same number again (read labor intensive). With the approach described above, you only have to create the entry once. You can place it in every category afterwards without much labor.

#18 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 December 2008 - 05:20 PM

As I see it , UBCD uses a very complex method of selecting the various booting options.

Are you in contact with the Author/Authors?

Maybe if someone could explain how all things are interconnected we can find a simple way.

BTW, right now I have not time/will to rebuild a .iso image with grldr as no-emulation bootsector, I did a quick test with a grub4dos bootfloppy and the original .iso in Qemu.

The UBCD .iso has everything CAPITAL, and the bootimage floppy seems like not being able to detect properly the CD (thus it loads no driver for it, BUT this entry in menu.lst:

title Ranish Partition Manager V2.40
root (cd)
kernel /ISOLINUX/MEMDISK. initrd=/ubcd/images/fdubcd.igz ubcdcmd=ranish BOOT_IMAGE=memdisk
initrd /UBCD/IMAGES/FDUBCD.IGZ


Produces a correct _getargs.bat:
@SET initrd=/ubcd/images/fdubcd.igz

@SET ubcdcmd=ranish

@SET BOOT_IMAGE=memdisk

@echo A&#58; is MEMDISK
and booting is correctly (because of the non-mounted CD) producing an error stating that ranish.bat is missing.

Maybe this whole thread is just a boo-boo? :cheers:

Can you try to replicate with a properly made .iso?

jaclaz

#19 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 28 December 2008 - 10:30 PM

...
and booting is correctly ...

Because you still use memdisk and pass the arguments, just as the original UBCD would. The only difference is that UBCD uses syslinux/isolinux to load memdisk, and you used grub4dos to load memdisk.

Which brings the question, which I meant to ask- why just not follow this approach? Simply replace syslinux/isolinux with grub4dos and keep using memdisk for floppy emulation, rather than emulate by grub4dos.

In other hand- ktp reported issues with the combination grub4dos/memdisk:
http://www.boot-land...p?showtopic=448

I don't see follow ups after tynibit's suggestions, neither could I reproduce the issue on 3 systems tested. Would the newest grub4dos/memdisk resolve the problem? Or an older grub4dos (2008-05-14 for example) and newer memdisk?

#20 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 28 December 2008 - 10:46 PM

I use linux. If I mount the iso, all files are in lowercase.

I made the iso with mkisofs:
title Ranish Partition Manager V2.40 (BOOT_IMAGE=memdisk)root (cd)kernel /isolinux/memdisk initrd=/ubcd/images/fdubcd.igz ubcdcmd=ranish BOOT_IMAGE=memdiskinitrd /ubcd/images/fdubcd.igztitle Ranish Partition Manager V2.40root (cd)kernel /isolinux/memdisk initrd=/ubcd/images/fdubcd.igz ubcdcmd=ranishinitrd /ubcd/images/fdubcd.igz
But the difficult way for passing the ubcdcmd parameter are for people for which memdisk doesn't work:http://www.ultimatebootcd.com/forums/viewtopic.php?t=1635quote from ktp: http://www.boot-land.net/forums/index.php?showtopic=4486

Otherwise, unfortunately after syslinux booting from grub4dos, all the applications hang at --InitDisk-- invalid opcode. I believe this is due to memdisk used to load fdubcd.igz diskette image (FreeDos).Edit:A bypass I used a long time ago for this memdisk problem is to only use grub4dos:- diskette images: use floppy mapping- applications: by using DOS boot then invoking them (dosapps directory) with DOS utility: powermenu.So normally all UBCD iso content is covered.

So the previous posts are for solving this problem (mapping the floppy with grub4dos and passing the parameters).So, I want that the following entry also works for those users:
title Ranish Partition Manager V2.40map --mem (cd)/ubcd/images/fdubcd.igz (fd0)map --hookroot (fd0)# What follows it the replacement of the ubcdcmd=ranish parameter for grub4dos.# Write the first 3 characters (&#39;ran&#39; = 715266) and the first number of the fourth # character (&#39;i&#39; = 63, so write &#39;6&#39;) in /args/grub4dos.argdefault (fd0)/args/grub4dos.argsavedefault 7152666# Write the second part of the fourth character (&#39;i&#39; = 63, so write &#39;1&#39;)# and write the next 2 characters (&#39;sh&#39; = 7259 ) in /args/grub4do2.argdefault (fd0)/args/grub4do2.argsavedefault 17259# If there where more charachters in ubcdcmd (max 8), write also to /args/grub4do3.arg# default (fd0)/args/grub4do3.arg#savedefault 0chainloader (fd0)+1
So we write 3.5 characters per file (=7 ciphers).

/args/grub4dos.arg: 3.5 characters per file (=7 ciphers)/args/grub4do2.arg: 3.5 characters per file (=7 ciphers)/args/grub4do3.arg: 1 character per file (=2 ciphers ==> this makes 8 characters in total due filesize limit of 8 characters in dos)

It may look stupid to write 3.5 characters per file, but this approach allows to use as less as files as possible.I asked Victor Chew (author of UBCD) and he agreed with the cmdline approach for other utilities (see post above).So one universal way to write different parameters (which don't exist in the current freedos image BTW: e.g cmdline= parameter) to files in the image would be good. Because you don't know how long the length of those arguments will be, it is better to use all available write space in one file.

Are you in contact with the Author/Authors?

Yes, I am.Victor Chew is the author.as702 is the author of the freedos image. Ask him, if you want to know every detail about the freedos image. He started writing (or he said it at least) documentation sometime ago. i didn't see it (but he disappeared for some months). Normally, is back on stage now or in the following weeks.FYI: I made some parts of UBCD myself. Mostly, the linux part of UBCD.

CPUstress imageAntivirus modules for Parted Magic
The new color layout of UBCD, better organised directory structure, ...



#21 was_jaclaz

was_jaclaz

    Finder

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

Posted 29 December 2008 - 09:35 AM

OK, so we now have two possible ways.

One still using memdisk, with no problems.

One for which the base batch for translation is ready (it will be trivial to change from 3 to 3.5 characters, though I cannot see the real advantage - again apart the phylosophical approach - I mean in some, possibly few cases where the ubcdcmd= value is 7 letters we can save one of the two .arg files, but it would most probably make the parsing of the files more complex only for being able to parse either 2 or 3 files).

But we miss, from the UBCD side, a program capable of parsing the .arg files.

If someone details how/when/where this should be done, I may be able to help/contribute.

Still, I like the idea of coding the menues and using one single .arg file and then re-parse the existing menu.lst far better.

I can write (on the 2k/XP side) a batch that automatically "codes" the entries, i.e. something to which you feed "any" UBCD "original" syslinux .cfg and outputs a corresponding menu.lst, this way any change in the "original" would be solved on-the-fly by re-running the batch.
I am sure that you or someone else more Linux/bash oriented than me could "port" the same to Linux - I am not so sure about a DOS version. :cheers:

jaclaz

#22 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 29 December 2008 - 10:02 PM

@ tinybit:
Are there free memory locations that can be used to write data to memory with the write command (100 bytes should be enough, but more space (same amount as the max cmdline of the linux kernel = 2047 bytes according to the syslinux documentation) would be better)
that doesn't get overwritten with data again, when you map a iso (without --mem option), map a floppy disk image ( with --mem option) and boot this floppy image
(contains freedos)? I suppose that there must be such a location because when you boot the freedos floppy image with memdisk from grub4dos, the freedos inside floppy image can get the arguments passed to memdisk.

This will be a lot easier that the DEFAULT file approach because it would be much easier to pass more arguments.

The DEFAULT file approach seems also delay the booting process (2 seconds or so) when used in a virtual machine without hardware virtualisation support on the host PC.

If there are no safe memory locations to write to, can you add a new option to grub4dos that allows to write any characters to a file similar to the DEFAULT file approach? So a file of exact 2kb (or 1kb, should be more than enough) to which you can write all characters that you want without a limit in size (unless the filesize limit of 2kb is reached of course).

An example of what I like to see if there are no safe memory locations to write to:

argsfile ==> comparable with the default command: file to which you want to write text
saveargs ==> comparable with the savedefault command: all characters that you want to write to the file on 1 line

menu.lst entry:
null byte: 	 &#92;&#48;bell character:  \a  ==> not very useful, I thinkbackspace: 	 \b  ==> not very useful, I thinkhorizontal tab:  \tformfeed: 	 \fnewline: 	 \ncarriage return: \r backslash:       \\space:           &#39; &#39; or \s ==> I invented this one.  I think it will be needed if you want to write a space in the beginning of the file for some reason  (assuming that grub4dos will remove spaces between saveargs word and the &#39;beginning&#39; of the argument).  It shouldn&#39;t be needed for the other spaces on that line.


#23 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 30 December 2008 - 02:37 AM

@Icecube

Erh, I am considering an implementation of writing-to-file feature. This implementation will be general. All files are allowed to be overwritten sector-by-sector with this implementation.

#24 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 30 December 2008 - 08:47 AM

Thanks for considering, Tinybit :cheers: .

How much time do you think it will take to implement it? I don't have much time in January so, if it takes a month, I don't care too much.

#25 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 30 December 2008 - 03:44 PM

Thanks for considering, Tinybit :cheers: .

How much time do you think it will take to implement it? I don't have much time in January so, if it takes a month, I don't care too much.


Though the time can not predict accurately, I don't think it will take as long as a month.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users