Dual Booting Windows 95/98/NT and Linux

It is possible to have Windows 95 or 98, Windows NT Server and/or Workstation, and Linux peacefully coexist on a single hard disk.

Sample configuration:

Installation steps:

  1. Boot with a MS-DOS or Windows 95 floppy.

  2. Run FDISK.  If you are using Windows 95, do not enable large drive support.

  3. Create a 600-800 MB (FAT16) Primary partition and make it active.

  4. Install Windows 95 on drive C: (FAT16).

  5. Install Windows NT Workstation on drive C:.  It will detect 95 and add a "Microsoft Windows" entry to its boot menu.

    You can use the Windows NT Disk Administrator to create one or more NTFS partitions.

  6. Boot Windows 95 and press F8 to get to the command prompt (don't load the GUI).  Make sure that your CD-ROM drivers (including MSCDEX.EXE) are loaded.

  7. Insert your Linux installation CD-ROM.

  8. Make a C:\LINUX directory.

  9. Copy the LOADLIN.EXE program and select the appropriate kernel image.

    (assuming your CD-ROM is D:)
    D:\KERNELS\BARE.I\BZIMAGE IDE hard disk/CD-ROM without networking.
    D:\KERNELS\NET.I\BZIMAGE IDE hard disk/CD-ROM with networking.
    D:\KERNELS\SCSI.S\BZIMAGE Generic SCSI support without networking.
    D:\KERNELS\SCSINET.S\BZIMAGE Generic SCSI support with networking.
    D:\KERNELS\*.S\BZIMAGE Support for various SCSI adapters.

  10. With Slackware 3.5, you also need to copy the installation root disk image: (assuming your CD-ROM is D:)

    D:\ROOTDSKS\COLOR.GZ
    
  11. You can write a batch file called INSTALL.BAT that starts the Linux installation:

    loadlin bzimage root=/dev/ram initrd=color.gz load_ramdisk=1 rw
    
  12. Using the Linux fdisk program, create at least one "Linux native" (type 83) and one "Linux swap" (type 82) partition.

    For example:

    The following fdisk output shows a large hard disk (actually a Western Digital Caviar 6.4 GB) partitioned with:

    The mount points are shown below (system also contains a 4.3 GB SCSI hard disk running Windows 95 [I know... what a waste!])

    Script started on Tue Sep 21 22:32:42 1999
    dogbert:~# fdisk /dev/hdc
    
    Command (m for help): p
    
    Disk /dev/hdc: 255 heads, 63 sectors, 784 cylinders
    Units = cylinders of 16065 * 512 bytes
    
       Device Boot   Begin    Start      End   Blocks   Id  System
    /dev/hdc1   *        1        1       98   787153+   6  DOS 16-bit >=32M
    /dev/hdc2           99       99      326  1831410    7  OS/2 HPFS
    /dev/hdc3          327      327      784  3678885    5  Extended
    /dev/hdc5          327      327      365   313236    7  OS/2 HPFS
    /dev/hdc6          366      366      565  1606468+  83  Linux native
    /dev/hdc7          566      566      763  1590372   83  Linux native
    /dev/hdc8          764      764      784   168682+  82  Linux swap
    
    Command (m for help): q
    
    dogbert:~# mount
    
    /dev/hdc6 on / type ext2 (rw)
    /dev/hdc7 on /usr/local type ext2 (rw)
    /dev/hdc1 on /dsk/C type vfat (rw)
    /dev/sda1 on /dsk/D type vfat (ro)
    /dev/sda5 on /dsk/E type vfat (ro)
    /dev/sda6 on /dsk/F type vfat (rw)
    none on /proc type proc (rw)
    
    dogbert:~# exit
    exit
    
    Script done on Tue Sep 21 22:32:54 1999
    
  13. When installing Linux, DO NOT INSTALL LILO (the Linux loader, since you won't need it).  Doing so, especially in the Master Boot Record (MBR), will likely disable Windows 95 and NT.

  14. Next you can create a batch file to boot Linux from Windows 95 DOS (but not from a Command Prompt window or from Windows NT), called LINUX.BAT:

    C:\linux\loadlin c:\linux\bzimage root=/dev/hdc6 ro
    
  15. You can also modify your Windows 95 CONFIG.SYS and AUTOEXEC.BAT files to allow you to boot Linux directly (see below, required additions are shown in blue).

    Sample CONFIG.SYS

    [MENU]
    MENUITEM=Linux, Boot Linux
    MENUITEM=WIN, Start Windoze 95 (GUI mode)
    MENUITEM=DOS, Start Windoze 95 (DOS mode)
    MENUDEFAULT=Linux,10
    
    [Linux]
    FILES=30
    
    [WIN]
    FILES=60
    DEVICE=C:\BOOT\SCSI\ASPI8XX.SYS      
    DEVICE=C:\BOOT\SCSI\SYMCD.SYS /D:OEMCD001
    SHELL=C:\4DOS\4DOS.COM C:\4DOS /E:32000 /P
    
    [DOS]
    DEVICE=C:\WIN95\HIMEM.SYS
    DEVICE=C:\BOOT\RAMDRIVE.SYS 8192 /E
    DOS=HIGH,UMB
    FILES=60
    DEVICE=C:\BOOT\SCSI\ASPI8XX.SYS      
    DEVICE=C:\BOOT\SCSI\SYMCD.SYS /D:OEMCD001
    SHELL=C:\4DOS\4DOS.COM C:\4DOS /E:32000 /P
    

    Sample AUTOEXEC.BAT

    @ECHO OFF
    GOTO %CONFIG%
    
    :Linux
    c:\linux\loadlin c:\linux\vmlinuz root=/dev/hdc6 ro
    
    :DOS
    PROMPT $P$G
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;c:\bin;C:\UTIL;C:\4DOS
    C:\WIN95\MSCDEX.EXE /D:OEMCD001 /L:F       
    SET NAME=mike
    SET HOME=c:/home
    SET TEMP=C:\TMP
    SET TMP=c:/tmp
    SET TMPDIR=c:/tmp
    SET TZ=EST5EDT
    SET BLASTER=A220 I7 D1 T2
    C:\UTIL\QT
    VER
    GOTO END
    
    :WIN
    PROMPT $P$G
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;c:\bin;C:\UTIL;C:\4DOS
    C:\WIN95\MSCDEX.EXE /D:OEMCD001 /L:F       
    SET NAME=mike
    SET HOME=c:/home
    SET TEMP=C:\TMP
    SET TMP=c:/tmp
    SET TMPDIR=c:/tmp
    SET TZ=EST5EDT
    SET BLASTER=A220 I7 D1 T2
    C:\UTIL\QT
    VER
    WIN
    
    :END
    

Back to Mike's Linux page