From stsmith@ll.mit.edu Fri Oct 29 11:41:41 1999
Date: Fri, 29 Oct 1999 11:24:26 -0400
From: Steven T. Smith 
To: Steven T. Smith 
Subject: RedHat Linux 6.1 / X Windows / MS Windows on Gateway Solo 9300 Laptop 

I recently installed Redhat Linux 6.1 on a Gateway Solo 9300.  To
accomplish this I obtained much help from others and over the
web. I've provided an outline of my experience in case it is useful to
others.

Though installing and maintaining RH Linux 6.1 is somewhat involved on
a laptop, Linux is a very well designed, robust, and sophisticated
operating system.  It does not suffer from frequent freezing and
crashing.  It can multitask transparently.  It runs Star Office,
Emacs, TeX, GNU compilers and tools, and other free high quality products.
It is itself free.


Setup: Linux and MS Windows, until such time when latter becomes superfluous.


Step 0.  Ground zero.
Laptop comes bundled with MSWin98.  Make sure that Gateway's
Restoration CD, MSWin98 CD, Office2K CD are all at hand because a
reinstall of all these may be necessary.  Backup anything else in
anticipation of loss of all disk partitions.  Also, at boot, hit F2 to
enter BIOS setup and set the boot configuration so that the CD has
higher boot priority than the hard drive.


