tag:blogger.com,1999:blog-6807252622611429784.post5444817766355746131..comments2024-03-27T11:06:22.057+00:00Comments on RMPrepUSB, Easy2Boot and USB booting: Using the SHIFT key to modify the behaviour of a grub4dos menu entrySteve Sihttp://www.blogger.com/profile/11883669340879311678noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-6807252622611429784.post-23789898293328917332013-02-19T00:21:34.194+00:002013-02-19T00:21:34.194+00:00Yep, that fixed it. Thanks for looking into it, no...Yep, that fixed it. Thanks for looking into it, now it works perfectly.Anonymoushttps://www.blogger.com/profile/16747079138484734352noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-32523344630103152882013-02-19T00:13:53.850+00:002013-02-19T00:13:53.850+00:00OK - I see the problem - it works under QEMU OK bu...OK - I see the problem - it works under QEMU OK but not on real hardware! The issue is with the <b>&&</b> in the first line! I have seen this behaviour before. To fix the issue, simply split the line into two like this:<br /><br />/bios int=0x16 eax=0x00000200 > (md)0x300+1<br />cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nulSteve Sihttps://www.blogger.com/profile/11883669340879311678noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-88677981521470305312013-02-19T00:00:36.747+00:002013-02-19T00:00:36.747+00:00My test case is very simple. Three menus, one main...My test case is very simple. Three menus, one main menu with the shift-switch entry, and two menus each with an entry that loads back the main menu. I'm testing with the latest grub4dos (2013-02-02).<br /><br />Grub loads main.lst:<br />title Test Menu Entry<br />/bios int=0x16 eax=0x00000200 > (md)0x300+1 && cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nul <br />set /a Anonymoushttps://www.blogger.com/profile/16747079138484734352noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-27965109678710269802013-02-18T23:20:25.445+00:002013-02-18T23:20:25.445+00:00Sorry, I still don't understand.???
In my code...Sorry, I still don't understand.???<br />In my code example, n is always set to the value returned by the BIOS before the value of n is tested. Can you email me your test menus so I can try to figure out what is happening?Steve Sihttps://www.blogger.com/profile/11883669340879311678noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-36860828629021528982013-02-18T23:16:27.857+00:002013-02-18T23:16:27.857+00:00Yes I know, what I meant was this:
In my test cas...Yes I know, what I meant was this:<br /><br />In my test case, for simplicity, I tried loading different menus from the main menu, loading either "menu1" if shift wasn't pressed when pressing enter or "menu2" if shift was pressed. It correctly loaded "menu1" when not pressing shift and loaded "menu2" when shift was pressed, but after pressing shift onceAnonymoushttps://www.blogger.com/profile/16747079138484734352noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-87092925519341630942013-02-18T23:14:00.414+00:002013-02-18T23:14:00.414+00:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/16747079138484734352noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-3547177217608522472013-02-18T15:09:07.962+00:002013-02-18T15:09:07.962+00:00this only detects the current status - it does not...this only detects the current status - it does not set itSteve Sihttps://www.blogger.com/profile/11883669340879311678noreply@blogger.comtag:blogger.com,1999:blog-6807252622611429784.post-32041497004231352102013-02-18T14:32:07.808+00:002013-02-18T14:32:07.808+00:00Thanks, this works almost perfectly. The only chan...Thanks, this works almost perfectly. The only change I would recommend is to add a "set n=0" at the beginning of every entry, before the "/bios..." line, to reset shift status, otherwise it would consider shift always being pressed, even if it wasn't, after the first time it is pressed.Anonymoushttps://www.blogger.com/profile/16747079138484734352noreply@blogger.com