[OpenIndiana-discuss] re-install grub [SOLVED]

Jean-Pierre jean-pierre.andre at wanadoo.fr
Fri Aug 30 13:44:30 UTC 2013


Hi,

axelle_apvrille at yahoo.fr wrote:
> Hi,
>
>>> I'll now need to work out how to have Linux/Windows/OpenIndiana on the
>>> same grub, but I've seen docs about that.
>>
>> OI and Windows is relatively simple, via chainloading.
>> OI and recent Linux (with GRUB2, or rather new filesystems not
>> supported by OI's version of GRUB) - this may be more tricky.
>
> Unfortunately, that's what I have.
> I already have OI+Windows on grub, that's no problem.
> All my issues started when I installed Linux Mint 15, which failed to
> install its GRUB2 (because of not enough space before the first sector
> of XP) and overwrote OI's grub...

Of course, grub for OpenIndiana will overwrite the MBR (512 bytes)
set by the grub2 for Linux, but that is all.

I do not understand the space before XP issue. AFAIK, apart from
the MBR, the grub code (several stages) resides in the partition
in which it is installed. Installing Linux will only modify the MBR
and the Linux root partition, likewise grub for OpenIndiana will
overwrite the MBR and the OpenIndiana partition.

>
>> I think chainloading failed that time for me when I tried,
>> but this attempt was long ago and I am not certain of its
>> details now. Possibly you'd need to stack another "external"
>> bootloader in MBR that would chainload OI or Linux or Windows.
>
> Yes, perhaps I'll stack another bootloader. It's a good idea if it does
> not work straight away.


I could chainload from grub OpenIndiana to grub Linux when
they were both old grub. I have not been able to chain to
grub2, and I do not known why. This is the procedure I used :

Install Linux first, and copy the MBR to a file in
/boot/grub (say /boot/grub/linux-mbr). Then install
OpenIndiana, and add the entry is its menu :

title Grub Linux
       rootnoverify (hd0,0)
       chainloader (hd0,4)/boot/grub/linux-mbr

Of course (hd0,4) designates the Linux boot partition.

With this configuration, grub chain load grub2 and the
grub2 menu is displayed.... but loading Linux fails, I
do not know why.

The opposite (chain loading from Linux to OpenIndiana)
is not possible as the Linux grub cannot read zfs.

>
>> upgrade won't destroy your ability to boot, again :)
>
> To be fair, for once, it's not Windows that destroyed things but Linux ;)
>
> ==
>>
>> Now, if you install Linux after OpenIndiana,
>> first copy the MBR created by OpenIndiana, then
>> install Linux, then copy its grub.cfg, then
>> overwrite the MBR by the one from OpenIndiana
>> and apply the procedure above.
>
> Ok thanks I'll try that.
>
> -- Axelle





More information about the OpenIndiana-discuss mailing list