NAME

Win95 and Linux - Dual-booting and other issues.

Note: This document was written in 1997. A better document is at Dual booting.


Win95 and Linux

Win95 you know, or you think you do...

Linux is a freely redistributable version of Unix.


Note

This is not an installation guide as such. It is a discussion of topics which arise before and during installation of Win95 and Linux.

Before installation, you should check the (Slackware) CD-ROM files /docs/mini/Linux* and /docs/mini/Win*. The file names are like Linux+Win95 and Win95+Win+Linux.

You should also look in /docs for files like SCSI-HOWTO. During installation this file is compressed and put in /usr/doc/faq/howto/SCSI-HOWTO.gz.


Distributions and Versions

It's much easier to buy CD-ROMs of Linux than to download it, but be assured, downloading it is possible.

A distribution of Linux is Linux itself, together with a collection of supporting software. The 3 most well-known distributions are from Debian, RedHat and Slackware. Each offers the same or similar versions of Linux, but different collections of extras. I use Slackware, from the Volkerding book (see list at end). The CD-ROMs which come with this book are in ISO-9660 format, and are thus readable under DOS and Win95.

Versions has 2 meanings. Clearly over time Linux itself gets upgraded. These are versions.

But also, CD-ROMs come with 30 or so versions, which are cut-down versions of Linux designed to boot from floppy or CD-ROM, and which thereby enable you to install Linux. These are 'boot kernels', rather than versions. They are all built from the same basic version of Linux.

For the record, you choose a boot kernel and copy it to floppy with a program called RAWRITE, while preparing to install Linux. Thus you must choose a boot kernel appropriate to you hardware.


Win95A and Win95B

Maybe Win95 is not so clear after all. There are at least 2 versions available, altho these days (June 97) if you buy a new PC from a shop, you can be pretty sure Win95B is installed.


FAT32

Some Win95 programs ask: ``Enable large disk support?'' This means support for 32-bits-per-entry File Allocation Tables (FATs). This is colloquially known as FAT32, rather than as large disk support. FAT32's advantages are:

        1. More efficient support of hard disks in general. In practice this means
                allowing disk clusters to be 4K bytes in size.
        2. Support for allowing drives > 2 GB to be a single partition. Partitions are
                discussed below.

Of course, when this question is asked, you may say no. Or, you may say yes but never actually use any of the FAT32 features. In other words, just because you're running Win95B doesn't mean FAT32 support has been utilized.


Which Win95?

Currently, I know of 4, possibly 5, ways to tell which version of Win95 is running.


Dual-boot

Dual-booting means that, as part of the boot process, some program runs and gives you a menu, from which you can choose the operating system you wish to boot.

Actually, it is not just a dual-boot facility, it is a multi-boot facility. Here I'll concentrate on the dual-boot situation.

Win95 has a dual boot facility, implemented via CONFIG.SYS. Linux has one too, implemented via LILO (the LInux LOader).


WinNT 3.51

If you wish to include WinNT 3.51 in all this, start by reading the dual boot FAQ listed at the end.

I don't discuss WinNT further. Also, my document is not derived from this other one in any way.


Using CONFIG.SYS

The emormous advantage of this choice is that you KISS - Keep It Simple, Stupid.


Using LILO

The disadvantage of LILO is that it overwrites part of the Master Boot Record (MBR) in your primary (DOS) partition.

Sometimes this process of adding LILO doesn't work, and you need to recreate the MBR with this DOS command: C:\>fdisk /MBR

Unfortunately, sometimes this recreation doesn't work, and you can't boot from that hard disk. Thus you need to fall back on bootable floppies.

Because of this complexity and risk, I do not discuss LILO further.


My CONFIG.SYS

        [menu]
        menuitem=Win95
        menuitem=Linux
        menudefault=Win95,10

        [Win95]
        device=C:\VIDE-CDD.SYS /D:MSCD001

        [Linux]
        shell=c:\loadlin\loadlin.exe c:\loadlin\bzimage root=/dev/sda2 ro vga=3 aha152x=0x340,0xb,7,1

