Jump to content











Photo
- - - - -

Installation problem: MBR2 + strange disk geometry

grub4dos disk-geometry

  • Please log in to reply
9 replies to this topic

#1 zapador

zapador
  • Members
  • 6 posts
  •  
    Spain

Posted 25 September 2014 - 12:27 PM

Hi all,
 
I'm installing grub on the MBR of the hard disk using grubinst.exe. I'm using the optional backup of the original MBR on the second sector of the first track.
 
Also I'm using the --skip-mbr-test option. The CHS values on partition table are wrong but I guess it doesn't matter because fixing them with fixparts.exe doesn't help and BIOS supports LBA. The LBA support is checked early in the stage1, so...   :sos:
 
This is the original partition table identified as MBR2 (not MBR) by grubinst:
 
Start sector: 0x0
Image type: MBR2
Partition table
  bt  h0  s0  c0  fs  h1  s1  c1      base      leng
  00  08  01  1C  07  11  C4  FF       800     32000
  80  11  C4  FF  07  11  C4  FF     32800  129E6000
  00  00  00  00  00  00  00  00         0         0
  00  00  00  00  00  00  00  00         0         0
 
When I reboot the machine I see the following error message: Missing MBR-helper. I think it's the MBR bootstrap code complaining about that MBR-helper is not entirely copied in the first track. I have checked the first track the MBR-helper is there.   :frusty:
 
The disk geometry is kind strange: 512 bytes/sector, 12 sectors/track, 60 tracks/cylinder. 
 
I'm far from being an expert in ASM but taking a look to the code of the stage1 makes me think grub4dos works with any geometry. (Geometry is asked via int13h, not hardcoded).
 
Does anybody know if grub4dos (0.4.4) supports unusual disk geometries? 
 
Thanks!
 
 


#2 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 2014 - 12:43 PM

zapador,

the grubinst.exe and the grub4ds 0.4.4 (whatever version of 0.4.4 before the 2009-10-16 is actually NOT recommended) are seriously outdated.

 

Check the sticky here:

http://reboot.pro/topic/14-grub4dos/

to find where to get a decently recent grub4dos

 

This said (and with the advice of using if not latest-latest, at least a recent enough version of the 0.4.5c series) the issue you report sounds more related to an incorrect installing procedure. (cannot say if because of grubinst.exe or your specific use of it).

 

Nowadays the "normal" way to install grldr.mbr to a MBR+hidden sectors is bootlace.com or one of the GUI tools (like -as a n example - BootIce or grub4dos toolbox):

http://reboot.pro/to...-v078-released/

http://bbs.ipauly.co...ewforum.php?f=2

http://reboot.pro/to...ox-for-windows/

 

There should be normally no particular issue with "queer" geometries, but this may depend not only on the grub4dos, but also on the actual BIOS of the specific machine on which you are testing it. 

 

:duff:

Wonko


  • zapador likes this

#3 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 25 September 2014 - 01:23 PM

short answer: grubinst is completely out of date. you may use BOOTICE to install WEE or grub4dos on to the MBR track.


  • zapador likes this

#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 25 September 2014 - 01:54 PM

grub4dos 0.4.5c is most recent version - see here for downloads.

 

You can also try preparing and installing a grub4dos bootable disk using RMPrepUSB. Use Settings tab to list all disks.


  • zapador likes this

#5 zapador

zapador
  • Members
  • 6 posts
  •  
    Spain

Posted 25 September 2014 - 02:45 PM

Thank you all!

 

I'm going to try chenall last release and bootice/RMPrepUSB.

 

I have noticed that the suggested installers are not GPL. Just out of curiosity... does anybody know why GRUB4DOS developers are not interested in a Windows compatible installer? I know the project is called GRUB4DOS not GRUB4WIN but I thought that most of the users run Windows OS.



#6 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 25 September 2014 - 03:19 PM

Thank you all!

 

I'm going to try chenall last release and bootice/RMPrepUSB.

 

I have noticed that the suggested installers are not GPL. Just out of curiosity... does anybody know why GRUB4DOS developers are not interested in a Windows compatible installer? I know the project is called GRUB4DOS not GRUB4WIN but I thought that most of the users run Windows OS.

 

grubinst is a Windows compatible installer, and it was developed by Bean, a member of the grub4dos team.

 

Bean has no time to continue the project of grubinst. Other grub4dos developers also have no time(or no capability) to do such a job, NOT that they have no interest.

 

By the way, weesetup is an open-source installer for WEE, and you can download from chenall's project site. See tutorials here:

 

http://www.rmprepusb.com/tutorials/wee



#7 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 2014 - 03:32 PM

