Now the partition table looks like:
| Free (for solaris) | Ubuntu | Windows | extened partition including several ntfs and linux swap|
Unfortunately, after I installed the solaris, both the existing Windows and Ubuntu failed to boot. For Windows, the error message is: "
I guess the reason was probably the partition number changed. I logged into Solaris, run format -> fdisk command, the result is below:
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Linux native 2551 5099 2549 21
2 IFS: NTFS 5100 7011 1912 16
3 EXT LBA 7012 12160 5149 42
4 Active Solaris2 1 2550 2550 21
then use ntfscat to show the content of boot.ini of Windows partition:
bash-4.0# ntfscat /dev/dsk/c1d0p2 boot.ini
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
You can see the partition number "1" is not correct since the Windows partition number has changed to "2". So to fix it: make a new boot.ini (also need unix2dos command to add "/r" for Windows), then overide it on Windows:
ntfscp /dev/dsk/c1d0p2 ./newboot.ini boot.ini
Also, change the /rpool/boot/grub/menu.lst to correct the partition numbers to:
Reboot the system, I can start Windows normally.
Next, for Ubuntu problem, I need to get the content of Ubuntu grub menu.lst. Solaris currently does not have built-in supports for linux ext2/ext3 file system. I need to install some packages by following the guide, then, mount the Ubuntu partition:
mount -F ext2fs /dev/dsk/c1d0p1 /mnt
and got the content of Ubuntu grub menu.lst:
title Ubuntu 8.10, kernel 2.6.27-14-generic
kernel /boot/vmlinuz-2.6.27-14-generic root=UUID=2786d26c-beb2-43e6-93a8-1cb3be921f23 ro quiet splash
Reboot the system, select to boot Ubuntu in Solaris's grub menu, I was prompted to enter grub command. I tried to manually input: root (hd0,0) and the content of "Kernel....", "initrd....", then boot command, however, the system failed to boot up in the process.
So there must be somthing wrong with the Ubuntu's grub (My Ubuntu's grub was installed in Ubuntu's partition not the MBR), it seems I need to re-install the grub:
grub> root (hd0,0)
grub> install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p
O.K. The problem is resolved.
Don't delete a partition then create a new partition, it would possibly cause the partition numbers to change, making all things suck.