Matt's Linux Page

[ Tips | Configuration | Resources | Windows | Acknowledgements ]

A lot of this is copied from James Rickett's official SEP linux page.


Turning off and rebooting
Don't just switch the power on and off. Instead su and use:
shutdown -r now to reboot.
shutdown -h now to halt everything so you can turn it off.
If the system is frozen:
If not in window display, hit any key between F1 and F9. That should give you an alternative login session.
Try to login from another system and kill the disastrous job.
Ctrl-Alt-Backspace to kill the window system. Ctrl-Alt-Delete to reboot.

Use cdroms
mount /mnt/cdrom to get a cdrom mounted on /mnt/cdrom.
When you are finished, cd out of the mounted directories and unmount it with e.g. umount /mnt/cdrom.

Using floppies
fdformat /dev/fd0H1440 to format the disk.
mkfs.ext2 /dev/fd0 1440 to create a filesystem of type ext2 (linux native). mount /mnt/floppy to get a floppy mounted on /mnt/floppy.
cd /mnt/floppy to enter the filesystem. cd /; umount /mnt/floppy to umount the floppy. Linux commands mread, mdir, mwrite, etc. manipulate files on a DOS/Windows floppy disk. See online man pages.

The system comes with 6 run-levels defined in /etc/inittab:

# Default runlevel. The runlevels used by SEP are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser w/o direct network connection ("Home dial-in")
#   3 - Multiuser w/ direct network connection ("Home ethernet")
#   4 - Multiuser w/ direct network connection + NFS, YP, etc. ("Office")
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
To choose any run level other than the default one, type
Linux 1
at the lilo prompt for the single user mode.

Gateway support
You can call Gateway at 1-800-846-2301. Now they don't help you with software problems, if you do not have Windows loaded. But disastrous hardware problems they deal with if you don't tell them about Linux. The problem has to be disastrous enough to exclude software causes. The Gateway computers come with a 3 year warranty and Stanford bought enough machines to be considered a Major customer.

Backup with dat tape drive
Assumes that the dat tape is scsi#0:

  1. connect tape drive to computer and reboot
  2. su
  3. chmod a+w /dev/st0 /dev/nst0
  4. chmod a+r /dev/st0 /dev/st0
  5. ln -s /dev/tape /dev/st0
  6. ln -s /dev/ntape /dev/nst0
  7. tar cvf /dev/tape or dump /dev/...
Doing everything as root helps insure against permission problem.
PPS If you mount your dos partition at the same time you can backup everything in one shot.

Make a networked machine independent from server
To make the machine independent of spur, oas, network, etc:

  1. Make yourself a local account by copying your entry from
    oas:/etc/ypfiles/yppasswd to /etc/passwd
  2. Reboot
  3. At lilo boot prompt type: linux 3 (This is standalone with networking capability)
  4. Hard mount any filesystems you need. e.g. mount -t nfs oas:/home/oas/sep /homes/sep
The local copies of seplib/setup etc will be a bit out-of-date, but at least you can do some work.

Check system messages
in/var/log/messages. For boot messages check /var/log/dmesg.


3 button mouse
Make sure your mouse is PS2, not serial. In /etc/X11/Xconfig change:

Buttons 2
Buttons 3

The printer needs a2ps installed to convert figures into postscript format (I think a2ps uses ghostscript but I am not sure).

Changing root device in a kernel
rdev /vmlinuz /dev/sda5 changes the root device.

Hard disk partitions
Initially the hard disks have been divided into four partitions, as shown in the table below. (NB exact specs may vary from computer to computer)





Contains /, /usr and /home directory trees



Contains /var and /scr directory trees.
Note: /scr is actually a symbolic link to /var/scr



Initially empty and unformatted.
Left for Windows or more scratch space.



Swap space.


The idea of this is to keep things simple while keeping junk out of the root partition, as filling up the root partition would be bad.