Step 1.  Partition hard drive.
Use Partition Magic 4.0 (available from http://www.powerquest.com/) or
FDISK or any other disk tool to repartition the hard drive.  I chose
the relatively simple setup of:

   MS Windows:	3GB	FAT32             Primary partition
   Linux Share:	1GB	FAT16          \
   Linux Root:	5.25GB  Linux Ext2     |  Extended partition
   Linux Swap:  Fixed   Linux Swap     /

To use PM4.0 to accomplish this, do the following:

   A. Create 3072 MB FAT32 primary partition at beginning of memory.
   B. Create extended partition over rest.
   C. Create Linux Swap logical partition at end of memory.
   D. Create 1024 MB FAT16 logical partition at beginning of memory.
   E. Create Linux Ext2 logical partition over rest at beginning of memory.

One can set up a more sophisticated disk partition to address a
variety of robustness and security concerns, but I did not view these as
important for a laptop.

Make sure that MS Win still boots off the HD; if you lost it, you must
reinstall *before* Linux because, as a colleague puts it, "MS appears
unfriendly towards other operating systems."  If it's gone, see
comments below for a reinstall.


Step 2.  Install Linux.
Boot from a Redhat Linux 6.1 CD (http:/www.redhat.com).  Install using
text mode (you'll need to adjust screen parameters that make a
graphical install difficult at this step).  Select "Custom install".
Work through install prompts.  When queried for a mount point, enter
`/' [a single forward slash] for your Linux root partition
(`/dev/hda6' if partition above is used).  By the way, I noted that
many packages I like (TeX, emacs, documentation, etc.) we're not
selected by default in the install script; I made sure to select all
the packages I wanted.  Make sure you remember you're root password --
you'll need it of course.  If you want to be able to boot Windows,
make sure you tell Linux the partition it lives on (`/dev/hda1' if
partition above is used).


Step 3.  Boot Linux
Remove the Linux install CD (and change your BIOS setup so that you're
system no longer boots from the CD before the HD, see Step 0), and
boot from the HD.  After BIOS is done running (the `Hit F2 for setup'
goes away), you'll get a LILO prompt.  Doing nothing boots Linux after
5 seconds.  Hitting TAB shows your options, which will probably be
`linux' and `dos' (if you asked for dos in Step 2).  Typing either
will boot either.


Step 4.  Getting X windows to work.

*WARNING* Getting this step wrong may permanently damage your screen.
*WARNING* If you're going to err, err on the side of choosing low
*WARNING* refresh rates.  If you're worried about this, do not
*WARNING* proceed and read more over the web or contact an expert.

For the Gateway Solo 9300, getting this right was a matter of
applying advice gleaned over the web from the following sources:

    http://website.lineone.net/~a.rix/rh6-solo9150.html
    http://www.eecs.umich.edu/~steveh/inspiron/

The latter page provides a recompiled driver XF86_Mach64
(/usr/X11R6/bin/XF86_Mach64) for the Rage card; I found this to be
unneccesary for RH Linux 6.1.  However, the XF86Config file
(/usr/X11R6/lib/X11/XF86Config) provided there was indispensable.
It didn't work for me by itself, but when I hacked portions of it into
an XF86Config file automatically generated by
/usr/X11R6/bin/Xconfigurator, it all came together.

In summary, do the following three steps.

    A. Edit (emacs, vi, whatever) the file `/etc/lilo.conf' to get the
       correct vga setting.  Adding the line `vga = 792' after the
       `image' command worked for my laptop (See my lilo.conf file
       near end of message below).

       After you edit this file, you *must* execute /sbin/lilo, i.e.,

           bash$ /sbin/lilo

        to make sure this little configuration file gets copied into
        whatever boot sector on the HD it's supposed to be copied to.

    B. Copy the file XF86Config (provided near the end of this message
       below) into /usr/X11R6/lib/X11/XF86Config.  By the way, I tried
       uncommenting the 75.00 Hz modeline, but observed a tiny amount
       of snow flickering next to some icons, so I changed it to the
       72.00 Hz modeline -- 72.00 Hz looks beautiful on my laptop.

    C. Reboot to see if this all worked.  If you see the little Linux
       penguin at boot you can probably breathe easy.
       C.1. Login as root.
       C.2. Run `startx' (/usr/X11R6/bin/startx).
       C.3. If this looks great, you're done, and you'll probably want
            to tell Linux to always start up this graphical mode at
            boot.  Run `linuxconf' and set Config->boot mode->default
            boot mode to "Graphic & Network". [If you're now in
            graphics mode under GNOME, either `Ctrl-Alt-Backspace' to
            kill X and get back to a shell prompt, or start an xterm
            or other terminal to do this.]
       C.4. If your screen flickers and things don't look right, kill
            X-Windows using `Ctrl-Alt-Backspace'.  Fiddle with the
            settings in XF86Config until you find something that works
            (cognizant of the *WARNING* above).  Reread the web pages
            listed above.


Comments/Trouble shooting:

Step 1 comments.
Somewhere along the line, an error was introduced to the partition
table, and PM4.0 wouldn't do anything -- a problem.  To get around this:

   A. Boot the RH Linux 6.1 CD, entered text, custom install.
      A.1. Go forward to where queried for a mount point.
      A.2. Use delete options to delete *all but the first* existing partitions.
      A.3. Proceed with the custom install & deselect every available package.
      A.4. Proceed to the end of the install.
   B. Boot PM floppy (this now finds no partition table errors [one hopes]).
      B.1. Delete all partitions.
      B.2. Partition and reformat as in Step 1 above.
   C. Reinstall MSWin98.
      C.1. Boot from Gateway restoration CD.
      C.2. Remove CD and hit F1 when instructed.
      C.3. Insert MSWin98 disk when instructed.
      C.4. I encountered an Gateway/MS bug at this step: The installer
      jumped out to the DOS prompt `C:\> ' -- a problem.  After a call
      to Gateway, the way to kick it back into place is:
          C:\> cd cabs
          C:\CABS> setup


