Happy new year to everybody! I'm trying to improve a bit 'grubinst.exe' and 'grubinst_gui.exe'. It's my first time I'm modifying other programmer(s)'s source code. I hope Bean, Tinybit and Chenall won't be upset What I did so far: grubinst_gui.exe: 1. The window is now a DS_MODALFRAME instead of a WS_POPUP, meaning it can't be resized anymore. Which it's a good thing, because resizing doesn't help the user, on the contrary. In the Options groupbox I added 2 checkboxes: 'Skip MBR test' and 'Silent boot'. The first one is adding '--skip-mbr-test' to the command line, the second is adding '--silent-boot'. If Device 'File' is used, it is adding quotes to the path to file in the command line. This way you can use even a file name with spaces in it. When the user is clicking on the first Refresh button, the Part List combobox is cleared. When the user is choosing a disk in the first combobox, the Part list combobox is not just cleared; the disk will be scanned for partitions and the list will be added to that combobox. Grubinst.exe: 1. Added 2 application flags: AFG_SILENT_BOOT (16384) and GFG_SILENT_BOOT (16). Added this to '--help' switch: '--silent-boot It will display messages only on severe change(s) and/or error(s).' If '--silent-boot' parameter is used, GFG_SILENT_BOOT is added to 0x80 in grub4dos MBR. Removed duplicate 'else if (! Strcmp(argv[idx],'--skip-mbr-test')) afg|=AFG_SKIP_MBR_TEST;'. Now I have to actually modify the grub4dos MBR in the code. In grubinst.c I can search for the messages in the grub_mbr variable and replace each of their chars with 0. This is easy to implement but it is not so professional and the result will not be 100% complete. Modify the asm code from grldrstart.S to not display those messages when the 4th bit in 0x80 byte is 1 (or to display the messages when the 4th bit in 0x80 byte is 0). You can use bootlace.com or grubinst.exe to install. Title Load GRUB4DOS kernel /grub.exe. Home / grubinst. Name Modified. Grub4DOS Toolbox for Windows. Grub4DOS Toolbox for Windows is a small utility that allows the user to install. But this is not that easy. From what I understand the compilation is done this way (it's simplified a bit): 1. Grldrstart.S + ntfsbs.S >> grldr.mbr 2. Bin2h.c + grldr.mbr >> grub_mbr.h 3. Grubinst.c + grub_mbr.h >> grubinst.exe Adding extra code to grldrstart.S means that grub_mbr variable will increase size and all bytes after the extra code will be shifted. Meaning probably I have to 'resynchronize' it in grubinst.c Also, since I'm not an assembler pro, I don't know how to modify this to work for the 4th bit: testb $0x80,%cs:0x02 /* test bit 7 of the third byte */ jz 2f /* zero means boot prev-MBR first */ 69.11KB 874 downloads Any input is appreciated. Thank you in advance. Regards, David Later edit: attachments removed, you can find a better version at the the end of the thread. Grubinst_GUI does not display any drives unless run as Admin - maybe adding a manifest file would help? Tooltips or a help screen would be nice to explain the options - or maybe just run grubinst with --help option so user can see switches? Version number is still 1.3 (to avoid confusion can this be changed?) grub_mbr final code size is. Grubinst_GUI does not display any drives unless run as Admin - maybe adding a manifest file would help? Only partially, if you add one it will always start it as an admin no matter if you set in Properties or not. But the main problem will still be there. Unfortunately, to properly get the information about drives and/or to write the MBR you need direct access. Tooltips or a help screen would be nice to explain the options - or maybe just run grubinst with --help option so user can see switches? If F1 is pressed then 'grubinst --help' is launched, or, better, its output can be redirected and shown in a normal window. Version number is still 1.3 (to avoid confusion can this be changed?) Now it's 1.4. I have previously asked chenall et al. For silent switches for booting and for grldr and they were very resistant to it as they 'need' to see any messages etc. In case of errors, etc. I would prefer it if there was a 'debug key' which the user could press on bootup (e.g. L-CTRL) which would display all messages but otherwise it was silent. Another solution: the 'normal' messages could be 'stacked' in a buffer. When a severe error occurs, the buffer will be displayed + the current error. When trying to install using grubinst_gui.exe (your version or older version) - I get Error - Can't run the background program I am using Win 8.1 64-bit system and running as Admin. Similar to This error appears because grubinst_gui uses the old function instead of a newer one like. Only CreateProcess(W) is able to start another process with the same security context as the calling proceess. Btw, in VMUB I use CreateProcessW. I will try to implement it also in grubinst_gui.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |