尝试Solaris和Vista双系统

2007-3-25 Jerry 系统

这些天尝试让Windows Vista和Solaris共存,可是没有成功。

刚刚看到一篇文章,周一拿我那台Ultra20试验一把。

原文章地址:http://blogs.sun.com/moinakg/entry/vista_and_solaris_express_dual

We had recently concluded a Solaris Installfest at the India Engineering Center in Bangalore and the response was very good. In fact we are getting asked for a second installfest. However this is material for another blog.
One of the persons needed to have the release candidate of Windows Vista and Solaris Developer Express dual booting on his Ultra 20 M2. What started off as a benign excercise on repartitioning and resizing via a gparted livecd soon turned out to be an excercise in frustration. At the end of the day I got the dual boot working. I won't drone on with the gory details of the fun but lets look at a summary:

Windows Vista (final release version) has the following new quirks


  1. Vista installer requires that no partition be active (or bootable) on the harddisk! If an active partition is found the Vista installer simply says something like "This Volume is not suitable for installing Windows" and refuses to proceed!!
  2. Vista requires that the Windows partition remain active in order to boot.
  3. Vista requires that the Vista bootloader be present in the MBR in order to boot. If you put any other bootloader in the MBR (like Grub stage1), Vista will refuse to boot saying that winload.exe is corrupt. This is because Vista's loader checks for a disk signature in the MBR! More info is available here: http://www.windowsbbs.com/showthread.php?t=55415. Microsoft talks about it in a whitepaper giving some weird reasons: http://www.google.co.in/search?q=OEMBoot_Vista.
  4. The boot.ini file has been replaced by adding yet another entry in the Registry called the Boot Configuration Data with a CLI utility called bcdedit.exe to allow fiddling with the BCD.

To my knowledge the Beta and RC1 versions of Vista did not have restriction #3, but it is present in the final release candidate version.

Now the steps to achieve Dual-Boot
You have a clean system and you want to install both Solaris Express and Vista.


  1. You need to have a GParted or QTParted LiveCD (System Rescue CD) handy. You also need to have a FAT-formatted USB Key (readable on Windows).
  2. Boot the QTParted/GParted cd and create a primary partition for Windows but do not format it.
  3. Now boot from the Solaris Express DVD and install Solaris in another primary partition
  4. Boot into Solaris Express and run: installgrub -m /boot/grub/staqe1 /boot/grub/stage2 /dev/rdsk/c[...]s0. You can get the value for [...] by executing df -h and seeing the device name for mountpoint "/". This puts GRUB stage1 into MBR instead of mboot. This allows Solaris to boot even if the Solaris Partition is not active.
  5. Now dump a copy of the MBR to a file: dd if=/dev/dsk/c[...]p0 of=/solmbr bs=512 count=1
  6. Plugin the USB Key and copy the file solmbr to your USB Key
  7. Insert the GParted CD and reboot into GParted.
  8. Remove the "Boot" or "Active" flag from the Solaris Partition
  9. Reboot and start Windows Vista installation
  10. Once Vista is ready copy the file solmbr from the USB Key to C:\
  11. Now you have to use bcdedit.exe. But before you can use that you need Administrator rights. So in start menu right-click on the Command Window entry and select "run as Administrator" option.
  12. Execute the following in the command window:
    bcdedit /create {ntldr} /d "Solaris Express"
    bcdedit /set {ntldr} device boot
    bcdedit /set {ntldr} path \solmbr
    bcdedit /displayorder {ntldr} /addlast

    This creates a new Legacy boot entry in the BCD.
  13. Now you have to reboot and if all is well you will be presented with 2 boot options by the Vista bootloader. The Solaris Express option will bring up the GRUB menu next from where you can boot Solaris.

You have a system already having Vista and wish to install Solaris

  1. You need to have one free Primary partition. You also need an OpenSolaris LiveCD like BeleniX.
  2. If you have at least 10GB free space on disk then skip to step #5
  3. You may have multiple Windows logical drives and reclaim space by deleting one. Skip to step #5
  4. You have one big Windows partition and need to resize it. So do the following:

    • You need the QTParted LiveCD (System Rescue CD).
    • Defragment your drive
    • Reboot and run chkdsk
    • Boot into the QTParted cd and you will get a partitioning GUI. You can resize the Windows partition here
    • After resizing, boot into windows again and run chkdsk

  5. Now take a backup of the MBR. Boot from BeleniX and execute: dd if=/dev/dsk/c[...]p0 of=mbrback bs=512 count=1 and copy the file to a USB Key.
  6. Now install Solaris Express.
  7. Boot into Solaris Express and run: installgrub -m /boot/grub/staqe1 /boot/grub/stage2 /dev/rdsk/c[...]s0. You can get the value for [...] by executing df -h and seeing the device name for mountpoint "/". This puts GRUB stage1 into MBR instead of mboot. This allows Solaris to boot even if the Solaris Partition is not active.
  8. Dump a copy of the MBR to a file: dd if=/dev/dsk/c[...]p0 of=/solmbr bs=512 count=1
  9. Plugin the USB Key and copy the file solmbr to your USB Key
  10. Boot into the GParted/QTParted CD and remove the boot/active flag from the Solaris Partition and enable the boot/active flag for the Windows Partition.
  11. Now you need to restore the MBR backup you had taken in step #5. Boot again into BeleniX, insert the USB Key having the mbrback file and execute the following: dd if=/path/to/mbrback of=/dev/dsk/c[...]p0 bs=446 count=1. Note the bs=446. You need to only restore the Vista bootloader. If you restore the entire MBR you will lose the partition info for the Solaris Partition!
  12. Reboot and this time it should boot directly into Windows Vista
  13. Copy the file solmbr from the USB Key to C:\
  14. Now you have to use bcdedit.exe. But before you can use that you need Administrator rights. So in start menu right-click on the Command Window entry and select "run as Administrator" option.
  15. Execute the following in the command window:
    bcdedit /enum all | find "{ntldr}"
    If this command returns: identifier {ntldr}, that means you already have a legacy boot loader in your system. Do the following:
    bcdedit /copy {ntldr} /d "Solaris Express"

    This should display a message similar to:
    The entry was successfully copied to {bcfa924e-07e0-11db-9d86-accf6fd346a1}

    You need to use the long GUID value from the above message in the following commands wherever {GUID} is mentioned:
    bcdedit /set {GUID} device boot
    bcdedit /set {GUID} path \solmbr
    bcdedit /displayorder {GUID} /addlast

    If the earlier find command did not return any entry, you need to do the following to create a new legacy bootloader:
    bcdedit /create {ntldr} /d "Solaris Express"
    bcdedit /set {ntldr} device boot
    bcdedit /set {ntldr} path \solmbr
    bcdedit /displayorder {ntldr} /addlast

  16. Finally reboot your system and if everything is hunky dory you will get multiple boot options from the Vista Bootloader

另外,有人讲EasyBCD也可以解决这个问题,摘录一个地址先:http://neosmart.net/blog/2006/easybcd-151-released/


发表评论:

Powered by emlog sitemap