It is currently Mon Oct 20, 2014 9:23 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: (FDUBCD) reason not to use 'write' command in grub4dos?
PostPosted: Sat May 04, 2013 10:22 pm 
Offline

Joined: Fri Jun 17, 2011 11:23 pm
Posts: 164
In UBCD 5.2 and above, the UBCD Freedos image has been switched from an iso image to a superfloppy image.
The GRUB4DOS boot entries for FDUBCD are also changed for this.
However, when I compare the boot entries between UBCD versions, I see that the old UBCD has a 'write' command in each entry, which makes the ubcdcmd thing work in GRUB4DOS as in ISOLINUX.

Code:
write --offset=15 (fd0)/bin/setargs.bat ubcdcmd=program_name\r\n


In my customized UBCD, I have added this command back. But I wonder why is this feature lost in the new UBCD? Is there any reason to not include the write command in the FDUBCD entries?

(Note: I have read this discussion thread but it didn't answer my question.)

For reference, below are the GRUB4DOS entries for FDUBCD between UBCD versions. The 'atapicd' is just one example program.
UBCD 5.2.0 - 5.2.3
Code:
map --mem /ubcd/images/fdubcd.img.gz (fd0)
map --hook
rootnoverify (fd0)
chainloader +1


UBCD 5.1.1
Code:
map --mem /ubcd/images/fdubcd.iso.gz (hd32)
map --hook
root (hd32)
chainloader (hd32)


UBCD 5.0.3
Code:
map --mem /ubcd/images/fdubcd.img.gz (fd0)
map --hook
write --offset=15 (fd0)/bin/setargs.bat ubcdcmd=atapicd\r\n
chainloader (fd0)+1
rootnoverify (fd0)


Top
 Profile  
 
 Post subject: Re: (FDUBCD) reason not to use 'write' command in grub4dos?
PostPosted: Sun May 05, 2013 2:32 am 
Offline

Joined: Sat May 08, 2010 5:26 am
Posts: 768
Explorer09 wrote:
I wonder why is this feature lost in the new UBCD?


In UBCD 5.2.3, the file
./ubcd/tools/linux/syslinux2grub4dos/syslinux2grub4dos.sed
, line #125:
Code:
   s|^COM32.*memdisk\nINITRD /ubcd/images/fdubcd.img.gz\nAPPEND raw ubcdcmd=\(.*\)|map --mem /ubcd/images/fdubcd.img.gz (fd0)\nmap --hook\nrootnoverify (fd0)\nwrite --offset=15 /bin/setargs.bat ubcdcmd=\1\\r\\n\nchainloader +1|


needs a correction. It is currently searching for "
APPEND raw ubcdcmd=*
" (so to replace it), but it should be searching for "
APPEND floppy raw c=32 h=16 s=63 ubcdcmd=*
". It would be probably better to search for "
APPEND * raw * ubcdcmd=*
" in this substitution line (I mean, in addition to the initial "
^COM32.*memdisk\nINITRD /ubcd/images/fdubcd.img.gz\n
").

Regarding the additional grub4dos code, in case anyone wonders, the explanation is in this post: http://www.ultimatebootcd.com/forums/viewtopic.php?p=6522#p6522

The "--offset=15" means 15 "characters" (including LF and CR) from the beginning of the setargs.bat file (already in memory); then write the specified text.


Top
 Profile  
 
 Post subject: Re: (FDUBCD) reason not to use 'write' command in grub4dos?
PostPosted: Sun May 05, 2013 5:26 pm 
Offline

Joined: Fri Jun 17, 2011 11:23 pm
Posts: 164
Thanks for the answer.

So it's a regression isn't it?


Top
 Profile  
 
 Post subject: Re: (FDUBCD) reason not to use 'write' command in grub4dos?
PostPosted: Sun May 05, 2013 10:18 pm 
Offline

Joined: Sat May 08, 2010 5:26 am
Posts: 768
I don't know how to call it.

During the 5.2.x development, fdubcd was formatted first as HDD image, and then as floppy image. At the same time, the syslinux2grub4dos scripts were modified. Before the final 5.2.0 release, the Syslinux entries for fdubcd were changed again, adding "floppy" and the CxHxS arguments to memdisk.

My guess is that, at that point, the script should also had to be modified again in order to keep the "ubcdcmd=" functionality when booting from grub4dos.

Whichever format fdubcd will have, it should always have "raw" and "ubcdcmd=" (when booted by memdisk) in the APPEND line. My suggestion (in my previous post) should help in reducing the chances that this could happen again with fdubcd.

In a certain sense, the "same" is happening with other Syslinux menus that changed, like for example the entries for Memtest86 v4.2.x (not to be confused with Memtest86plus).


Top
 Profile  
 
 Post subject: Re: (FDUBCD) reason not to use 'write' command in grub4dos?
PostPosted: Tue May 07, 2013 5:01 am 
Offline

Joined: Mon Feb 21, 2005 10:59 pm
Posts: 1294
Damn! Huge regression.

I have fixed syslinux2grub4dos.sed as per ady's suggestion and the ubcdcmd parameter is now correctly appearing in the grub4dos scripts and tested to work as before.

Thanks for reporting this!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group