Just to follow up for anyone who might be looking for info about this at
sometime or another - my full onnv build failed, but the grub portion
of it built fine. So, here's what I did:
1) Did a 'make install' in my onnv-gate/usr/src/grub directory. This
put the stage1 and stage2 files in my
onnv-gate/proto/root_i386/boot/grub directory.
2) Determined which specific drive I was booting from:
$ zpool status rpool
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c7t1d0s0 ONLINE 0 0 0
3) Installed my new stage1 and stage2 files while sitting in my
onnv-gate/proto/root_i386/boot/grub directory. Note that I also
modified the grub_printf "GNU GRUB version" line in char_io.c: line to
make sure my custom grub made it onto the disk:
$ pfexec installgrub stage1 stage2 /dev/rdsk/c7t1d0s0
Worked like a charm.
Will
Lin Ma wrote:
> Willie Walker wrote:
>> Yee haa! Many thanks, Lin. I have a nightly process whirring away
>> right now. It took a *little* futzing to get things set up right, but
>> ptree seems to be telling me lots of stuff is being compiled right
>> now. We'll see how far it gets. It also looks like I can use the
>> "-i" option to do incremental builds once the complete build is done.
>>
>> Assuming the build succeeds, my next worry is about installing the new
>> grub on my machine. I believe I do this with /sbin/installgrub, but
>> I'm not quite sure what to use for the disk or if I need to use things
>> other than the typical stage1 and stage2 files. The reason I scratch
>> my head is that I'm doing this all on an OpenSolaris 2008.11 b110
>> machine with a single HDD that has ZFS. So, I don't know if I need to
>> do anything differently or not.
> I'm not sure what 'things' you want to use :-) . Anyway I think if you
> change stage1 and stage2 you have to write them to the partition where
> your zfs root pool is by installgrub. Otherwise reinstall what files you
> have changed into /boot/grub is enough.
>
>> http://opensolaris.org/os/community/zfs/boot/zfsboot-manual/ looks
>> like it might have some good stuff, but I'm wondering if there are any
>> things I need to worry about.
> Depends on your changes, right? But from the savannah patches, looks
> they don't change any boot related things, so I don't think you have to
> take care about zfs root filesystem related things.
>
>> Many thanks for your help!
> My pleasure :-)
>
> lin
>>>> Hi All:
>>>>
>>>> I'm toying with creating a patch for
>>>> http://defect.opensolaris.org/bz/show_bug.cgi?id=5908, which
>>>> involves modifying GRUB.
>>>>
>>>> The problem is that I'm not quite sure how to go about building it
>>>> and then updating the MBR once I've done so. I've grabbed the
>>>> sources from anon at hg.opensolaris.org/hg/onnv/onnv-gate and I've
>>>> played with the config file. From the -Wall entries and such in the
>>>> configure file, it appears to rely upon gcc, but I can't get past
>>>> the configure phase even if I install SUNWgcc.
>>> I think grub sources in onnv gate do not build with gnu tools, looks
>>> they require sysv make and sun compiler, e.g. Makefile.solaris. So I
>>> guess applying your patch to the local workspace which is a clone of
>>> onnv gate and build that workspace with /opt/onbld/bin/nightly
>>> (delivered by SUNWonbld) could be easier.
>>>
>>>>
>>>> Does anyone have any tips or tricks for how I might go about
>>>> building this?
>>> I'm not sure how to build some components selectively, probably you
>>> need /opt/onbld/bin/bldenv.
>>> Here is a long guide: http://opensolaris.org/os/community/on/devref_toc/
>>>
>>> lin
>>>
>>
>