Jump to content











Photo
- - - - -

grub24dos


  • Please log in to reply
28 replies to this topic

#1 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 10 December 2010 - 02:49 AM

Hi, drummerdp here. I recently set up a project on sourceforge called grub24dos. Its works similar to grub4dos, but it lets you boot grub2 instead of legacy grub code. The advantage is that grub2 supports larger drives and GPT partitions. This gets around the old 4 partition MBR limit. I currently have 7 Linux partitions on one GPT disk as well as Mac and Windows partitions.

Grub24dos uses a native Ubuntu grub2 image shimmed so that is can be booted via the Windows 7 or Vista BCD. You can also use XP boot.ini to boot it.

As with grub4dos, the native Windows MBR is not touched. All grub24dos files reside on the Windows C: drive. This makes multi-booting much less risky.

Give it a try and let me know how you make out. The code can be found here:

https://sourceforge....jects/grub24dos

Thanks.

#2 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 10 December 2010 - 06:33 AM

Hi drummerdp,

For those not familiar:

"Shim is a small library which transparently intercepts an API, changes the parameters passed, handles the operation itself, or redirects the operation elsewhere." - Wikipedia. So it adapts Linux code for use in Windows.

As you explained in your Readme, Grub24dos is not installed to MBR. So, the easiest way to add it is to use EasyBCD GUI to Windows bootloader. It would (hopefully) allow to add Grub24dos as a menu item to standard Windows BCD Boot Menu. Just keep in mind, EasyBCD developer modded grldr for his project (he calls it NeoGrub), so its wise to test, if EasyBCD will work with this shim the same way it works with Grub4dos. Did you try? Any adjustment required?

If someone can't add it via EasyBCD, just add it to the boot.ini file on your system volume, as Readme says.

What about Menu.lst? Any changes to comprising menu sections? New commands? Other advantages, apart from larger drives / more partitions? Does it work OK with Logical partitions?

#3 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 10 December 2010 - 02:24 PM

I tested it, and it didn't work, since my system volume is second on the drive. So I had to recompile it in Linux.

Is it possible to make it a bit easier to point to a system partition? Many ppl don't even have any Linux flavor installed.

How do you see the roadmap for this project that may become quite popular? What would be the major hassles in following that roadmap? The more ppl understand your vision, the more will come on-board to help with development. :cheers:

Also, you said in your docs, Grub4DOS development has stopped long ago. It looks like its still ongoing from what I've read on this Board.

#4 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 10 December 2010 - 07:24 PM

Hi sambul,

Thanks for the suggestions. I've done a few things to address your thoughts.

I updated the instructions on grub24dos and added 7 more pregenrated g2ldr modules to cover different boot disk addresses. This should help folks that don't have access to Linux for recompile.

Yes, I did some testing of logical partitions and grub2 was able to see and boot from them. If you aren't sure, when the grub menu comes up, press "c" to get a command prompt, then enter "ls". grub2 will show a list of partitions including logical partitions.

As to EasyBCD. I have been able to use it to rename and delete boot entries, but not to add a real MBR entry to point to C:\grub\code\g2ldr.mbr in Windows 7. Maybe I'm missing something in the EasyBCD interface. Do you know how?

With the Gnu release of grub2, menu.lst goes away and is replaced by grub.cfg

The old grub4dos is based on legacy grub, which is no longer being maintained or enhanced by Gnu. The last grub4dos update on sourceforge was in March 2009.

As far as the plan for grub24dos. It is really just a way to boot the Gnu grub2 code from the Windows environment. As Gnu enhances grub2, I will regenerate the g2ldr modules to keep them up to date. Once the grub24dos instructions and modules stabilize, I doubt there will be much maintenance required.

As people try grub24dos, I hope they will let me know about their experience. I will monitor this forum and try to answer any questions. If additional grub2 modules are needed, please ask and I will include them in future releases of grub24dos.

Thanks, - drummerdp

Edited by drummerdp, 10 December 2010 - 07:47 PM.


#5 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 10 December 2010 - 07:41 PM

Thanks drummerdp,

When I asked about booting from a Logical volume, I simply recalled problems with booting "some" service images from such a volume with Grub4DOS.

