Jan Ploski wrote:
Jürgen Keil wrote:
Do you know where I can obtain the source code for the OpenSolaris version of GRUB and whether it can be compiled under Linux?

Check this page:

    http://hub.opensolaris.org/bin/view/downloads/on

Solaris' version of GRUB is included in ONNV sources,
description for pulling the sources from a a mercurial
repository can be found here:

    http://hub.opensolaris.org/bin/view/Project+onnv/

You can also download a tar bundle with the onnv sources,
for OpenSolaris 2009.06 that should be onnv build b111b:

    http://dlc.sun.com/osol/on/downloads/b111b/
    http://dlc.sun.com/osol/on/downloads/


The supported way to build opensolaris b111 source
was to compile it under SX:CE (using a build around b111);
but SX:CE has been discontinued.

Maybe you could try to install a current development build
of opensolaris, and check if the grub problem is reproducible
on the current development release?  The current development
release (b134) can be compiled on current opensolaris.

    http://www.genunix.org/
    http://www.genunix.org/distributions/indiana/osol-dev-134-x86.iso


OpenSolaris sources can't be compiled on Linux.
The GRUB in OpenSolaris might be compilable on Linux, but you probably have to contruct your own set of Makefiles. It's probably easier to install an OpenSolaris into a virtualbox guest machine, and setup that vbox client to compile opensolaris.

Thanks for the pointers to source code. I decided to first give it a shot under Linux and managed to compile GRUB pretty easily. To get rid of compilation errors, I just had to add #include<stdint.h> and typedef caddr_t as char*.

Interestingly, this newly compiled version of GRUB shell, which I next started after booting from a Linux LiveCD, can see and read the ZFS partition. When I use the 'root (hd1,2,a)' command as you suggested it doesn't freeze ('root (hd1,2)' reports unknown filesystem type, but I guess that's ok). Unfortunately, it fails in other (worse? ways - the 'install' spits out "Error 15 File Not Found", whether invoked by 'setup' or manually, even though I can display all the referenced files using 'cat'. Furthermore, although I can use 'configfile' to make it read menu.lst from the OpenSolaris partition and correctly display the boot menu, actually trying to boot results in a Segmentation fault (and I don't have gdb on the Linux LiveCD). I realize that this whole approach is not supported, so I will probably not dig deeper.

Contrary to the original plan, I buried myself, and I solved it. ;-)


I am next going to try the tip with the primary vs. secondary disk from your other post, that is, disconnect the IDE cable physically instead of just making BIOS boot from the second disk.

Using primary/secondary disk didn't make any difference.

However, I managed to fix the problems in the Linux-compiled version of the OpenSolaris GRUB mentioned above. I then peppered this version with grub_printfs and used it for detailed debugging. I found out that the root cause was my buggy BIOS not being able to read beyond a certain sector. That's why GRUB froze when I entered the 'root' command. That's why the MBR-installed GRUB wasn't even displaying the boot menu. In any case, OpenSolaris is fully exonerated.

In short: it is possible to install and boot OpenSolaris on a secondary master (even if it also contains some Linux RAID partitions in front, which I thought might be adding to confusion). It *may* be a problem though to boot anything from a partition in high-numbered sectors ("high" being an overstatement: the last addressable sector was just 66059279 in my case, well below 40 GB).

I solved my problem by relocating the OpenSolaris (boot) partition closer to the beginning of the disk. I also described a couple of diagnostic steps (that would have helped me) for posterity: http://plosquare.blogspot.com/2010/05/troubleshooting-grub-hangs.html

Best regards,
Jan Ploski
_______________________________________________
install-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/install-discuss

Reply via email to