How can I use MS Windows' NT/2K Loader to boot Solaris/x86?

How can I use MS Windows' NT/2K Loader to boot Solaris/x86?

The general idea is that you copy the first sector of your native root
Solaris/x86 partition into a file in the DOS/MS Windows NT/2K partition.
Assuming you name that file something like c:\bootsect.sun
(inspired by c:\bootsect.dos)
you can edit file c:\boot.ini
(after saving boot.ini to boot.old):
to come up with something like this:



[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT"
multi(0)disk(0)rdisk(1)partition(1)C:\BOOTSECT.SUN="Solaris/x86"
C:\="DOS"


The "multi(0)" means that it's an ATAPI drive and so for the ATAPI drives,
the "disk(0)" is ignored.
The "rdisk(1)partition(1)" means Solaris is on the first partition of the
second drive on the first IDE channel.


This procedure assumes that DOS and NT have been installed onto the first
ATAPI disk and Solaris/x86 or whatever have been onto the second disk
(use scsi(0) and place the SCSI ID in disk(x) for SCSI drives).
Note that in order to use the Windows NT boot loader, the NT partition must
be the active boot partition. Solaris/x86 must also be the active boot
partition, so must reside on another disk (This may be another reason
to use a commercial product, System Commander--see question below).


In Solaris,
mount a DOS-formatted floppy (if you've converted C: to NTFS, which isn't
readable from Solaris/x86) or a HD FAT partition (see question below),
under, say, /mnt. Type:



dd if=/dev/rdsk/c0d0p0 of=/mnt/bootsect.sun bs=512 count=1
# (Note: The above is for ATAPI; use /dev/rdsk/c0t0d0p0 for SCSI.)



If the Solaris partition is on a separate drive (as in this example),
you need to modify file bootsect.sun to tell it the boot drive.
The instructions below are for Solaris 7 or earlier

The bootsect.sun code assumes the drive ID is preloaded into the
x86 DL register before the bootsect.sun is executed.
This is done by the BIOS, but not the NT loader.
The easiest way to fix this is to modify the bootsect.sun code with a
binary file editor.
The first instruction is a jump
over the next 4 bytes, the ASCII version ID ("P2.0" in this case).
Use a binary editor to
overwrite this with a
"MOV DL,0x81" instruction and some NOPs.
I.e., I changed the first six bytes in my bootsect.sun from
"eb 04 50 32 2e 30"
to "b2 81 90 90 90 90"
(in hex)
and saved it in file bootsect.sun.
Another person's bootsector began with eb 79 . . .
and he changed the first 4 bytes to b2 81 eb 77 to get it to work.
Some useful drive IDs are: 0x00 for the floppy drive, 0x80 for the
1st hard drive, and 0x81 for the 2nd hard drive.


Reboot into NT.
Copy the bootsect.sun file from the floppy to C:\, if you haven't done so yet.
Modify the DOS/NT attributes (permissions) on boot.ini with:



attrib -s -r c:\boot.ini


Edit to add the appropriate entries from the example boot.ini above,
and restore the system and read-only file attributes:


attrib +s +r c:\boot.ini



An alternative to the Solaris "dd" command above is to
use the "postcard-ware" program BootPart 2.2 from

http://www.winimage.com/bootpart.htm
.
E.g.,
the following displays the partitions, then
creates a boot sector file bootsect.sun and adds "Solaris" to the NT
loader menu. Edit bootsect.sun as above.



C:> bootpart.exe
C:> bootpart.exe 1 bootsect.sun Solaris


[Thanks to Krejcarek Brian Grant, Louis Lam, Matt Gillen, and Indego Thorn]





Home
FAQ