Just checked again current EasyBCD features, and could not find a way to add Grub24dos via EasyBCD generated Windows Boot Menu. I doubt, its author will add Grub24dos to options list for some time, until it becomes more popular. He had some serious challenges in adapting Grub4dos to his program. Hence, the only way to add Grub24dos for now seems to be manually editing Win boot.ini.

It would help, if you post here a sample of grub.cfg content, so that ppl can compare it to more familiar menu.lst. And also if you can explain in some detail here, what g2ldr module is, and what it does.

#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 December 2010 - 02:21 AM

The last grub4dos update on sourceforge was in March 2009.

Sure.

But the development has NOT stopped.

Please read the thread aptly titled grub4dos WHERETO (sticky in this Forum):
http://www.boot-land...hp?showtopic=14

You will find that "current" is
grub4dos-0.4.4-2009-10-16
and that "latest" is
grub4dos-0.4.5b-2010-12-10

:lol:
Wonko

#7 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 11 December 2010 - 03:29 AM

Good work!

Just FYI, another project called BURG is also based on GRUB2 and also has some features of grub4dos. Burg is developed/maintained by Bean, who is also a developer/maintainer of grub4dos.

http://code.google.com/p/burg/
http://www.burgloade...m/bbs/index.php

#8 sambul61

sambul61

    Gold Member

  • Advanced user
  • 1568 posts
  •  
    American Samoa

Posted 11 December 2010 - 04:44 AM

tinybit

Would be nice to see your comparison of Grub4dos versus Grub2 derivatives in terms of usage advantages and drawbacks at this point.

As well, why you seems to continue develop or show interest in Grub4Dos, when newer Grub version is available for awhile? There should be some logic to it, but its hidden from most users now.

#9 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 11 December 2010 - 10:19 AM

@sambul61

The more softwares, the better for us to use.

I heard DOS is still used, although Microsoft stopped developing it many years ago.

I am sorry I cannot comment on a software that I am not using for everyday life. Instead of me, the other users will comment it.

#10 bitbox

bitbox
  • Members
  • 4 posts

Posted 16 December 2010 - 10:09 PM

The advantage is that grub2 supports larger drives and GPT partitions.

Any idea what the maximum size drive grub4dos supports?

I think grub4dos is having problems with drivers bigger than 1TB so I would like to test grub24dos. Do you plan on supplying the full source like burg posted here by tinybit? Surely it would make compiling it easier?

#11 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 16 December 2010 - 10:49 PM

Any idea what the maximum size drive grub4dos supports?

I think grub4dos is having problems with drivers bigger than 1TB so I would like to test grub24dos. Do you plan on supplying the full source like burg posted here by tinybit? Surely it would make compiling it easier?



#12 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 16 December 2010 - 11:22 PM

Hi,

Grub24dos is simply a way to boot Gnu grub2 from the Windows environment.
The modules are copied from Ubuntu Linux. The code is maintained by Gnu and the source is available here http://www.gnu.org/software/grub

Please note: any Gnu grub version of 1.90 or greater is grub2.
The last Gnu release of legacy grub, version 0.97, was in May 2005.

I have not personally tried grub24dos on a drive larger then 1TB, but the Gnu code should theoretically support drives to exabyte size.

Grub24dos is quite simple to set up. Please give it a try and let me know how you make out with large disks.

Thanks - drummerdp

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 17 December 2010 - 11:27 AM

Grub24dos is quite simple to set up. Please give it a try and let me know how you make out with large disks.

No large disks available to test on, sorry.

