Multi-booting Solaris x86 and Windows NT

This page is supposed to give you some ideas on how to install both Windows NT workstation (these notes might equally apply to Windows 2000 and XP, however) and Solaris 7/x86 (or possibly subsequent versions).

Here at the Robert Gordon University, we recently installed a lab of Intel based PC's which were to be set up in a dual-boot configuration, running both Windows NT and Solaris x86. However, there were a few hurdles to be overcome. We wanted a very simple menu-based system for the users to select an OS from. Unfortunately, the Solaris boot loader is not particularly friendly, so we considered using the NT boot loader. This requires the NT partition to be active, which means that Solaris can't load unless it is on a different disk (Solaris was installed on a primary partition on the only disk in the PC).

As a result, I scoured the web for some info, and found out about a boot loader referenced in the Solaris x86 FAQ called OS Boot Select. With this installed, I was able to set up a boot loader selecting between Solaris and NT. The setup for this is very simple, being menu based, although you do require a DOS boot floppy with OS-BS on it. Make sure that you enable the setting of active partition so that Solaris will boot or set the Solaris partition to active.

According to the documentation, the loader resides in sectors 1, 2, 3, 4 and 5 of the the first track. To copy this between multiple machines (or put in a jumpstart profile), simply type:

    dd if=/dev/dsk/c0d0p0 of=[FILE] bs=512 count=5

replacing [FILE] with some file name. Note that this is for an IDE drive. Copy the file to the next machine (or share it with NFS) and then type:

    dd of=/dev/dsk/c0d0p0 if=[FILE] bs=512 count=5

Be careful with this command! Also note that you may have to disable and MBR virus protection in the BIOS to allow this to work.


With the loader set up, rebooting produced a menu which allowed me to select either Solaris or NT. However, selecting either caused a second OS selection menu to appear, either Solaris's boot loader or the NTLDR menu. Both can be disabled by setting the timeout to zero, although NT's is easier to set.

NT

To set the timeout to zero, simply edit C:\boot.ini and set timeout to 0; then save the file (NB: you have to remove the 'read only' flag first, and you probably want to set it once you've finished).

Solaris

Disclaimer: This involves some low-level disk editing. Be very careful of how you type the commands and have backups of any important data!! I take no responsibility for damage to your systems. That said, this has caused no problems for myself.

In order to remove the timeout, you have to modify part of the boot loader which does not exist in any filesystem which would be easy to edit.

The exact data is in /dev/rdsk/c0d0s2 (for IDE; this is untested under SCSI where it would be /dev/rdsk/c0t0d0s2) at offset 0x10B8. Firstly grab the relevant block by typing:

   # dd if=/dev/rdsk/c0d0s2 of=[FILE] iseek=8 bs=512 count=1

replacing [FILE] with some temporary filename. Then edit the file with a hex editor and at offset B8 of this file (we've skipped the first 0x1000 bytes using iseek), you should find a section with 46EE 1E00. 1E00 is 30 in hex (remember we're little-endian), so replace this with 46EE 0000 and save the file. Next type:

   # dd of=/dev/rdsk/c0d0s2 if=[FILE] oseek=8 bs=512 count=1

This is the command you have to be careful with! If you mess this up, you could render Solaris unbootable or wipe out valuable data.

With this done, you should reboot to test that this has indeed worked.

File last modified: Saturday, 06-Mar-2004 14:12:08 GMT