Already done(2009-01-24), but use it with care, please.
An option is missing
write [--offset=SKIP] [--carelevel=HIGH | MEDIUM | IDONTCAREATALL] ADDR_OR_FILE INTEGER_OR_STRING
Thanks for this added feature.
jaclaz
Posted 24 January 2009 - 06:39 PM
Already done(2009-01-24), but use it with care, please.
write [--offset=SKIP] [--carelevel=HIGH | MEDIUM | IDONTCAREATALL] ADDR_OR_FILE INTEGER_OR_STRING
Posted 24 January 2009 - 07:20 PM
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:
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 (;{ 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.
Posted 26 January 2009 - 09:38 AM
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.
Posted 26 January 2009 - 06:45 PM
@yaclaz: next step for me will be to check your cfg2lst script...
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.
Posted 26 January 2009 - 06:50 PM
#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, 'ubcdcmd=')+8;
if ($posubcdcmd>7) {
$ubcdcmd=substr($y,$posubcdcmd,length($y)-$posubcdcmd);
} elsif (index($y, 'initrd')>-1) {
$_ = $y;
s/.*\///;
$fname=$_;
} elsif ((substr($y,0,5) eq 'title') || ((substr($y,0,5) eq 'TITLE'))) {
$count++;
if (($count>1) && ($title ne '') && (($ubcdcmd eq '') || ($fname eq ''))) {
if (($fname ne '') && ((index($buff,'kernel')>-1) || (index($buff,'KERNEL')>-1))){
if ((index($buff,'memdisk')>-1) || (index($buff,'MEMDISK')>-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=''; $buff=''; $fname=''; $ubcdcmd='';
} else {
#all seems ok, it just was a linux entry not an ubcd-memdisk-one!
printf("$buff\n");
$title=''; $buff=''; $fname=''; $ubcdcmd='';
}
} elsif ((index($buff,'configfile')>-1) || (index($buff,'CONFIGFILE')>-1)) {
#all seems ok, it just was a configfile!
printf("$buff\n");
$title=''; $buff=''; $fname=''; $ubcdcmd='';
} 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='';
#} elsif (length($y)>1) {
#printf "#SORRY, COULD NOT PARSE:$y\n";
}
if (($ubcdcmd ne '') && ($fname ne '') && ($title ne '')) {
printf "TITLE $title\n";
printf "map /images/ubcd50b10.iso (0xFF)
map --hook
map --mem /images/$fname (fd0)
map --hook
write (fd0)/bin/setargs.bat". '@echo\x20off\nset\x20ubcdcmd='.$ubcdcmd.'\nexit\x200\nrem\x20...('."chainloader (fd0)+1rootnoverify (fd0) boot\n\n"; $title=''; $buff=''; $fname=''; $ubcdcmd=''; $y=''; }}close INF;
Posted 26 January 2009 - 07:35 PM
thank you for your incredibly quick immediate timely fix!!The bug is just fixed about the backslash quoted space. Thank you very much for your quick immediate timely report.
Posted 26 January 2009 - 07:40 PM
http://www.moviequot...cgi?qnum=122132no, it isn't. why?
![]()
EDIT: oh. it seems i spelled your name wrong. sorry about that!!
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:)=]%
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?\menus\hdd\isolinux\
\menus\hdd\grub4dos\
Posted 26 January 2009 - 08:18 PM
Posted 26 January 2009 - 08:38 PM
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/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?
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/
.
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.
Posted 27 January 2009 - 01:38 PM
great. thanks!@caze
Will look into these:
Posted 28 January 2009 - 05:10 PM
with:APPEND vga=769 initrd=/ubcd/boot/antivir/initrd.gz ramdisk_size=83068 root=/dev/ram0 rw console=/dev/vc/4
makes the batch work.APPEND initrd=/ubcd/boot/antivir/initrd.gz ramdisk_size=83068 root=/dev/ram0 rw console=/dev/vc/4 vga=769
is "skipped".CONFIG /pmagic/isolinux.cfg
IF "%1"=="CONFIG" Set Thisline=#%Thisline% is temporarily commented - must find a way to "translate"&GOTO :EOFWith:
IF "%1"=="CONFIG" IF "%2"=="/pmagic/isolinux.cfg" Set Thisline=configfile /pmagic/menu.lst&GOTO :EOF
Posted 28 January 2009 - 05:59 PM
Posted 29 January 2009 - 02:36 PM
I don't want to be rude, I am usually not/pmagic/boot/isolinux.cfg will become /pmagic/boot/isolinux/isolinux.cfg in ubcd50b11 (and /pmagic/boot/grub/menu.lst).
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
<number> - <where it will be in b11> - <where the corresponding .lst should be>
We could use grub4dos "hotkeys features" AND the cat command, since they are .txt files....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.
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
Already known, see here:append rw vga=1 init=/linuxrc initrd=/ubcd/boot/offline/initrd.cgz,/ubcd/boot/offline/scsi.cgz
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.cgzAlready 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?
Posted 29 January 2009 - 06:39 PM
TEXT HELP ...several lines... ENDTEXTthis is not correctly parsed, it seems. (an example is ophcrack's cfg)
Edited by caze, 31 January 2009 - 02:29 PM.
Posted 31 January 2009 - 02:17 PM
LABEL boot
LOCALBOOT -1
LABEL main
KERNEL /boot/isolinux/menu.c32
APPEND /ubcd/menus/isolinux/main.cfg
IF NOT %ThisFileExt%.==.cfg. IF NOT %ThisFileExt%.==.CFG. ECHO ONLY files with extension .cfg are allowed&PAUSE&goto :EOFcould be:
IF /I NOT %ThisFileExt%.==.cfg. ECHO ONLY files with extension .cfg are allowed&PAUSE&goto :EOF
Posted 31 January 2009 - 02:27 PM
Posted 01 February 2009 - 06:09 PM
Posted 03 February 2009 - 12:56 AM
Yes (Ask the right questionsDoes the defaults.cfg make any sense at all?
MENU INCLUDE /ubcd/menus/isolinux/defaults.cfg DEFAULT /boot/isolinux/menu.c32 PROMPT 0 F1 /ubcd/menus/isolinux/pmagic1.hlp F2 /ubcd/menus/isolinux/pmagic2.hlp LABEL - MENU LABEL System KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/system.cfg LABEL - MENU LABEL CPU KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/cpu.cfg LABEL - MENU LABEL Memory KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/memory.cfg LABEL - MENU LABEL HDD KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/hdd.cfg LABEL - MENU LABEL BIOS KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/bios.cfg LABEL - MENU LABEL Peripherals KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/periph.cfg LABEL - MENU LABEL Others KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/menus/isolinux/others.cfg LABEL - MENU LABEL Parted Magic V3.5 - Press F1 for more information TEXT HELP Linux distro for manipulating partitions (eg. create, resize). Includes TestDisk, PhotoRec, Partition Image, Firefox, F-Prot Virus Scanner (fpscan/ fpupdate) etc. Capable of reading/writing NTFS partitions and external USB storage devices. Requires 512MB RAM. ENDTEXT CONFIG /pmagic/boot/isolinux/isolinux.cfg LABEL - MENU LABEL UBCD FreeDOS R1.32 (Based on NwDsk V3.40) TEXT HELP FreeDOS boot disk used to run many of the other DOS apps on the UBCD. Revised version of Eric Veermans' FreeDOS NwDsk 3.42. Addresses many bug fixes, performance enhancements and compatibility issues. ENDTEXT KERNEL /boot/isolinux/memdisk APPEND initrd=/ubcd/images/fdubcd.igz LABEL - MENU LABEL User-defined KERNEL /boot/isolinux/menu.c32 APPEND /ubcd/custom/custom.cfg MENU SEPARATOR LABEL - MENU LABEL Boot next device TEXT HELP Boot next device in the boot sequence. Supporting BIOS required. May not work with all systems. ENDTEXT LOCALBOOT -1 LABEL - MENU LABEL Reboot TEXT HELP Reboot the PC ENDTEXT KERNEL /boot/isolinux/reboot.c32 APPEND - MENU SEPARATOR LABEL - MENU LABEL GRUB4DOS menu TEXT HELP Use this, if you get invalid Opcodes when booting certain entries. ENDTEXT KERNEL /boot/grub/grub.exe APPEND --config-file="find --set-root /ubcd/menus/grub4dos/main.lst;configfile /ubcd/menus/grub4dos/main.lst"[/codebox] Contents of [b]/ubcd/menus/grub4dos/main.lst[/b]: [codebox] color cyan/black black/light-gray title System configfile /ubcd/menus/grub4dos/system.lst title CPU configfile /ubcd/menus/grub4dos/cpu.lst title Memory configfile /ubcd/menus/grub4dos/memory.lst title HDD configfile /ubcd/menus/grub4dos/hdd.lst title BIOS configfile /ubcd/menus/grub4dos/bios.lst title Peripherals configfile /ubcd/menus/grub4dos/periph.lst title Others configfile /ubcd/menus/grub4dos/others.lst title Parted Magic V3.5 - Press F1 for more informationconfigfile /pmagic/boot/grub/menu.lsttitle UBCD FreeDOS R1.32 (Based on NwDsk V3.40)map --mem /ubcd/images/fdubcd.igz (fd0)map --hookchainloader (fd0)+1rootnoverify (fd0)title User-definedconfigfile /ubcd/custom/custom.lsttitlepause --wait=0 MENU SEPARATORtitle Rebootreboottitlepause --wait=0 MENU SEPARATORtitle ISOLINUX menu (Use this when booting from CD or with ISO emulation)chainloader --force /boot/isolinux/isolinux.bintitle SYSLINUX menu (Use this when booting from USB)chainloader --force /boot/syslinux/ldlinux.sys
Posted 03 February 2009 - 07:55 AM
Good.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.
Posted 03 February 2009 - 12:04 PM
but rather (note the need to quote spaces)map --hook\nwrite (fd0)/bin/setargs.bat @echo off\r\nset ubcdcmd=aida16\r\nexit 0\r\n
map --hook write (fd0)/bin/setargs.bat @echo\ off\nset\ avoid_getargs=1\nset\ ubcdcmd=aida16\nexit\ 0\n
i suppose so, but do not see what follows, sorry.in isolinux/syslinux .cfg's an entry is anything after a "LABEL" and up to next "LABEL" (or EOF)
0 members, 2 guests, 0 anonymous users