Yep, that's all I need. 8 measly lines.

The ``Win95,10'' says to boot Win95 if there is no keyboard activity for 10 seconds. IE you have 10 seconds to choose an OS before Win95 - which has already started - chooses itself.

Some of the magic numbers on the LoadLin line are explained below. The last part, ``aha152x...'' is required because I have a old SCSI controller as well as an IDE controller. If you only have IDE, you don't even need that.


Disk Partitions

Well, a great deal could be written about partitions, and has been. See Volkerding's book, pp 67, 72. See also Messmer's book, p 445. I shall keep it simple.

Hard disks and partitions have names. Under DOS and Win95 these names are C:, D:, etc. Simple!

Under Linux (and other Unixes) drives have names, and partitions have names too, based on the drives' names.

IDE drive names (under Linux) are /dev/hda, /dev/hdb, etc. For SCSI drives the names are /dev/sda, /dev/sdb, etc. Clearly, hda stands for Hard Disk A, sdb stands for SCSI disk B, and so on.

Linux-style partition names per drive are - for IDE drives - /dev/hda1, /dev/hda2, etc, /dev/hdb1, /dev/hdb2, etc. For SCSI drives, these partition names are /dev/sda1, etc.

Since PCs can have both an IDE controller and a SCSI controller, /dev/hd? and /dev/sd? are how we refer to separate devices.

For manipulating partitions, the definitive program is PartitionMagic. However, my setup - 1 IDE drive with 1 partition and 1 SCSI drive with 2 partitions - is so simple I have no need to use PartitionMagic.

This is a big hint. If you're game, a great deal can be achieved without third-party software.


Primary Partitions

The primary DOS partition is the partition containing the files (IO.SYS, MSDOS.SYS and COMMAND.COM) needed to boot DOS. This is C:. Primary partitions cannot be divided into logical drives.

Any hard disk in a PC can have a primary partition, not just the first hard disk.

Because of the fixed size of the partition table (64 bytes), there can be at most 4 primary partitions on any given drive. If there were 4, they would be called C:, D:, E: and F:, assuming they are on the first hard disk.

If you want more that 4 partitions on 1 hard disk, some need to be extended partitions. Remember, you don't have to have 4 primary partitions, but you can have up to 4.

This limit of 4 explains why, under Linux, primary partition names - for the first hard disk - range from /dev/hda1 to /dev/hda4, and why logical partition names must start from /dev/hda5.


Active And Bootable Partitions

If a partition is marked as active, it can be booted from. Only primary partitions can be marked active.

Use DOS's or Linux's fdisk program to display partition tables, wherein you will see some partitions marked as active.


Extended Partitions

An extended partition is a non-primary partition. There can only be 1 extended partition per drive. The major difference is that extended partitions can be sub-divided.

Thus an extended partition could be (contain) D:, or it could be D: and E:, or ...


Logical Drives

Logical drives are the names, C:, D:, E:, etc, used to refer uniformly to primary partitions and the parts of extended partitions.

If, under Linux, the first SCSI drive (/dev/sda) contained a primary partition and an extended partition, and the latter contained 2 logical drives, then:

        1. The primary partition would be /dev/sda1
        2. The logical partitions would be /dev/sda5 and /dev/sda6


Mixing DOS and Linux

Yes, you may have DOS and Linux partitions on the same hard disk. I do, as explained next.


A Real PC

I have 2 hard disks. The first can be described thus:

        1. It is an IDE drive
        2. It contains 1 partition
        3. This partition is 1 logical drive, called C:

The partition C: can be described thus:

        1. C: is a primary partition
        2. C: is active, ie bootable
        3. C: was partitioned and formatted when I installed Win95
        4. C: contains Win95
        5. C:\CONFIG.SYS contains Win95 commands which active a bootable kernel
                of Linux, which is stored in C:\LoadLin. This directory is created
                when you PKUnzip LoadLin from the Slackware CD-ROM. See Volkerding, p 97

