Jump to content











Photo
- - - - -

Grub2Win


  • Please log in to reply
23 replies to this topic

#1 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 01 September 2012 - 04:27 PM

Hi, drummerdp here. I recently set up a project on sourceforge called grub2win. Grub2win lets you boot the officially released GNU grub 2.00 from Windows 7, Windows 8 or Vista. Grub2 supports extremely large 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.

Advanced scripting, searches and many other functions are available at boot time. All commonly used file systems for Windows, Linux and Mac are supported.

Installation is simple and takes only seconds. The software requires only one small directory on the C: drive, less than 5 MB.

Grub2win uses the Windows bootmgr / bcd to boot grub from a normal NTFS directory on the C: drive.
The native Windows MBR is not touched. This makes multi-booting much less risky.

There is an alternative download available for XP / 2000 users.

Note: This project was previously called grub24dos. It has over 11,000 users worldwide.



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

http://sourceforge.n...jects/grub2win/


Thanks.



#2 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 03 September 2012 - 10:03 AM

Have all our moderators died out? JFYI, triple posting here:

http://reboot.pro/17454/
http://reboot.pro/17453/
http://reboot.pro/17452/

#3 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 05 September 2012 - 01:34 AM

Have all our moderators died out? JFYI, triple posting here:

http://reboot.pro/17454/
http://reboot.pro/17453/
http://reboot.pro/17452/

no, just asleep... :chair: And a good whack is often needed :)

Mostly a case of "someone else" will probably fix it...(so no one did)...

Scott
:cheers:

#4 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 05 September 2012 - 01:44 AM

no, just asleep... :chair: And a good whack is often needed :)

Mostly a case of "someone else" will probably fix it...(so no one did)...

I reported around 48 hours back and I can find the links to be still valid.

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12701 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 September 2012 - 07:02 AM

In former times, as I remember, developers could remove such double posts in most subforums.
Nowadays the number of subforums with developer moderator access is much lower.

Peter

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 September 2012 - 12:26 PM

In former times, as I remember, developers could remove such double posts in most subforums.
Nowadays the number of subforums with developer moderator access is much lower.

In former-former times :whistling:, an Admin would have kicked drummerdp's ass till the moon and back for the triple posting, removed two of them then would have kicked Holmes.Sherlock's ass for commenting in public the Admin/Mod actions (or lack thereof)..... ;)


:cheers:
Wonko

#7 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 05 September 2012 - 02:01 PM

In former-former times :whistling:, an Admin would have kicked drummerdp's ass till the moon and back...

Nobody has done that yet. So, the situation has turned worse.

...then would have kicked Holmes.Sherlock's ass for commenting in public the Admin/Mod actions (or lack thereof)

I just felt and found my ass to be perfectly all right. Does that mean the situation is better now? Pretty confused.

#8 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 September 2012 - 04:06 PM

Nobody has done that yet. So, the situation has turned worse.
....

I just felt and found my ass to be perfectly all right. Does that mean the situation is better now? Pretty confused.

Naaah, not better nor worse, only different.

One of the few (useful :dubbio:) things old people can do is to tell yutes ;) how things worked (or completely failed to :w00t:) before their time.

Why in my day.... :whistling:
http://reboot.pro/?showtopic=1908


:cheers:
Wonko

#9 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 05 September 2012 - 10:04 PM

I reported it too, a couple of days ago. The triple posting happend when my browser locked up while I was setting up the post.

Oh well. I'll report it again.

- drummerdp

#10 Justin Goldberg

Justin Goldberg
  • Members
  • 1 posts
  •  
    United States

Posted 28 July 2013 - 04:24 AM

How do I back up my mbr before installing grub? I don't want to boot up and run fdisk /mbr from the windows setup disc.



#11 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 28 July 2013 - 10:34 AM

How do I back up my mbr before installing grub? I don't want to boot up and run fdisk /mbr from the windows setup disc.

First thing WHICH "grub"?

There is GRUB (now called GRUB legacy) grub4dos, GRUB2 (now called GRUB) and you posted in a thread dedicated to yet another project, grub2win.

 

Most installers and install methods will make a backup of the MBR on second sector of the disk, but you need to specify exactly WHICH tool are you going to install and HOW are you going to, as not all may do that.

 

