Jump to content











Photo
- - - - -

UBCD5.00 (beta7) grub4dos menu


  • Please log in to reply
127 replies to this topic

#51 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 24 January 2009 - 06:39 PM

Already done(2009-01-24), but use it with care, please.


An option is missing :cheers::
write [--offset=SKIP]  [--carelevel=HIGH | MEDIUM | IDONTCAREATALL] ADDR_OR_FILE INTEGER_OR_STRING
B)

Thanks for this added feature. :cheers:

jaclaz

#52 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 24 January 2009 - 07:20 PM

i guess something like that (option --unsafe) could be had by changing in /stage2/builtins.c the beginning of write_func like:
[codebox]... char tmp_file[16]; int unsafe; unsafe = 0; tmp_drive = saved_drive; tmp_partition = saved_partition; offset = 0; for (;:cheers: { if (grub_memcmp (arg, "--offset=", 9) == 0) { p = arg + 9; if (! safe_parse_maxint (&p, (int *)(void *)&offset)) return 0; } else if (grub_memcmp (arg, "--unsafe", 8) == 0) { unsafe = 1; } else break; arg = skip_to (0, arg); } p = NULL; ...[/codebox]and later:[code]#endif /* ! GRUB_UTIL */ if (j == DRIVE_MAP_SIZE && !unsafe) /* real drive */ { /* this command is intended for running in command line and inhibited from running in menu.lst */[/code]

this is, as the above, untried, however. if tinybit looks here he will surely be able to confirm or deny in a minute.
EDIT: there were some errors in the code above. fixed that.

#53 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 24 January 2009 - 07:35 PM

i guess something like that (option --unsafe) could be had by changing in /stage2/builtins.c the beginning of write_func like:


Hemmm, actually it was ONLY a little joke. :cheers:

My grandmother used to tell me "drive with care" or "drive slowly" when I took my bike or car.

She even told me once when I was leaving to go in another country (at the airport) "Fly low".....
B)

Actually half of the fun is RISK...:cheers:

jaclaz

#54 tinybit

tinybit

    Silver Member

  • Developer
  • 799 posts
  •  
    China

Posted 25 January 2009 - 04:44 AM

