Monday, 28 May 2007

Ubuntu Installed Grub - Bye Solaris 10!

As usual Solaris suffered when I tried others operating systems.
One of the most common causes of the Solaris destruction is the fact that the Solaris partition ID is 0x82 (the same as the Linux Swap partition). So if you boot from a Live CD (like Ubuntu) it will automatically assign your Solaris partition as a Swap... Yes!!! without a prompt!!! so it will destroy the Solaris installation!.
Later with Solaris 10 Sun changed the partition ID for 0xbf to avoid this problem.

Another problem is the modified grub that Solaris uses.
As you can read in another post I finally decided to install Ubuntu. I have one hard disk with :
Windows XP (that came with the laptop), PC-BSD 1.3.2, Solaris 10, and Slackware 11 (now Ubuntu 7.04).
I have 4 primary partitions :
Windows - Partition 0
Slackware 11 - Partition 1
PC-BSD - Partition 2
Solaris - Partition 3

I was using LILO in my MBR (Master Boot Record / Partition Table). When I Installed Ubuntu over the Slackware partition, it also installed the grub in the MBR. The problem was that I couldn't boot Solaris again.
Yes... I modified the menu.lst of the grub in Ubuntu hundres of times, but nothing worked... I only got different errors messages : Invalid Partition, Filesystem type unknown, etc.
Finally I decided to search in the Sun Web Site and I found the following :

GRUB as obtained from sources other than Sun does not currently recognize Solaris on-disk VTOC and UFS formats. Sun has submitted changes to the GRUB project to support this; until they have been integrated, only the Solaris GRUB will work. If Linux installed GRUB on the master boot block, you will not be able to get to the Solaris OS even if you make the Solaris partition the active partition. In this case, you can chainload from the Linux GRUB by modifying the menu on Linux. Alternatively, you can replace the master boot sector with the Solaris GRUB in the above example, by using the installgrub(1M) command:

installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t2d0s3

Before the Solaris VTOC and UFS implementation is propagated to the standard GRUB release, only the Solaris version of GRUB will work.

I tried the installgrub command booting from the Install DVD and selecting option 6. But I only got an error message : /dev/dsk/c0t0d0 : Not a character device. I tried with rdsk and another disk number but neither worked.

So I reinstalled Solaris again. But when I click "Finish" and the system rebooted the Ubuntu Grub menu appears... I was expecting the Solaris grub... what happend??
I don't really know but maybe Solaris got confused with ubuntu's grub in the MBR.
So I had to use and old 3 1/2" diskette with DOS and a Norton Disk Editor 4. I booted DOS ran DE and selected the hard disk as physical disk and saved the MBR in a file. Just to have a backup of the MBR!
Then I booted from the Windows XP CD and used the recovery console and ran the FIXMBR command (with my fingers crossed).
It deleted ubuntu's grub from the MBR.
Then I Rebooted and installed again Solaris. Without the Ubuntu Grub, the Solaris installation wrote the MBR with its grub.
Then I was able to boot Solaris 10 and modified the menu.lst in Solaris with the following :
title Solaris 10 11/06 s10x_u3wos_10 x86
root (hd0,3,a)
kernel /plataform/i86pc/multiboot
module /plataform/i86pc/boot_archive

title ubuntu, Kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=b98c9312-17fb-4e5b-8459-7d4008a8858d ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic

title ubuntu, Kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=b98c9312-17fb-4e5b-8459-7d4008a8858d ro single
initrd /boot/initrd.img-2.6.20-15-generic

title PC-BSD 1.3.2
rootnoverify (hd0,2)
chainload +1

title Windows XP
rootnoverify (hd0,0)
chainload +1


Now I finally can boot Solaris and the others OS again...

Why does my Solaris always get hurt???

1 comment:

pbsl said...

thanks for sharing this site. you can download lots of ebook from here