If the question is more "general", and you want a backup copy of the MBR of your device, you can use any form of dd (under linux or Windows) or similar and under windows the dsfok toolkit or, easier, Hdhacker:

http://dimio.altervi.../eng/index.html

(but there are several other small tools that can do that).

Remember, if you use HdHacker, that you want to backup first sector of the \\.\PhysicalDrive.

 

:cheers:

Wonko



#12 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 28 July 2013 - 10:53 AM

hi drummerdp

 

Thank you for sharing your tool. :good:

 

Is it only for OS-launching or can grub2 also boot PE(ISO) files?

 

Regards T.



#13 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 29 July 2013 - 02:21 AM

----------------------------------------------------------------------
How do I back up my mbr before installing grub? I don't want to boot up and run fdisk /mbr from the windows setup disc.
----------------------------------------------------------------------

 

Hi,

Grub2Win does not touch the MBR. When you install, you simply create a new directory called C:\grub2. This is a normal NTFS directory on your Windows C: drive. Everything is done from within the C:\grub2 directory.

The only thing Grub2Win updates is the Windows BCD for Windows 7, Windows 8 or Vista. If you are running Windows XP or Windows 2000, the boot.ini file is updated.

So no, you don't need to back up your MBR when installing Grub2Win.

 

However, the Linux installation process often trashes the Windows MBR so beware.

- Dave



#14 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 29 July 2013 - 02:32 AM

---------------------------------------------------------------------------------------------------------------------

hi drummerdp

 

Thank you for sharing your tool. :good:

 

Is it only for OS-launching or can grub2 also boot PE(ISO) files?

 

Regards T.

---------------------------------------------------------------------------------------------------------------------

 

 

Hi,

I think this will work.

Once you have installed Grub2Win, run grub2win.exe. This will create C:\grub2\grub.cfg    Now edit the file.

Add the following code to the user section.


# start-grub2win-user-section ********************************************************
#
menuentry "Boot PE ISO" {
   loopback  pedisk  (hd0,1)/iso/pefile.iso             <====   Fill in the disk and partition numbers as well as the path to your PE image file.
   ntldr /bootmgr                                                    <====   Grub2 loads Windows bootmgr from the PE ISO image
}
#
# end-grub2win-user-section ********************************************************

- Dave



#15 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 29 July 2013 - 09:17 AM

hi drummerdp

 

thank you for your fast reply.

i´m running win_xp(x86)

i added these lines to grub.cfg:

# start-grub2win-user-section ********************************************************

#
menuentry "Boot PE ISO" {
loopback pedisk (hd0,1)/WINPE_X86_WIN7E.ISO
ntldr /bootmgr
}
#
# end-grub2win-user-section ********************************************************

when choosing this item from grub2 menu, grub2 states: "Unknown file system"

command line result in the attached thumbnail.

this iso works in grub4dos environment.

thanks in advance for ideas

T.

Attached Thumbnails

  • Grub2_failed_130729.jpg


#16 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 29 July 2013 - 10:18 AM

Hey guys, grub2Win is an "easy to use" version of GRUB2 (now called GRUB).

The loopback directive ONLY makes sense for a Linux distro, and will NOT work for *any* Windows (or PE) based .iso.

You can however from the GRUB2 .cfg load grub4dos and from the latter boot the .iso after having mapped it to (0xFF) or (hd32).

 

:cheers:

Wonko



#17 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 29 July 2013 - 05:54 PM

Hi Wonko

thanks for this info,

success in loading grub4dos from grub.cfg:

# start-grub2win-user-section ********************************************************

menuentry "Grub4dos kernel" {
set root=(hd0,1)
linux16 /grub.exe
}
# end-grub2win-user-section ********************************************************

 

trying to call grub2 from menu.lst:

title Grub2

find --set-root /grub2/i386-pc/core.img
kernel /grub2/i386-pc/core.img

found here:

"http://reboot.pro/to...b4dos/?hl=grub2"

but this doesn´t work. "Unknown filesystem"

 

1. is there a workaround for calling grub2 from grub4dos ?

2. can grub4dos take advantage of the "extreme large drive support" of grub2, when it´s called by grub2 ?

 

regards and thanks in advance

T.



#18 drummerdp

drummerdp

    Newbie

  • Members
  • 13 posts
  •  
    United States

