RedHat Linux/Windows NT Dual Boot

This document describes the steps I should have taken to set up a SCSI machine dual boot Redhat 5.0 and Windows NT.  In order to find this document useful, you should be a literate Linux administrator.  In short, you will:  fix a setting in the SCSI card, partition the disk, install NT, and install Linux.  NT must be installed first, because it will overwrite the master boot record, and get rid of the Linux loader.  It's preferable to have the Linux loader installed rather than the NT loader because it's easier to set up Linux to boot NT, than vice versa.
  1.  Preparing the Hardware
  2.  Partitioning the Disk
  3.  Installing NT
  4.  Installing Linux
  5.  Setting up LILO
  6.  Compiling an SMP Kernel

Preparing the Hardware

The important thing to know is that "Extended BIOS Translation" must be disabled in the SCSI adapter.  Unfortunately the Dell machines we got come with this option enabled.  On the Adaptec 2940 this can be done using the card BIOS.  Go into the BIOS by pressing "Ctrl-A" when prompted at boot up.  Find this evil option (maybe in the advanced settings) and turn it off.

Extended BIOS Translation somehow allows all of a large (greater than 1Gb) SCSI disk to be available to BIOS.  This is only important for DOS, because 32-bit operating systems do not use BIOS to access the disks.  With this option enabled, any partitioning done from Linux will write an "invalid" partition table, and make the machine unbootable.  I think it also makes Linux unable to reliably read the partition table.  The only drawback of disabling this feature is that all bootable partitions must be on the first gigabyte of the drive.  More on this in the next section.

Changing this setting will make the machine unbootable, and require you to reinstall Windows NT.  I was told that it is a good idea, but not essential to do a low-level format of the disk after changing this parameter.  This can also be done from the SCSI card BIOS, and it took about 2.5 hours.

Partitioning the Disk

The disk can be partitioned from the RedHat install procedure.  We don't have a RedHat 5.0 CD at the moment.  However, I did download a distribution into hades:/usr/redhat.  You also need the "boot disk" and the "supplemental disk".  These are on the bookshelf in the Unix Admin room.  While you're there you might also want to get the NT CD and the three NT setup disks. I used fdisk rather than the RedHat "Disk Druid" utility, because it seemed to have some problems.  On hades, I partitioned the disk as follows:
 
Unix Device Size Filesystem Mount Point
/dev/sda1 500Mb NTFS C:
/dev/sda2 100Mb Linux /
/dev/sda3 127Mb Linux Swap none
/dev/sda4 rest of disk extended (virtual) partition
/dev/sda5 3Gb NTFS D:
/dev/sda6 3Gb Linux /usr
/dev/sda7 1.8Gb (rest of disk) FAT /mnt/dos(?), E:
The things to remember here are:

Installing NT

Installing NT is not very difficult.  Just boot with the first setup disk and follow the directions.  Don't partition anything.  Install NT on the 500Mb partition.  Make sure to tell it to use NTFS instead of FAT.  Make absolutely sure to remove the disk and CD whenever it says to because not doing so can cause the install procedure to fail.

When you get to the networking part, you can remove all the protocols/services that refer to "Netware" or "IPX".  We don't do IPX in DGP.  You have to explicitly add the TCP/IP protocol.  It will ask if you want to use DHCP.  You don't.  We set up addresses for the machine names elf, van, and jstewart (you can check them with ping).  Remember that the gateway is 128.100.4.1, and the netmask is 255.255.255.0.  The primary and secondary name servers are 128.100.4.1 and 128.100.4.15.   When it asks for a "workgroup" or "domain", put "DGPLAB".

Once NT is installed, you can configure some things.  To make use of your cool graphics card, download the WinNT 4.0 drivers from the  Elsa Web Site .  The card is a Gloria-XL.  In order to unzip it, you can download WinZip from the local Win95 machine called Penn.  Click on the Network Neighborhood icon, and find the share called "downloads" on the machine Penn.  There's a file called winzip.exe there.  Run it to install WinZip.

Installing Linux

Remarkably, installing most of the RedHat packages only takes about 5 minutes over FTP.  Some notes about the RedHat install procedure: After you get Linux installed, there is a script called "install_redhat_root" to mount NFS partitions, set up accounts, and so on.  Contact Alan for more details.

Setting up LILO

As stated earlier, I decided to use LILO rather than the NT Loader to boot the machine.  Before rebooting the machine after installing, make sure that both the Linux and the NT partitions are mentioned in the file /etc/lilo.conf.  You can do this by pressing "Alt-F2" and logging in on a different virtual console.  The config file should look something like this:
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
root=/dev/sda2
image=/boot/vmlinuz-2.0.32
        label=linux
        initrd=/boot/initrd-2.0.32.img
        read-only
other=/dev/sda1
        label=WinNT
        table=/dev/sda
If you change it, remember to run "lilo" to install it.
 

Compiling an SMP Kernel

This section is kind of sketchy.  In order for Linux to use both processors, you have to compile an SMP kernel.  I downloaded the source for 2.0.33.  It's in ~tkarkani/download.  There's an SMP.txt in the Documentation directory.  Essentially, you just configure it as usual, and then edit the Makefile and uncomment the "SMP = 1" line.  It seems to be fairly stable on hades.  When configuring the kernel, remember to add PS/2 mouse support.  You should maybe configure LILO so that you can load either kernel.  Have a look at hades:/etc/lilo.conf.