I have noticed that the suggested installers are not GPL. Just out of curiosity... does anybody know why GRUB4DOS developers are not interested in a Windows compatible installer? I know the project is called GRUB4DOS not GRUB4WIN but I thought that most of the users run Windows OS.



And bootlace.com is - though not GUI - Windows compatible, at least with 32 bit.

And - just for the record - the suggested grub4dos toolbox is GPL:
http://fartersoft.com/grub4dostoolbox/

License
GRUB4DOS Toolbox for Windows is released under the GNU General Public License version 2 (GPLv2).

though again it is only for 32 bit, BUT it has an as senseless as 64 bit Cloud :w00t: version here:
http://apps.farterso...dbootlacer/main
that works (or should) both on win 32 and 64 bit .
(it won't operate on the actual device, but you can use a partial image of it)
http://apps.farterso...udbootlacer/faq

:duff:
Wonko

#8 zapador

zapador
  • Members
  • 6 posts
  •  
    Spain

Posted 25 September 2014 - 05:12 PM

@steve6375

 

It seems that RMPrepUSB runs grubinst.exe with the same parameters that I used. I have the same bad results. I think the grub4dos binary embedded in grubinst.exe is an old release. Thanks anyway.

 

@tinybit

 

I see your point, thanks for the explanation. I will take a look to WEE also pointed by wonko, it's interesting the bitlocker compatibilty. Thanks! 

 

@wonko

 

Yep, I saw that grub4dos toolbox is GPL but I couldn't find the source code anywhere.  :huh:  I also saw the cloud bootlacer, your previous post was very useful. For what I see I think the installation (without extra checks) is done in two steps:

 
First, a binary patch for some values to configure the boot options. I guess offsets can change between releases.
Second, overwrite the binary file sector by sector, or in the case cloud bootlacer, completely replace the first track.
 
Then I wonder if this can be part of the problem. The latest release contains a grub.mbr of 8KB. A usual track is like this:
  • 63 * 512 bytes = 31,5 KB, greater than 8 KB

Mine is:

  • 12 * 512 bytes = 6 KB , smaller than 8KB

The first partition do not begin on sector 13 so I have space to write the sectors needed but I guess it could start at 13th sector. Maybe it's not important If CHS addressing is obsolete and track numbers doesn't match with something physical on the device.

 

I will do some more research, thank you all.



#9 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 25 September 2014 - 05:25 PM

The grubinst.exe used by RMPrepUSB is a special version changed and compiled by me to be compatible with a wider range of BIOSes.

Did you actually try installing grub4dos using RMPrepUSB - Install grub4dos?

 

Can you use RMPrepUSB - DiskInfo - 0  to view MBR of your drive?

 

Do you always get same error on real system - VMWare - QEMU - VBox ???



#10 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 2014 - 06:24 PM

What is actually written to the MBR+hidden sectors is grldr.mbr, which is 9216 bytes in size, i.e. 18 sectors.

The geometry shouldn't be an issue as long as no partition begins before those.What grldr.mbr does is essentially that of finding and loading grldr (which is the actual grub4dos "main" file).

Wee is a sort of "minimal" griub4dos integrated in the MBR+hidden sectors, and comes in two "sizes", "medium" that will use 63 sectors, i.e. what normally is "first track" and in "large" that will use 127 sectors (as most new OS's even on small media are "Mb aligned to have first partition on LBA128) that may be able to boot directly a number of things (or will, like grldr.mbr, be able to chainload a grldr).

As often happens, you started maybe with the "wrong" questions, with a high risk of slipping on a chocolate covered banana :w00t:
http://homepage.ntlw...red-banana.html

There is often no *need* to install the grub4dos to the MBR (+hidden sectors) and use instead a "plain" MBR code and use a VBR (or bootsector) invoking the grldr, if you could explain detail your actual GOAL (as opposed to the way you think you shoudl reach it) maybe we could provide if not "better" at least "more targeted" suggestions :).

Can you share with us some info on the environment around the *whatever* you are up to (besides some info on the actual *whatever*)? :unsure:

The disk geometry you reported is more than "strange" actually "queer" what hard disk is that (please consider that there are several tools that may derive a geometry from a pre-existing partition table or bootsector data thus creating "artificial, crazy" geometries :ph34r:.

About the grub4dos toolbox, it is and remains GPL, you may want to ask the Author for the sources or get the published sources for the earlier version 0.1 (which is actually the "stable" version)
http://sourceforge.n...or Windows/0.1/
http://sourceforge.n...rc.zip/download
as there are not such "big" changes:
http://fartersoft.co...forum.php?f=101

:duff:
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users