If I may ;), a few notes:
  • Why excluding NT and Windows 2000 from the available OS's? (they work EXACTLY as XP)
  • Since you already add an entry to the BCD, why not adding an automatic step to add an entry to boot.ini, something like this:

    attrib -s -h -r c:\boot.ini
    
    echo C:\grub\g2ldr.mbr="Grub2 For Dos" >>C:\boot.ini
  • from what I can see the various grldr version ONLY differ for the string:

    (hd0,1)\grub

    which is changed to:

    (hd0,2)\grub

    etc., and more generally to:

    (hdm,n)\grub

    so, you can have up to (hd9,9) with a simple hex patch, I presume that it would be much easier for mantaining the app, to avoid the need to re-generate the "alternate loaders" and provide a simple batch that "corrects" or "changes" the m and n
    gsar or dsfo/dsfi, or any similar tool can be used under windows to do the change.
    To even simplify (i.e. needing not any "third party programs" you could provide the g2ldr in TWO parts (with current release first part with everything up to 0x061C and second part everything from 0x0628 to the end) together with a set of "simple" files, containing the various "(hdm,n)\grub" (without CR+LF), than you can use:
    copy /b firstpart + variable + secondpart g2ldr

Just ideas ..... :)

:worship:
Wonko

#14 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 18 December 2010 - 02:47 PM

Hey Wonko,

Some great ideas. Thanks!

I added support for Windows 2000 as you suggested. I don't have a test bed for Windows NT. The NT code is a decade old. If I receive more requests, I'll consider adding NT.

The boot.ini update automation you suggested was added, also an AutoIt program, bootupdt.exe which scans the BCD and boot.ini to prevent duplicate entries from being added by the grub2.windows.install.bat script. The source code for bootupdt is included.

For the time being, I'll continue to use the virgin g2ldr modules generated in Ubuntu Linux. Patching the loader would be difficult to test properly.

Thanks again - drummerdp

#15 detop

detop
  • Members
  • 2 posts
  •  
    South Korea

Posted 16 July 2011 - 03:06 PM

Can you make program to install grub24dos at usb like grubinst?
Many people want to install grub2 at their usb, but we can't install grub2 in Windows.
Thanks.

Edited by detop, 16 July 2011 - 03:07 PM.


#16 detop

detop
  • Members
  • 2 posts
  •  
    South Korea

Posted 17 July 2011 - 12:37 AM

Can you make program to install grub24dos at usb like grubinst?
Many people want to install grub2 at their usb, but we can't install grub2 in Windows.
Thanks.

P.S:Many people use EasyBCD, but at EasyBCD, there are an only menu of boot grub2 in Ubuntu Partition. Moreover, if I make grub2 menu, EasyBCD make automatically 'autombrgrub0', that made by NeoSmart, not a g2ldr.
And many people says that, that file make many errors.
So, if we can install grub24dos at usb, that will more popular. So NeoSmart make menu of booting g2ldr.
Thanks. :thumbsup:

Edited by detop, 17 July 2011 - 12:39 AM.


#17 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 27 August 2011 - 03:05 PM

New release 17-04-2011:
http://sourceforge.n...rub24dos/files/


It seems that the good guy (drummerdp) besides not telling us anything about this release :w00t: also started a NEW thingy called burg4dos here:
http://sourceforge.n...jects/burg4dos/

(as if the confusion between grub, grub 2 and grub4dos was not ALREADY more than enough) :ph34r:.

:cheers:
Wonko

#18 enaut

enaut
  • Members
  • 8 posts
  •  
    Germany

Posted 04 September 2011 - 10:32 AM

One big feature of grub4dos is that its bootable using kexec any status on that with grub24dos?

#19 hike39

hike39
  • Members
  • 4 posts
  •  
    Germany

Posted 25 September 2011 - 11:22 AM

Due to the fact that my posting in the help forum for grub24dos on SourceForge.net got no answer within a week and it seems that there is no traffic at all I'm trying to get some help in this forum.

I've installed the newest version of grub24dos on my PC to boot either WinXP or Win7. But unfortuntely I have the problem that I cann't navigate in the grub24dos boot menu. The boot.ini menu I can handle. The reason is that I have connected to the PC a wireless USB keyboard and mouse. When I changed the configuration to PS2 equipment everything is okey.

Has someone a hint what can be done?

Greetings
hike39

#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 September 2011 - 12:18 PM

Has someone a hint what can be done?

YES. :smiling9:
http://homepages.tes...no-answers.html

Check the .pdf documentation, check if in the compiled grub2.boot the USB keyboard support is enabled :dubbio:. (should be uhci.mod and usb_keyboard.mod :unsure:)

Check also your BIOS settings:
http://www.linuxques...eyboard-790220/