Posted 30 July 2013 - 12:58 AM

Hey ReTokener,

 

This worked for me. Loaded the Windows PE ISO file directly from Grub2Win. Should have all the Grub2 advantages.

 

# start-grub2win-user-section   ********************************************************
#
menuentry   'Win PE'  {
     loopback pedisk  (hd0,1)/pefile/winpe_amd64.iso        <=====   Change the partition address and path to point to your PE ISO.
     root=(pedisk)
     ntldr /bootmgr
}
#
# end-grub2win-user-section     ********************************************************

 

Good luck and let me know how you make out,

 

- Dave
 



#19 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 30 July 2013 - 08:43 AM

dear drummerdp

thanks for your support.

using your menu-entry did not work for me.

Unexpected I/O error 0xc00000e9

testet in VirtualBox 4.2.16

(PAE/NX ON/OFF)

(VTx/AMD-V ON/OFF)

 

regards T.

Attached Thumbnails

  • Grub2_failed_130730.jpg


#20 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 30 July 2013 - 09:50 AM

dear drummerdp

thanks for your support.

using your menu-entry did not work for me.

testet in VirtualBox 4.2.16

(PAE/NX ON/OFF)

(VTx/AMD-V ON/OFF)

 

regards T.

Try it in another VM, possibly Qemu+Qemu Manager.

Virtualbox has quite a lot of quirks.

The new .cfg entry drummerdp posted seems like "reasonable". :)

 

But I still doubt it can work:

http://michael-proko...-iso-via-grub2/

http://www.lucas-nus...5#comment-22649

(unless in the meantime some specific code has been added to GRUB2)

 

Hasn't GRUB2 a command line interface? <- rhetorical question ;)

http://members.iinet...m CLI Mode.html

 

It would be interesting to use command line instead of the pre-made .cfg entry, to see if there is some error in the feedback to the single commands.

 

:cheers:

Wonko



#21 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 30 July 2013 - 12:20 PM

Hello Wonko

thanks for suggestions.

tested grub2 command line.

surprising what it tells:

can´t find command  "root"

had no time yet to run qemu or VMWare.

 

T.

Attached Thumbnails

  • Grub2_failed_130730_2.jpg


#22 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 30 July 2013 - 12:39 PM

Hello Wonko
thanks for suggestions.
tested grub2 command line.
surprising what it tells:
had no time yet to run qemu or VMWare.
 
T.

Well, then there is something wrong in the syntax used.

"root" is a perfectly legit GRUB and grub4dos command, but seemingly in GRUB2 has become a sort of "environment variable", see (already given link):
http://www.lucas-nus...5#comment-22649
try:

loopback pedisk (hd0,1)/pefile/winpe_amd64.iso
set root=(pedisk)
ntldr /bootmgr
boot


:cheers:
Wonko



#23 ReTokener

ReTokener

    Frequent Member

  • Developer
  • 132 posts

Posted 30 July 2013 - 01:49 PM

dear wonko

 

using command line:

loopback pedisk (hd0,1)/pefile/winpe.....

set root=(pedisk)
ntldr /bootmgr
boot

resulted in the same "Unexpected I/O error 0xc00000e9".

 

sorry for the inconvenience

T.

 

Grub2_failed_130730_3a.jpg Grub2_failed_130730_3.jpg



#24 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 30 July 2013 - 02:19 PM

Good, now the sintax is correct, at least.

 

It still seems like (as expected) the loopback device established by GRUB2 is not "seen" by the booting PE (this would be consistent with the references I provided) but still it is possible that the needed code has actually be added to GRUB2 and the issue is with Virtualbox.

 

I have no reason (apart the logical impossibility if the code has not been added to GRUB2 ;)) to doubt about drummerdp's report, and it is also possible that (set apart the issue with the "set root" instead of root) what he reported as working is either a "particular build" or the test was made to "peculiar" hardware (real or virtual). 

 

We need to do the tests on "alternate" VM's or wait for further details from drummerdp on what exactly worked for him and where.

 

If I recall correctly :unsure: burg (a "bettered" version of GRUB2) includes the code needed to do .iso mapping "visible" to Windows:

http://code.google.com/p/burg/

See:

http://reboot.pro/to...opback-support/

but I am not familiar with it and cannot say how exactly it should be used.

 

:cheers:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users