Reading Material

  • Matthias and Paul's linux paper from SEP93: Why Linux? ( 45kB)
  • Running Linux, Welsh & Kaufman (O'Reilly): Good general book on running your own linux system (highly recommended).
  • Linux Bible: Compendium of all the online documentation/howto's etc. Thorough and useful, but everything is also available online (recommended).
  • RedHat Linux Unleashed, Husain & Parker (SAMS): General book on running your own Linux system. Much less complete than Welsh & Kaufman (and more expensive), but possibly easier for someone totally new to Unix.
  • Linux Network Administrators Guide, Kirch (O'Reilly): Concentrates more on the networking/system admin side of things.
  • Other books are listed in the Reading list FAQ.
  • Software Sources

  • Redhat's Linux distribution. The Redhat Package Manager makes the installation really easy. You can grab executables from their CDrom, or download upgrades from their ftp site.
  • Linux Applications and Utilities Page offers software that is not included in the Redhat distribution.
  • HOWTO's document pretty much everything. Good when you are in deep trouble.
  • FAQ helps with the most common problems.
  • man pages are searchable on the web.
  • Linux Gazette highlites the lighter side of Linux.
  • Linux.Org is the official homepage of the Linux operating system.
  • Web Wanderers list more Linux and Unix resources.
  • Redhat's Package manager

  • Ftp:
      cd pub/mirrors/linux/RedHat/redhat-4.1/i386/docs/RedHat/RPMS
      get foobar-1.7-8.i386.rpm
    Then install with
      rpm -ivh foobar-1.7-8.i386.rpm
  • Advanced ftp:
      rpm -ihv --nodep
    The --nodep says not to check interpackage dependencies.
  • CDrom:
      rpm -ivh /mnt/cdrom/RedHat/RPMS/foobar-1.7-8.i386.rpm

  • Windows

    All the home computers come with licenses for Windows 95. If you want to install it, you can. Soon there will be a little guide here to take you through the installation, but after that you are on your own.

    We also have a few licenses for Windows NT for Workstations. If people want to experiment with that, then they are more than welcome to - after all, it is the future.

    The choice of Windows 95 over NT as a secondary OS, was made because most of the home computers operate in a stand-alone mode, so NT's extra client/server stuff is useless. Also games run faster on 95 (or so I've heard).

    Installing Windows 95 on your Linux machine

    The following instructions are intended to be help people to install Windows 95 on their home computers. However, a little mistake with fdisk could cause your whole hard disk to be reformatted, so follow these instructions with care.

    Proceed with caution!

    1. Login as root
    2. Make yourself a linux boot disk (or borrow one from someone else)
      1. Insert 1.44Mb floppy into drive
      2. fdformat /dev/fd0H1440 ... low level format the floppy
      3. dd if=/vmlinuz of=/dev/fd0 ... copy the kernel onto the floppy
      4. Eject the disk and label it as a linux boot floppy.
        Note: this disk is not an `emergency repair disk' as it only has a kernel, not a root filesystem. It needs your hard drive to be working for it to be able to run Linux.
    3. Change the 4th partition of your hard drive (/dev/hda4) to be of MS-DOS type. This will be your C: drive under windows.
      1. fdisk
      2. t ... change a partition's system id
      3. partition: 4
      4. hex code: 6
      5. p ... check's partition table. Should look roughly like:
           Device Boot   Begin    Start      End   Blocks   Id  System
        /dev/hda1   *        1        1      261  1052320+  83  Linux native
        /dev/hda2          262      262      294   133056   82  Linux swap
        /dev/hda3          295      295      425   528192   83  Linux native
        /dev/hda4          426      426      767   378944   83  DOS 16-bit >=32
      6. w Writes table to disk. (If in doubt q to exit without saving changes.)
    4. shutdown -r now to reboot the system and rewrite the partition table.
    5. fdisk - type p to check everything is o.k.
    6. Insert Gateway system disk (in orange package), and Windows 95 CDrom into computer.
    7. shutdown -r now to reboot the system from the Gateway system disk.
    8. Install windows
      1. Choose `Install new O.S.'
      2. Ignore warnings that tell you everything is going to be deleted - if you have done the first part right, things'll be fine.
      3. Continue with installation - easy to follow. Choose defaults for most things. Give code when asked.
    9. When finished installation, insert Linux emergency repair disk into computer and reboot.
    10. Uncomment the 4 lines in /etc/lilo.conf that are labeled in the file.
    11. fdisk to reset it to boot of the first partition.
      1. a (return) 4 (return) ... toggle off 4th partition
      2. a (return) 1 (return) ... toggle on 1st partition
      3. w ... write table to disk.
    12. Type /sbin/lilo to rerun lilo.
    13. Reboot and it should come back with Linux, unless you type win at the `lilo: prompt' when it'll come up in Windows.

    Getting the ethernet card to work under Windows 95
    Double click on the internet icon on your desktop. It should guide you through what you need to do. Have the info provided by your RCC handy though, as you will need things like the domain name server etc.

    Getting the graphics card to work under Windows 95
    This is a bit vague - so if you have something more concrete, put it here.

    • Control panel -> Display properties -> Settings
    • Change display type
    • Adapter type [PCI (English) Mach64]
    • Insert Gateway Disk
    • Copy files from d:\win95drv\display\ct95\ati64def.cnt
    • Monitor type [Gateway Vivitron 17inch]
    • Tick Energy star compliant
    • Choose high colour, 1024x768 pixels, large fonts.

    Reinstalling windows from scratch
    This is something you almost certainly will want to do at some stage if you mess something up.

    • Boot with the Gateway system floppy
    • Quit setup before doing anything
    • Run MS-DOS's fdisk, to erase and then create again the windows partition. Taking care not to mess-up the Linux partition
    • Boot with the Gateway system floppy, and continue with the installation

    To mount the windows partition under Linux

    1. # mkdir /win95
    2. # mount -t msdos /dev/hda4 /win95
    You should now be able to cd /win95 and access all your windows stuff, although you will need to be root to write to it. When you are finished, cd out of /win95 and # umount /dev/hda4


    Paul Hargrove got everything going here.
    James Rickett is SEP's Linux csar. This page is a modification of a page by him. Thanks James.