[ale] grub with Linux and Solaris??

Chris Ricker kaboom at oobleck.net
Tue Jan 31 09:37:19 EST 2006


On Sat, 28 Jan 2006, Geoffrey wrote:

> Now Solaris uses grub, so I figured I'd be able to modify my SuSE grub 
> config to boot the Solaris.  With my SuSE install, I created a separate 
> /boot partition.  The only way I could get it to boot the Solaris was to 
> physically copy the kernel and module files that the Solaris grub config 
> points to, to my new /boot tree.  The original entries are as follows:

Do it the other way around -- copy the Linux stuff into the Solaris grub 
setup

* Solaris grub can boot Linux
* Linux (stock) grub can't boot Solaris

Support for various things Solaris needs but Linux doesn't has been added 
to the Solaris grub. That stuff's not upstream and may never been since 
Sun is hacking grub 1 and upstream has abandoned that for grub 2. Also, 
the Solaris grub stuff has some "magic" auto-repair options to regen the 
Solaris conceptual equivalents of Linux initrds. You'll want those, 
particularly if you start adding drivers and such

Perhaps simpler is to daisy-chain them

For example, I have on my laptop (seen from the Linux side):

[root at d1000 ~]# fdisk -l /dev/hda

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

/dev/hda1               1        1825    14659281    b  W95 FAT32
/dev/hda2            1826        5650    30724312+  bf  Solaris
/dev/hda3   *        5651       12161    52299607+  83  Linux
[root at d1000 ~]# 

hda1 is a fat partition for bouncing files around
hda2 is Solaris
hda3 is Linux

I have hda3 active, and Linux grub installed to it. In my grub.conf, I 
have

default=0
title Fedora Core (2.6.15-1.1824_FC4)
        root (hd0,2)
        kernel /boot/vmlinuz-2.6.15-1.1824_FC4 ro root=LABEL=/ 
        initrd /boot/initrd-2.6.15-1.1824_FC4.img
title Solaris NV b30
        rootnoverify (hd0,1)
        chainloader +1

Picking the Solaris NV entry will just daisy-chain into the Solaris 
grub....


> Further, I can mount the Solaris root partition under SuSE as the 
> /dev/hda6 as follows:
> 
> mount -t ufs -oufstype=sunx86 /dev/hda6 /solaris

you can, but you don't really want to do that much, especially r/w

Linux ufs is fairly fragile, and you run a pretty good chance of trashing 
Solaris from Linux if you do that a lot, which is why I have the fat 
partition ;-)

later,
chris



More information about the Ale mailing list