:cheers:
Wonko

#21 hike39

hike39
  • Members
  • 4 posts
  •  
    Germany

Posted 25 September 2011 - 02:40 PM

Hi Wonko,
1.) I've checked the .pdf documentation and could not find the solution there.

2.) There's no grub2.boot on my system. Only c:\g2ldr and c:\grub\winloader\grub.boot. How can I check a compiled file? Is there a command to check the content of it?

3.) BIOS settings are okey because I can choose a menu item during the init.boot phase.

hike39

#22 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 September 2011 - 05:44 PM

Hi Wonko,
1.) I've checked the .pdf documentation and could not find the solution there.

2.) There's no grub2.boot on my system. Only c:\g2ldr and c:\grub\winloader\grub.boot. How can I check a compiled file? Is there a command to check the content of it?

3.) BIOS settings are okey because I can choose a menu item during the init.boot phase.

hike39

Which EXACT version of grub24dos are you using? :unsure:
Current is

New release 17-04-2011:
http://sourceforge.n...rub24dos/files/

And has NOT anymore g2ldr AFAICR.

:cheers:
Wonko

#23 hike39

hike39
  • Members
  • 4 posts
  •  
    Germany

Posted 25 September 2011 - 09:39 PM

It's the version 1.98 and in the readme.pdf the last date of the change log is April 11th 2011.

#24 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 26 September 2011 - 08:58 AM

It's the version 1.98 and in the readme.pdf the last date of the change log is April 11th 2011.

Good. :)
Open readme.pdf in the downloaded archive (in \grub24dos.zip\grub\install\)
Go to page 6/14, titled "Customization of grub2.boot"

I have included some of the commonly used grub modules in the script. Examples
are ntfs, part_gpt and others. The included modules can be adjusted via alteration
of the $allmods variable in the script.


\grub24dos.zip\grub\winsource\

Contents of the bash script grub.makeldr.sh

allmods=" "
allmods=$allmods" biosdisk"
allmods=$allmods" fat"
allmods=$allmods" ntfs"
allmods=$allmods" part_gpt"
allmods=$allmods" part_msdos"
allmods=$allmods" search"
grub-mkimage --config=./grub.winboot.sh --output=/tmp/g2kernel.img --format=i386-pc --verbose $allmods
cat /boot/grub/lnxboot.img /tmp/g2kernel.img > /tmp/grub.boot
rm /tmp/g2kernel.img
echo
echo
ls -lad /tmp/grub.boot
echo
echo


Contents of the bash script grub.winboot.sh

search -f /grub/winloader/grub.boot --set=winaddress
set winboot=($winaddress)
set prefix=$winboot/grub
insmod ext2
insmod hfs
insmod hfsplus
insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_sun
insmod part_sunpc
insmod uhci
insmod usbms


\grub24dos.zip\grub\code\
Contents of the bash script grub2.linux.makeldr.sh

grub-mkimage --prefix='(hd0,1)/grub' --output=/tmp/g2boot.img --format=i386-pc --verbose normal ls biosdisk part_msdos ext2 ntfs part_gpt chain linux linux16 help vbe vga gfxmenu gfxterm search search_label search_fs_uuid gettext search_fs_file
cat /boot/grub/lnxboot.img /tmp/g2boot.img > /tmp/g2ldr
rm /tmp/g2boot.img



I guess you should follow the instructions in the pdf and rebuild adding usb_keyboard.mod with a line like:

allmods=$allmods" usb_keyboard"

in grub.makeldr.sh

:cheers:
Wonko

#25 hike39

hike39
  • Members
  • 4 posts
  •  
    Germany

Posted 06 October 2011 - 09:24 PM

Hi Wonko,
it's me again. Sorry for my late response, but I was two weeks off.

Now I've tried everything as you proposed. But the final result is that my system reboots as soon I choose the menue item "Grub 2 for DOS" and the message "Try (hd0,0):NTFS5" has been displayed.

I've also rechecked which version of the grub_mkimage I've on my Ubuntu machine. It's: 1.98+20100804-5ubuntu3.3. The funny thing is that not a grub2.boot file is greated but one called grub.boot.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users