i guess something like that (option --unsafe) could be had by changing in /stage2/builtins.c the beginning of write_func like:
[codebox]... char tmp_file[16]; int unsafe; unsafe = 0; tmp_drive = saved_drive; tmp_partition = saved_partition; offset = 0; for (;:cheers: { if (grub_memcmp (arg, "--unsafe", 8) == 0) { unsafe = 1; } if (grub_memcmp (arg, "--offset=", 9) == 0)...[/codebox]and later:[code]#endif /* ! GRUB_UTIL */ if (j == DRIVE_MAP_SIZE) && (!unsafe) /* real drive */ { /* this command is intended for running in command line and inhibited from running in menu.lst */[/code]

this is, as the above, untried, however. if tinybit looks here he will surely be able to confirm or deny in a minute.


I think viruses can also use the option --unsafe to write MBR ........
This option is convenient for you, but it is more convenient for virus creaters.

#55 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 26 January 2009 - 09:38 AM

EDIT: my problems seem to be SOLVED now! in version 0.4.4-2009-01-26! wow! thanks a lot!
(
the problem was this: i start grub4dos, then:
[codebox]title ranish via nested mapping of patched fdubcd and ubcd50b10 iso map /images/ubcd50b10.iso (0xFF) map --hook map --mem /images/fdubcdp.img (fd0) map --hook write (fd0)/bin/setargs.bat @echo\x20off\nset\x20ubcdcmd=ranish\nexit\x200\nrem\x20...( chainloader (fd0)+1 rootnoverify (fd0) boot[/codebox] (fdubcd has to find the dosapps and does find it this way. cd-rom is then mounted as T:. the iso can be memory mapped as well. there will of course probably be several caveats etc with this approach. note that i am new to all this and only trying things out some quick&dirty oldschool way. note e.g. that it could be cleaner to first call getargs and see if there really is a memdisk around before calling setargs.bat. etc. but i don't care for now... :cheers: note that this is an example where (hd32) does not seem to work!) [s]@yaclaz[/s] EDIT: sorry. jaclaz is the name next step for me will be to check your cfg2lst script... B) the script hangs at devmgmt.cfg entry ATA Password Tool. if the help lines are removed by hand, it runs through. maybe it has to do with "..." all other cfg files of ubcd50b10 /menu are parsed without apparent problems. in memory.cfg the memtest entries are broken. the kernel line is not translated. in others.cfg avira is broken: kernel and append lines not translated correctly in cloning.cfg and main.cfg for the entry partimage the configfile link is not parsed, as are the configfiles in recovery.cfg and nuke in wiping.cfg. but you knew that, i see. :cheers:
until now no other problems found.

#56 tinybit

tinybit

    Silver Member

  • Developer
  • 799 posts
  •  
    China

Posted 26 January 2009 - 06:21 PM

only i was unable to quote spaces (probably i just did not understand the way it should work). \x20 works, however, so that is no problem for me.


The bug is just fixed about the backslash quoted space. Thank you very much for your quick immediate timely report.

#57 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 January 2009 - 06:45 PM

@yaclaz: next step for me will be to check your cfg2lst script... :cheers:
the script hangs at devmgmt.cfg entry ATA Password Tool. if the help lines are removed by hand, it runs through. maybe it has to do with "..." all other cfg files of ubcd50b10 /menu are parsed without apparent problems.


I'll check it right away. B)

caze, can you please post a screenshot of your keyboard?

I need a confirmation that on it the Y key is between T and U and the J is between H and K .... :cheers:

jaclaz

#58 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 26 January 2009 - 06:50 PM

no, it isn't. why? :cheers:
EDIT: oh. it seems i spelled your name wrong. sorry about that!!
btw, i added more in the end of the above post

btw, in case anyone else is interested, i translated your memdisk-based lst files to fd0-chainloading-based lst files. the results are untried. the work is done by an again very messy kind of code. it's in perl and i start it like:
#translates grub4dos ubcd-memdisk-lst-files as outputted by jaclaz' cfg2lst script to fd0-based-entries

#to be saved as md2fd.pl. NOT to be used on anything else, esp. not chainloading-entries etc!

#sorry this is only untidy quick&dirty code. expect errors etc. improvements are very welcome of course

sub trim($)

{

	my $string = shift;

	$string =~ s/^\s+//;

	$string =~ s/\s+$//;

	return $string;

}



open(INF,$ARGV[0]) or die;

$ubcdcmd=''; $fname=''; $title=''; $buff=''; $count=0; $y='';

for(<INF>) {

     $buff=$buff."$y"."\n";

	 chomp;

     $y=$_;

	 $y=trim($y);

	 #printf("parsing:$y\n");

	 $posubcdcmd = index($y, &#39;ubcdcmd=&#39;)+8;

	 if ($posubcdcmd>7) {

	  $ubcdcmd=substr($y,$posubcdcmd,length($y)-$posubcdcmd);	   

	 } elsif (index($y, &#39;initrd&#39;)>-1) {

      $_ = $y;

	  s/.*\///;

	  $fname=$_;

	 } elsif ((substr($y,0,5) eq &#39;title&#39;) || ((substr($y,0,5) eq &#39;TITLE&#39;))) {

	  $count++;

	  if (($count>1) && ($title ne &#39;&#39;) && (($ubcdcmd eq &#39;&#39;) || ($fname eq &#39;&#39;))) {

		if (($fname ne &#39;&#39;) && ((index($buff,&#39;kernel&#39;)>-1) || (index($buff,&#39;KERNEL&#39;)>-1))){

		  if ((index($buff,&#39;memdisk&#39;)>-1) || (index($buff,&#39;MEMDISK&#39;)>-1)){

		  #all ok, there was memdisk, but there were no kernel parameters

		  printf "TITLE $title\n";

	      printf "map /images/ubcd50b10.iso (0xFF)

map --hook

map --mem /images/$fname (fd0) 

map --hook 

chainloader (fd0)+1

rootnoverify (fd0) 

boot\n\n";

	       $title=&#39;&#39;; $buff=&#39;&#39;; $fname=&#39;&#39;; $ubcdcmd=&#39;&#39;; 	  

		  } else {

 		   #all seems ok, it just was a linux entry not an ubcd-memdisk-one!		

		   printf("$buff\n");		  

	       $title=&#39;&#39;; $buff=&#39;&#39;; $fname=&#39;&#39;; $ubcdcmd=&#39;&#39;; 

		  }

		} elsif ((index($buff,&#39;configfile&#39;)>-1) || (index($buff,&#39;CONFIGFILE&#39;)>-1)) {

		  #all seems ok, it just was a configfile!

		  printf("$buff\n");		  

	      $title=&#39;&#39;; $buff=&#39;&#39;; $fname=&#39;&#39;; $ubcdcmd=&#39;&#39;; 		

		} else {

		#something went wrong

 		  printf("#Sorry, new TITLE starts, but i have not both of UBCDCMD ($ubcdcmd) AND INITRD ($fname) and neither have i both of KERNEL and INITRD.\n");

		  printf("#This is what i read this far:\n");

		  printf("$buff\n");

		  }

       }

	  $title=substr($y,7,length($y)-1);

	  #printf("now begins: $title\n");

	  $buff=&#39;&#39;;

	  #} elsif (length($y)>1) {

	  #printf "#SORRY, COULD NOT PARSE:$y\n";

     }

	 if (($ubcdcmd ne &#39;&#39;) && ($fname ne &#39;&#39;) && ($title ne &#39;&#39;)) {

	   printf "TITLE $title\n";

	   printf "map /images/ubcd50b10.iso (0xFF)

map --hook

map --mem /images/$fname (fd0) 

map --hook 

write (fd0)/bin/setargs.bat". &#39;@echo\x20off\nset\x20ubcdcmd=&#39;.$ubcdcmd.&#39;\nexit\x200\nrem\x20...(&#39;."chainloader (fd0)+1rootnoverify (fd0) boot\n\n";	  $title=&#39;&#39;; $buff=&#39;&#39;; $fname=&#39;&#39;; $ubcdcmd=&#39;&#39;; $y=&#39;&#39;;	 }}close INF;


#59 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 26 January 2009 - 07:35 PM

@tinybit:

The bug is just fixed about the backslash quoted space. Thank you very much for your quick immediate timely report.

thank you for your incredibly quick immediate timely fix!!
B)

(btw, i found it funny that i was denied compiling grub4dos on another terminal. configure gave me start and _start undefined. in my usual bruteforce way i copied another whole preconfigured grub4dos src path over this one and can now make without any problems. i did not change any libraries or anything. both installations were win xp+cygwin. if you know a very quick answer of why this behaviour could have occured, i would find that interesting :cheers: )

#60 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 January 2009 - 07:40 PM

no, it isn't. why? :cheers:
EDIT: oh. it seems i spelled your name wrong. sorry about that!!

http://www.moviequot...cgi?qnum=122132

AHAHA AHAHA

:cheers:

Maybe, before starting post-processing the processing batch, one should make sure that the actual batch works. :cheers:

And PERL! :cheers:

Nothing against it :cheers:, mind you, but the whole point of using batches or bash scripts is to make the thing available to everyone, not only to those capable (and willing) to install PERL.

The problem with that devmgmt.cfg is an "open quote" (in the ATA Password Tool V1.1 entry)

Quick fix, change/add bolded:

FOR /F "tokens=1 delims=" %%? IN (%1) DO CALL :parseline §%%?

clean#.cmd %ThisFileName%.lst
ECHO ...DONE.

GOTO :EOF

:parseline
SET Thisline=%*

SET Thisline=%Thisline:§=%
SET Thisline=%Thisline:"='%



SET Thisline=%Thisline:(=[%
SET Thisline=%Thisline:)=]%


Since devmgmt.cfg resides in \menus\hdd\ do you think that Icecube will propose making:

\menus\hdd\isolinux\
\menus\hdd\grub4dos\

and GOD only knows how many more "double" subdirectories, or will he come to the conclusion that leaving .cfg and .lst in the same directory is a better choice? B)

jaclaz

#61 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 26 January 2009 - 08:18 PM

cool. thanks again!
:cheers:
(above i noted two other minor problems.)

#62 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,030 posts
  •  
    Belgium

Posted 26 January 2009 - 08:38 PM

Since devmgmt.cfg resides in \menus\hdd\ do you think that Icecube will propose making:

\menus\hdd\isolinux\

\menus\hdd\grub4dos\
and GOD only knows how many more "double" subdirectories, or will he come to the conclusion that leaving .cfg and .lst in the same directory is a better choice? B)

All isolinux files are in: /ubcd/menus/isolinux/ and /ubcd/menus/isolinux/hdd/, so I don't see why you changed it to /ubcd/menus/hdd/isolinux/ :cheers:.
Secondly, I don't believe in GOD, so to me, it seems that he/she/it/'something that doesn't exists' can't know it either.

#63 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 27 January 2009 - 10:31 AM

All isolinux files are in: /ubcd/menus/isolinux/ and /ubcd/menus/isolinux/hdd/, so I don't see why you changed it to /ubcd/menus/hdd/isolinux/ :cheers:.


OK, OK, at least I tried....B)

Icecube, since you seem like (also) a Linux guy, could you check how the F1 help works in gfxmenu?

Since gfxmenu is being/has been re-added to grub4dos, maybe we could "translate" the help txt in .cfg to gfxmenu and use the new feature? :cheers:

@caze
Will look into these:

in memory.cfg the memtest entries are broken. the kernel line is not translated.
in others.cfg avira is broken: kernel and append lines not translated correctly
in cloning.cfg and main.cfg for the entry partimage the configfile link is not parsed, as are the configfiles in recovery.cfg and nuke in wiping.cfg. but you knew that, i see.
until now no other problems found.


jaclaz

#64 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 27 January 2009 - 01:38 PM

@caze
Will look into these:

great. thanks!

i'm not icecube and no linux guru, but if you allow: gfxmenu ist a packaged file. you extract it like "cpio -i * < gfxmenu". (you find cpio with cygwin, e.g., if you want to do this from windows) you then get e.g. jpgs you can immediately modificate. but the help file not. it's proprietary binary. you would have to compile this: you grab https://launchpad.ne....39.orig.tar.gz, patch the help files, and re-make it. no real problem, i suppose, but not possible "on the fly". (note that i am also new to this and might be wrong. maybe there even exist tools to do this a lot easier. icecube will surely answer in a more helpful way.)
EDIT: i the meantime, i found http://en.opensuse.org/Gfxboot - it was actually also referenced by icecube in another thread :cheers:

#65 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 January 2009 - 05:10 PM

@caze

memory.cfg should be OK now. ALPHA 0.02 attached

The AVIRA entry in "original" others.cfg is "malformed" in the sense that is off the "standard" of initrd= being first argument after APPEND, replacing:

APPEND vga=769 initrd=/ubcd/boot/antivir/initrd.gz ramdisk_size=83068 root=/dev/ram0 rw console=/dev/vc/4

with:

APPEND initrd=/ubcd/boot/antivir/initrd.gz ramdisk_size=83068 root=/dev/ram0 rw console=/dev/vc/4 vga=769

makes the batch work.

I could make an "exception", but maybe Icecube could have the "fix" made in "original" source in next release. :cheers:

About cloning.cfg and main.cfg, yes, right now the entry:

CONFIG /pmagic/isolinux.cfg

is "skipped".

For the moment, you can try replacing line:
IF &#34;%1&#34;==&#34;CONFIG&#34; Set Thisline=#%Thisline% is temporarily commented - must find a way to &#34;translate&#34;&GOTO &#58;EOF
With:
IF &#34;%1&#34;==&#34;CONFIG&#34; IF &#34;%2&#34;==&#34;/pmagic/isolinux.cfg&#34; Set Thisline=configfile /pmagic/menu.lst&GOTO &#58;EOF

@Icecube
Besides the Avira thingy above, can you confirm that "/pmagic/isolinux.cfg" should become "/pmagic/menu.lst" ? Or "/menu.lst"? Or something else? :cheers:

B)

jaclaz

Attached Files



#66 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,030 posts
  •  
    Belgium

Posted 28 January 2009 - 05:59 PM

The avira entry will be changed.
(Note: Avira won't work if you use grub4dos emulation, unless you place /antivirus at the root of your CD(=not the ubcd iso
Compain at http://forum.avira.c...amp;boardID=210)

/pmagic/boot/isolinux.cfg will become /pmagic/boot/isolinux/isolinux.cfg in ubcd50b11 (and /pmagic/boot/grub/menu.lst).

Have you any idea how to translate the dban menu?
After you run the dban menu, you see some text + you can press F1 -F4 for all boot commands.
Maybe it is possible to make a menu from it.

#67 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 29 January 2009 - 02:36 PM

/pmagic/boot/isolinux.cfg will become /pmagic/boot/isolinux/isolinux.cfg in ubcd50b11 (and /pmagic/boot/grub/menu.lst).

I don't want to be rude, I am usually not :cheers:, but since I cannot convince you to do the choose the "easy" road, here is a list of .cfg files in beta10 (AFAIK):

1 - \boot\isolinux\isolinux.cfg
2 - \boot\syslinux\syslinux.cfg
3 - \pmagic\isolinux.cfg
4 - \ubcd\boot\dban\ISOLINUX.CFG
5 - \ubcd\boot\offline\isolinux.cfg
6 - \ubcd\menus\isolinux\bios.cfg
7 - \ubcd\menus\isolinux\cpu.cfg
8 - \ubcd\menus\isolinux\defaults.cfg
9 - \ubcd\menus\isolinux\hdd.cfg
10 - \ubcd\menus\isolinux\main.cfg
11 - \ubcd\menus\isolinux\memory.cfg
12 - \ubcd\menus\isolinux\others.cfg
13 - \ubcd\menus\isolinux\periph.cfg
14 - \ubcd\menus\isolinux\system.cfg
15 - \ubcd\menus\isolinux\hdd\bootmgmt.cfg
16 - \ubcd\menus\isolinux\hdd\cloning.cfg
17 - \ubcd\menus\isolinux\hdd\devmgmt.cfg
18 - \ubcd\menus\isolinux\hdd\diag.cfg
19 - \ubcd\menus\isolinux\hdd\editing.cfg
20 - \ubcd\menus\isolinux\hdd\install.cfg
21 - \ubcd\menus\isolinux\hdd\partmgmt.cfg
22 - \ubcd\menus\isolinux\hdd\recovery.cfg
23 - \ubcd\menus\isolinux\hdd\wiping.cfg


I need a DEFINITE file list of the .cfg files that will be in beta11 AND where to put the corresponding .lst files, in the form:

<number> - <where it will be in b11> - <where the corresponding .lst should be>


Have you any idea how to translate the dban menu?
After you run the dban menu, you see some text + you can press F1 -F4 for all boot commands.
Maybe it is possible to make a menu from it.

We could use grub4dos "hotkeys features" AND the cat command, since they are .txt files....

F1 /ubcd/boot/dban/warning.txt
F2 /ubcd/boot/dban/about.txt
F3 /ubcd/boot/dban/quick.txt
F4 /ubcd/boot/dban/trouble.txt
F5 /ubcd/boot/dban/raid.txt


I'll check. :cheers:

But here we have a rather serious "phylosophical" and "ethical" problem :cheers: .

I WON'T support anything that may facilitate, induce, suggest, support or advise, even indirectly, "nonsense" wipe patterns. :cheers:

As part of my (very little) campaign to debunk myths and urban legends, I won't do any action leading to increasing drive wear and losing time due to applying "voodo incantation to banish evil spirits" :cheers: to drives.
http://www.forensicf...m...opic&t=2065
http://www.forensicf...m...opic&t=3387
http://www.msfn.org/...o...25900&st=11

You can call me a DriveWealth Conscientious Objector, if you like :cheers::
http://en.wikipedia....ntious_objector

Best (and fastest) thing you can do is use Secure Erase or a single 0 pass (with DBAN or other program).

Now, of course UBCD Authors are perfectly free :cheers: to have DBAN and ALL the "stupid" IMNSHO wipes :cheers: , but I don't want to be mixed with it, I guess that someone else will need to write a .lst corresponding to the DBAN ISOLINUX.CFG. :cheers:


jaclaz

P.S.: Some notes, needing to look into:
\ubcd\boot\offline\isolinux.cfg
has all commands in small letters (instead of CAPITALS) - fixed B) added /I switch to IF statements
has directive "serial 0 19200" - anyone knows if needed/what it is for /how to translate to grub4dos? :cheers:
has a "problematic" line:

append rw vga=1 init=/linuxrc initrd=/ubcd/boot/offline/initrd.cgz,/ubcd/boot/offline/scsi.cgz

Already known, see here:
http://www.911cd.net...showtopic=19643
http://www.boot-land...?...=4486&st=11
Since in my experience this is the only app with more than one initrd's, wouldn't be the case to re-build entirely the two .cgz's into one in the release?
Or should we wait for tinybit or bean to add multiple initrd's to grub4dos? Or is it already done? :cheers:

#68 tinybit

tinybit

    Silver Member

  • Developer
  • 799 posts
  •  
    China

Posted 29 January 2009 - 05:53 PM

has a "problematic" line:

append rw vga=1 init=/linuxrc initrd=/ubcd/boot/offline/initrd.cgz,/ubcd/boot/offline/scsi.cgz
Already known, see here:
http://www.911cd.net...showtopic=19643
http://www.boot-land...?...=4486&st=11
Since in my experience this is the only app with more than one initrd's, wouldn't be the case to re-build entirely the two .cgz's into one in the release?
Or should we wait for tinybit or bean to add multiple initrd's to grub4dos? Or is it already done? :cheers:


I'll ask bean and see if he can take care of the cpio issue. Recently bean implemented the gfxmenu feature, and I found it is cpio-related.

Thank you, jaclaz.

#69 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 29 January 2009 - 06:39 PM

@jaclaz: i am currently trying your patch on several .cfg files (beyond those of ubcd50b10). works pretty well so far!
:cheers:

only there are some minor features lacking:
1. it would be even better if it would per default parse "nonstandard" kernel/append/intird entries as well. i mean entries where initrd does not come first in line. this depends on the use you intend with it, of course. an example is: [codebox]opendir THISDIR, "." or die "start failed.";@allfiles = grep !/^\.\.?$/, readdir THISDIR;closedir THISDIR;for (@allfiles) { $file = $_; $dot = index($file, "."); $fname = substr($file, 0, $dot); $ext = substr($file, $dot); if ($ext eq &#39;.cfg&#39;) { printf ("working on $fname|$ext\n"); open(INF,$file) or die; #$fname = s/\.[^.]*$// open OUT,&#39;>&#39;.$fname.&#39;_tr.cfg&#39;; for(<INF>) { chomp; $y=$_; $y =~ s/^[ \t]*//; $y =~ s/append/APPEND/; $y =~ s/^APPEND(.*) initrd=(.*) (.*)/APPEND initrd=$2 $1 $3/; $y =~ s/APPEND(.*) initrd=(.*)\R/APPEND initrd=$2 $1/; printf OUT ("$y\n"); } close INF; close OUT; }}[/codebox]which is, of course, PERL again, about which you will not be very amused i fear :cheers: (then i run your script, then the above mentioned [i]post[/i]processing perl script :cheers::cheers: [b]3.[/b] all LABEL lines should be rejected, not only "LABEL -". there are also files with e.g. "LABEL tomsrtbt". (fixed that for myself by replacing[code]rem IF &#34;%1&#34;==&#34;LABEL&#34; IF &#34;%2&#34;==&#34;-&#34; Set Thisline=#%Thisline% is NOT used in grub4dos&GOTO &#58;EOFIF &#34;%1&#34;==&#34;LABEL&#34; Set Thisline=#%Thisline% is NOT used in grub4dos&GOTO &#58;EOF[/code])besides that, there are cases where there is only "LABEL thusandso" and no "MENU LABEL thusandso thoroughly". in these cases it would be nice to read "LABEL thusandso" as if it was "MENU LABLE thusandso". (an example is gdata's cfg)[b]4.[/b] the script assumes file extension cfg in lower case (not CFG). (about which i also don't care, but others might.) (probably avoided by[code]IF NOT %ThisFileExt%.==.cfg. IF NOT %ThisFileExt%.==.CFG. ECHO ONLY files with extension .cfg are allowed&PAUSE&goto &#58;EOF[/code])
5. it seems that only help text of 1 line length is rejected. another case is:
TEXT HELP

...several lines...

ENDTEXT
this is not correctly parsed, it seems. (an example is ophcrack's cfg)

maybe you find it useful to include these additional features. i for one would be happy for it!
B)

Edited by caze, 31 January 2009 - 02:29 PM.


#70 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 31 January 2009 - 02:17 PM

@caze
thanks for the report.

At first sight:

if anyone writes LABLE instead of LABEL it should be an invalid source, or does syslinux/isolinux accept both "commands"?

if I "reject" all "LABEL", what will happen to entries like these:

LABEL boot
LOCALBOOT -1

LABEL main
KERNEL /boot/isolinux/menu.c32
APPEND /ubcd/menus/isolinux/main.cfg



A better approach then:
IF NOT %ThisFileExt%.==.cfg. IF NOT %ThisFileExt%.==.CFG. ECHO ONLY files with extension .cfg are allowed&PAUSE&goto &#58;EOF
could be:

IF /I NOT %ThisFileExt%.==.cfg. ECHO ONLY files with extension .cfg are allowed&PAUSE&goto :EOF

B)

Entries between TEXT/ENDTEXT in the .cfg's in UBCD are always indented by a space, I used this "feature" as quick and dirty solution :cheers: , sure a better "loop" is needed to parse anything between the said tags. :cheers:

jaclaz

#71 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 31 January 2009 - 02:27 PM

sorry, that was my typo with LABEL/LABLE. but all would be perfect if all LABEL lines would be ignored IF there is any MENU LABEL in the same section. sorry if that was not understandable in my confusing way of expressing it.

#72 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 01 February 2009 - 06:09 PM

I made a few small changes, not yet anything "good".

However:
[codebox]1 - C:\Downloaded\UBCD\10test\boot\isolinux\isolinux.cfg - 1 OK 2 - C:\Downloaded\UBCD\10test\boot\syslinux\syslinux.cfg - 2 OK 3 - C:\Downloaded\UBCD\10test\pmagic\isolinux.cfg - 3 4 - C:\Downloaded\UBCD\10test\ubcd\boot\dban\ISOLINUX.CFG - 4 5 - C:\Downloaded\UBCD\10test\ubcd\boot\offline\isolinux.cfg - 5 6 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\bios.cfg - 6 OK 7 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\cpu.cfg - 7 OK 8 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\defaults.cfg - 8 NO WORKIE 9 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd.cfg - 9 OK 10 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\main.cfg - 10 Almost OK, PMAGIC missing +isolinux.cfg 11 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\memory.cfg - 11 OK 12 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\others.cfg - 12 Almost OK, AVIRA to be fixed 13 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\periph.cfg - 13 OK 14 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\system.cfg - 14 OK 15 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\bootmgmt.cfg - 15 OK 16 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\cloning.cfg - 16 Almost OK partimage V0.6.7 missing +isolinux.cfg 17 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\devmgmt.cfg - 17 OK 18 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\diag.cfg - 18 OK 19 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\editing.cfg - 19 OK 20 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\install.cfg - 20 OK 21 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\partmgmt.cfg - 21 Almost OK GParted V0.3.9 missing +isolinux.cfg 22 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\recovery.cfg - 22 Almost OK, Offline NT Password AND Registry Editor 080526 needs to be changed "&" is reserved +isolinux.cfg 23 - C:\Downloaded\UBCD\10test\ubcd\menus\isolinux\hdd\wiping.cfg - 23 Almost OK, DBAN missing +isolinux.cfg[/codebox] Items #3 to #5 are simply "on hold". #3 is clearly not a plain .txt file, as it is coming from Linux, so a conversion is needed beforehand, besides the "generic" on hold. #4 has already been talked about (DBAN) #5 has already been talked about, it is Offline NT password It seems like once solved the various isolinux.cfg problems, the only changes yet to do are the Avira entry (reported), and the "Offline NT Password & Registry Editor 080526" title (new entry, pardon me the pun B)) besided the double initrd problem that the goog guys from grub4dos are having a look at. @caze Can you try the new version and confirm above log? :cheers: Please note that I changed a bit the way it works, it is supposed to be invoked by cfg2lst (without parameters) while being ROOT of a UBCD structure. A list of found .cfg (and .CFG :cheers: ) files will be displayed and you can choose one. The original file is copied to the ROOT and corresponding .lst and .txt files are generated into ROOT. Everytime the batch is invoked deletes ALL .cfg, .lst and .txt files in ROOT. Don't take it the wrong way :cheers:, but I don't want to be told missing features, or how using PERL, sed, gsar, C++, Delphi or whatever it could be bettered, not that it doesn't work with another xxxx.cfg, just want to make sure that it does the translation allright for the given list of .cfg files or that it does not for a particular item missing in the above log. This said, just as in grub4dos .lst's we can say that everything after "title" and up to next occurrence of "titlle" (or EOF) is a menu entry, is it correct to say that in isolinux/syslinux .cfg's an entry is anything after a "LABEL" and up to next "LABEL" (or EOF)? @Icecube Does the defaults.cfg make any sense at all? :cheers: I mean, are those settings useful at all, presuming that the "main" menu.lst already will have them?
Probably one can skip the defaults.cfg allright?

jaclaz

Attached Files



#73 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1,030 posts
  •  
    Belgium

Posted 03 February 2009 - 12:56 AM

@ jaclaz
#3: doesn't need to be translated (UBCD will take the grub4dos menu from Pmagic).

Does the defaults.cfg make any sense at all?

Yes (Ask the right questions :cheers: )
It is used by isolinux, to define the menu windows (position, color).
For grub4dos the values don't make sense.

Replace 'MENU INCLUDE /ubcd/menus/isolinux/defaults.cfg' in the *.cfg files with 'color cyan/black black/light-gray' in the *.lst files. So that the menu of isolinux and grub4dos look similar qua color scheme.

Replace 'MENU SEPARATOR' with the grub4dos equivalent:


#74 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 03 February 2009 - 07:55 AM

I have written a sed script (and a little bash script) that converts all entries (even the unmodified Avira entry, exept the 'local boot' option) correctly.

Good. :cheers:

Then, there is no reason to continue with batches.

jaclaz

#75 caze

caze

    Newbie

  • Members
  • 29 posts

Posted 03 February 2009 - 12:04 PM

@icecube: i have noted the changes i made to autoexec.bat in above posts #50, http://www.boot-land...?...ost&p=56416 and post 55 for the way of mapping i use. i hope it is clear enough?
btw, the write line should start a new, not:

map --hook\nwrite (fd0)/bin/setargs.bat @echo off\r\nset ubcdcmd=aida16\r\nexit 0\r\n

but rather (note the need to quote spaces)
map --hook

write &#40;fd0&#41;/bin/setargs.bat @echo\ off\nset\ avoid_getargs=1\nset\ ubcdcmd=aida16\nexit\ 0\n

i have not tried it with aida16 explicitly, though, but with other ubcdcmd parameters like ranish and spfdisk. i will try aida16 as soon as i can. could you please post your sed script?
thanks a lot!
@jaclaz: thank you very much for your update! i will try your script as soon as possible, too. but i am unfortunately currently very occupied with work, so that will take a few days. :cheers:

in isolinux/syslinux .cfg's an entry is anything after a "LABEL" and up to next "LABEL" (or EOF)

i suppose so, but do not see what follows, sorry.




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users