The second hard disk can be described thus:

        1. It is a SCSI drive
        2. It contains 2 partitions
        3. These partitions are 2 logical drives, called D: and /dev/sda1

The partition D: can be described thus:

        1. D: is a DOS partition
        2. D: is an extended partition
        3. D: was created by C:\>fdisk under Win95
        4. D: was formatted by C:\>format D:/S under Win95
        5. D: contains a bootable DOS system, in case I take C: out of the PC,
                in which case D: will become C:

The partition /dev/sda1 can be described thus:

        1. /dev/sda1 is a Linux partition
        2. /dev/sda1 is an extended partition
        3. /dev/sda1 was created by fdisk under Linux
        4. /dev/sda1 was formatted by setup under Linux
        5. /dev/sda1 contains Linux.


Preparing For Linux

When installing Linux, especially with SCSIs, you may need technical information on your hardware.

Win95 can provide all of this information. Try this now (it's quite harmless):

         1. Double click on My Computer
         2. Double click on Control Panel
         3. Double click on System
         4. Single click on Device Manager
         5. Single click on +Hard disk controllers
         6. Single click on Primary IDE controller (if you have one!)
         7. Single click on Properties
         8. Single click on Resources
         9. Scroll around the upper window
        10. Learn heaps about your system by proceeding in a like fashion over
                all Device Manager options. The thing to look for is the all-important
                Resources tab

What does point 9 say? Something like ``Interrupt Request 14'', I guess. Now you know your hard disk controller - if it's IDE - uses IRQ 14. Simple!

Thus you can document your hardware at the lowest accessible level. On our web site you'll find a large document where you can fill your parameters. This document is pre-filled with those values expected on a 'typical' PC.

In the case of SCSI hardware and Linux, it is utterly vital you make some such record, since the feature within Linux which automatically probes hardware to determine these parameters, is not perfect. In other words, when you boot Linux, you must beat it over the head occasionally with parameters specific to your hardware. An example appears below.

Further, you can download from the web programs which will display technical reports about SCSI hardware. These programs correspond to the Microsoft Diagnostics program MSD.

Speaking of which try this now (it's quite harmless):

        1. Open an MSDOS window
        2. Run C:\Windows>msd
        3. Learn heaps about your system by moving around the menus

For these SCSI programs, try Adaptec at the addresses below. Look for win152x.exe. This is a self-extracting file which contains showscsi.exe and win1520.exe, and readme.txt. One shows the SCSI hardware chain from disk (target 0) to controller (target 7). The other displays an image of an AHA 1520/1522 controller. As you make various selections, eg change a memory address from D000 to D800, the image changes jumper settings. This tells you how to jumper your card to achieve the selected options. Fantastic!


A Tale Of 2 SCSIs

I am familiar with SCSI hardware in 2 PCs. In both cases the SCSI controller is allegedly an AHA 1520/1522. But they are different!

When these PCs boot, the BIOSs on the SCSI controllers output these messages:

        1. Adaptec 1520/1522 BIOS Version 2.00f
        2. Adaptec AIC-6360 BIOS Version 1.20L

Look closely at these cards. Hmmm. Beside the BIOS chips, which stick up quite high out of the cards, these is on each card a very low, square chip with a sticker on it. The stickers have dates on them:

        1. AHA 1522 1991
        2. AHA 1522B 1993

Also, the cards have writing on them in white paint, which says:

        1. AHA 1520/22
        2. AHA 1510/1520/1522

I'll be referring to these numbers - 1 & 2 - below.

The document SCSI-HOWTO, mentioned above, says this:

        ISA bus cards: AIC-6260, AHA 1510/1520/1530
        VLB bus cards: AIC-6360


So?

This matters because of the boot kernel you choose while installing Linux. On the Slackare CD-ROMs, there is a boot kernel called aha152x.s, tailored for AHA 1520-type controllers. The .s is for SCSI. Also available is scsi.s, a generic SCSI controller-managing boot kernel.

Boot kernels probe the hardware, trying to auto-configure themselves.

But this aha152x.s sometimes fails to identify the card # 1. Even worse, sometimes even when you give this boot kernel command line parameters, it fails. scsi.s also fails - sometimes - to automatically recognize the card. However, scsi.s responds to a command line parameter.

With regard to the other PC, aha125x.s sometimes fails to identify card # 2. scsi.s has so far always automatically identified the card (the newer AIC-6360).

This is all very confusing, and a bewildering introduction to Linux.

When a boot kernel starts, it outputs a 'boot:' prompt and pauses. At this point you can enter parameters to control the boot process. For a AHA 1520/1522 card, a typical parameter is: aha152x=0x340,0xB,7,1.


Linux Boot Command Line Parameters

These are well documented in Welsh's book, but not in Volkerding's. However, on the CD-ROMs which came with the latter, there is a file called \booting.txt. This partially documents the required parameters, but not the values you need. This is appalling.

The 4 values are, with defaults for an AHA 1520/1522 controller in []:

        1. IO address used by the controller [hexadecimal 340]
        2. The interrupt (IRQ) used by the controller [hexadecimal B]
        3. The SCSI ID aka target of the controller [7]. This is logical, if not
                rational. Linux, like all OSs, talks to the controller, and the
                controller talks to the hard disk. Thus the value is not the ID
                of the hard disk. This is a killer. When trying to install an OS
                on a hard disk, I am totally focussed on the hard disk. To switch
                to the controller's ID was something I simply didn't of until a friend
                read out parts of Welsh's book over the phone
        4. The reconnect=enable option [1]. What? Don't ask me. Just use 1

The values for 1 and 2 are those you wrote down earlier, when I explained how you ask Win95 for them. See the section Preparing for Linux, above.


Books

Linux Configuration and Installation. Patrick Volkerding, Kevin Reichard and Eric F. Johnson. MIS Press. 1-55828-492-3. Slackware on 2 CD-ROMs. Mr Volkerding monitors the internet news group comp.os.linux.setup, and has kindly replied to one of my posts, by emailing me directly.

Running Linux. Matt Welsh and Lar Kaufman. O'Reilly & Associates. 1-56592-100-3.

The Indispensable PC Hardware Book. Hans-Peter Messmer. Addison-Wesley. 0-201-62424-9.


Linux Info

        http://www.jnpcs.com/mkb/linux.
        http://www.mkb.home.ml.org/linux.
        ftp://sweet-smoke.ufr-info-p7.ibp.fr/public/Linux.


Linux C++ GUI

        http://www.troll.no.


Dual-booting WinNT

        http://ledoux.arbld.unimelb.edu.au/~agoon/windows/dualboot.html.
        http://www.owlnet.rice.edu/~sedmison/directboot.html.


SCSI Info

        ftp://ftp.adaptec.com/pub/BBS/dos.
        http://www.adaptec.com.
        http://www.ultranet.com/~gfield/scsi. Download scsi-faq.part1.txt, and part2.
        http://theref.c3d.rl.af.mil/theref.html.


Zip Drives

        http://www.torque.net/zip.html.
        http://www.iomega.com/support/techs/zip.
        http://comp.uark.edu/~jwiggins/linuxZIP.

No, I haven't tested my Zip drive under Linux yet... But if you download Tech Notes 2036 or 2037 from the Iomega site, they say these drives are compatible with the AHA 1520/1522 SCSI controller, amongst others.

Author

Ron Savage.

Home page: http://savage.net.au/index.html

This POD was converted to HTML by /Perl.html#fancy-pom2.pl

Licence

Australian Copyright © 2002 Ron Savage. All rights reserved.

	All Programs of mine are 'OSI Certified Open Source Software';
	you can redistribute them and/or modify them under the terms of
	The Artistic License, a copy of which is available at:
	http://www.opensource.org/licenses/index.html