Step 3 comments.
Before you really get Linux up and running, conveniences like having
the floppy mounted haven't happened yet.  To get around this, either
login as root or `su root', then

    bash$ mount -t msdos /dev/fd0 /mnt/floppy

Now you can copy stuff to and from your floppy (directory /mnt/floppy)
using Unix commands.  There's undoubtedly a better way, but this works.



-------------------- begin file /etc/lilo.conf ---------------------
boot = /dev/hda
timeout = 50
prompt
  default = linux
  vga = normal
  read-only
map=/boot/map
install=/boot/boot.b
image = /boot/vmlinuz-2.2.12-20
  label = linux
  vga = 792
  initrd = /boot/initrd-2.2.12-20.img
  root = /dev/hda6
other = /dev/hda1
  label = dos
-------------------- end file /etc/lilo.conf ---------------------


----------- begin file /usr/X11R6/lib/X11/XF86Config.solo9300 -----------
# Hacked Xconfigurator file for Gateway Solo 9300

# Steven T. Smith , 10/29/99; hacked from http://www.eecs.umich.edu/~steveh/inspiron/XF86Config


# Run Xconfigurator on LCD 1024x768 XF86Config file, then hack in Sections from web page above

# File generated by XConfigurator.

# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of 
# this file.
# **********************************************************************

# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

    RgbPath	"/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.

    FontPath   "unix/:-1"

EndSection

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

    # Uncomment this to cause a core dump at the spot where a signal is 
    # received.  This may leave the console in an unusable state, but may
    # provide a better stack trace in the core dump to aid in debugging
    #NoTrapSignals

    # Uncomment this to disable the  server abort sequence
    # This allows clients to receive this key event.
    #DontZap

    # Uncomment this to disable the / mode switching
    # sequences.  This allows clients to receive these key events.
    #DontZoom

EndSection

# **********************************************************************
# Input devices
# **********************************************************************

# **********************************************************************
# Keyboard section
# **********************************************************************

Section "Keyboard"

    Protocol    "Standard"

    # when using XQUEUE, comment out the above line, and uncomment the
    # following line
    #Protocol   "Xqueue"

    AutoRepeat  500 5

    # Let the server do the NumLock processing.  This should only be 
    # required when using pre-R6 clients
    #ServerNumLock

    # Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
    #Xleds      1 2 3

    #To set the LeftAlt to Meta, RightAlt key to ModeShift, 
    #RightCtl key to Compose, and ScrollLock key to ModeLock:

    LeftAlt        Meta
    RightAlt        Meta
   ScrollLock      Compose
   RightCtl        Control

# To disable the XKEYBOARD extension, uncomment XkbDisable.

#    XkbDisable

# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults).  For example, for a non-U.S.
# keyboard, you will probably want to use:
#    XkbModel    "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
#    XkbModel    "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
#    XkbLayout   "de"
# or:
#    XkbLayout   "de"
#    XkbVariant  "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
#    XkbOptions  "ctrl:swapcaps"

# These are the default XKB settings for XFree86
#    XkbRules    "xfree86"
#    XkbModel    "pc101"
#    XkbLayout   "us"
#    XkbVariant  ""
#    XkbOptions  ""

   XkbKeycodes     "xfree86"
   XkbTypes        "default"
   XkbCompat       "default"
   XkbSymbols      "us(pc101)"
   XkbGeometry     "pc"
   XkbRules        "xfree86"
   XkbModel        "pc101"
    XkbLayout       "us"
EndSection

# **********************************************************************
# Pointer section
# **********************************************************************

Section "Pointer"
    Protocol    "PS/2"
    Device      "/dev/mouse"

# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.

#    Protocol	"Xqueue"

# Baudrate and SampleRate are only for some Logitech mice

#    BaudRate	9600
#    SampleRate	150

# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)

#    Emulate3Buttons
#    Emulate3Timeout    50

# ChordMiddle is an option for some 3-button Logitech mice

#    ChordMiddle

EndSection


Section "Monitor"
    Identifier  "My Monitor"
    VendorName  "Unknown"
    ModelName   "Unknown"
    HorizSync   31.5-65
    VertRefresh 50-100.5

    # 800x600 @ 100 Hz, 64.02 kHz hsync
#    Modeline  "800x600"    69.65  800  864  928 1088   600  604  610  640 -hsync -vsync

    # 1024x768 @ 75.17 Hz
#    Modeline  "1024x768"   75.00  1024 1036 1172 1244  768  771  777  802 -hsync -vsync
    Modeline  "1024x768"   72.00  1024 1084 1220 1324  768  771  777  798 -hsync -vsync
# 1024x768 @ 59.9Hz
#    Modeline  "1024x768"   63.00  1024 1084 1220 1324  768  771  777  798 -hsync -vsync
#    Modeline  "1024x768"   60.00  1024 1036 1172 1244  768  771  777  802 -hsync -vsync

    # 1152x864 @ 78 Hz, 70.8 kHz hsync
#    Modeline "1152x864"    110.00   1152 1176 1260 1452    864  864  876  900
EndSection


Section "Device"
    Identifier  "ATI Rage LT Pro"
    VendorName  "Unknown"
    BoardName   "Unknown"
EndSection


Section "Screen"
    Driver      "accel"
    Device      "ATI Rage LT Pro"
    Monitor     "My Monitor"
    DefaultColorDepth 16
    Subsection "Display"
        Depth       8
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       32
        Modes       "1024x768"
        ViewPort    0 0
    EndSubsection
EndSection
--------------- end file /usr/X11R6/lib/X11/XF86Config.solo9300 ---------------