Linux Space Station Raven - SSR-01

(C) Graham Swallow version -1b, gen 1996-07-29 00:37, gps@trix.dircon.co.uk

Issue One - Building the Hardware

1 Space Station Raven

Space Station Raven, a Linux workstation ( running X11 ). Space Station Raven is a £3 Internet shareware magazine (three UK pounds).

1.1 What is Raven

Raven is an on-line magazine to promote Linux, and help you to do something useful with it. Please refer to Raven Base Station Zero for the copywrite notices, disclaimers, do not spit signs, distribution rules, and how to download it or read it without a broswer.

1.2 This is Raven Issue-1

You want to set up a Linux box, and marvel at the delights of modern technology. To do so you must already be familiar with Unix system administration. To learn that you must have a working Unix box. Where do you start?

1.2.1 Issue-1 - ”Buying and Building a PC” (Intel 386, 486 or more).

• intro - Space Station Raven - you’re reading it now

• hardware - Plan £1503 for a work station

• hardware - More for Big Budget Video editing

• assemble - Plugging it together

• ip addr - Think of a number, add zero, your IP address is ..

• sysbuild - Boot and Hoot

• fdisk - 1024 sorted

• quick map - list of thinks to do

• part hda4 - /etc/lilo.conf and /hda4 - 10 M below 1024 cylinders

• swap space - Swap Space • twin boot - Twin Boot Upgrade

• x11 conf - Linux X11 installed and up

Yes - you need to budget £1500 for the workstation. If you have more, get a better machine, but don’t under-estimate other costs. If that is too much for your budget, you should be able to buy a proportion of the components you need for about £800, and get the rest later. You may need assistence from a friend (or work) with a second machine.

1.2.2 Issue-2 - ”Now what’s this? Linux User’s view” So you’ve got Linux running, and want a quick start on various things. Such as? Issue-2 has several things that might be of interest to you. Most of them are available on CDROM, so you can do something, if you haven’t got Internet access.

• intro - Issue-2

• user - User gps

• backspace - BackSpace

• pkg install - xearth - EG Package Installation

• sunsite - sunsite: disk3

• sunsite2 - Sunsite Packages

• xloadimage - xloadimage-4.1

• mc - mc-3.2.1

• ddd - ddd - gdb data diaplay

• auis - AUIS - ez - WordProcessor

• lyx - lyx-0.8.4 - Word Processor

• thot - thot

• exts - dvi .ps .tgz .shar .me .ps

• gs - Ghost Script

• gnuplot - gnuplot for botanists.

• archie - archie -via- www

• chinese - Chinese xterm

• kaffe - kaffe - Java Compiler

• cbb - cbb-0.64 • xfinans - xfinans

• pigeon - pigeon - October

• X11 - Linuxing with X11

• urls - URLS to surf

1.2.3 Issue-3 - ”Internet Working” Issue 3 gives you a ’drop-in and change the values’ configuration for a connection to the Internet. It documents all the files you need to setup, by providing a ’live’ example of a machine with a modem and an ethernet card.

• efax - fax

• internet - Internet

• modem - Modem

• tcp sys files - TCP/IP system files

• tcp interfaces - loopback

• rc inet1 - /etc/rc.d/rc.inet1

• dial ppp - dial ppp

• slip - SLIP

• knl devs - Kernel devices

• tc sys files more - /etc/services and other files

• rhosts - networking with/out passwords

• X11 netw - Networking X11

• tcp apps - TCP/IP apps

• sendmail - Sendmail

• sendmail filters - Configurations on the end host

• knews - knews

• xrn - xrn

• apache - apache www server

• other stuff - Other stuff 1.2.4 Download

If you are reading this on-line over the Internet, you may prefer to download the archive, uncompress it and read it off-line. Raven is intended to be download-able, so that you can fetch it. I also have text versions of the first issues, for access whilst your HTML browser is down. See Base Station Zero , or one of:

• http://beyond.malmo.lth.se/˜ gps/Raven

• http://sunsite.unc.edu/pub/Linux/docs/Raven

• http://www.users.dircon.co.uk/˜ trix

• http://trix.dircon.co.uk/Raven

1.3 Step-by-Step

Many readers will already be Unix aware, many will be complete beginners. There is no easy answer. If you don’t know how to do something you’ll have to find out. I don’t want to give baby-step instructions, but I’ll try to sequence what you have to do, so that you can focus on the next step.

Although I find system administration interesting (yawn) maybe you don’t, and you just want Linux running with TeX and ’Net facilities, anything else is not being a tool, but eating up drinking time.

However, load-and-go is not always so simple, especially if you’ve got the ’wrong’ distribution, (there isn’t one, but on that day you might think so).

It should be possible to be independent. (it is - but it takes ages). Building your own machine is part of that. Building your own distribution from materials available on CD and the NET is equally relevent. Deciding which distribution to pick, will effect your luck. Some distributions will build out of the box, others are ”some assembly required”.

A minimum ’system’ is a BOOT+ROOT floppy disk pair. That is an integral Linux system, capable of accessing WIN.311 shares over the net! Above that, any distribution adds huge volumes of files, arranged in packages.

1.3.1 Issue-1: Some assembly required

Issue-1 is about getting the hardware together. The X11 SVGA section is here, because it is an unfair obstruction. These box shifters that sell us the hardware should contribute timings for typical monitors sold in 1992, 93, 94, 95, at typical clock rates found in the majority of cards ...

Issue-2 is Intro Information, for people who have never seen X11 before, and people that don’t know what to do with a .dvi file. It gets you started by giving you a few simple projects to install, and a few tips on this and that.

Issue-3 is Internet (and fax) connections. This preview will get you up on ethernet as fast as the X11 section got your monitor going (please don’t get burned!).

The sample files are real tangible examples, you simply have to substitute YOUR values for mine. Obvious really.

The files have been carefully prepared, taking into account the way different utilities use them (eg /etc/hosts). They avoid many problems that new-sys-admins find, and may begin to explain why things go wrong. Having a working TCL/IP network helps the terminology in the LDP + NAG make sense. The Linux TCP/IP is a full implementation.

Issue-3 also gets sendmail configured, and the Apache WWW server, so you can create your own WEB pages, and see them running on your own machine.

Issue-3 was the seed from which dial ppp grew! dial ppp is a utility that allows you to establish, or break a ppp connection, without having to login as root! It also works for dip and SLIP connections.

dial ppp is available seperately, with a public license, so you don’t have to buy Raven to use it, and can customise it for your ISP, then GPL your package.

To help it get started, the originating article is included, but it cannot be edited (it is quoted). You might like to write your own documentation.

As proof of concept, there is a menu utility so you can do the dailing from your X11 desktop. This is on one year loan, then you must come up with your own menu utility.

Issue-4 is just started, and currently holds the article about upgrading to Linux 2.0.

2 Component hardware £1500 Budget

You have to build a PC shopping list. These prices are hopelessly wrong, but may be an indicator. VAT is UK tax. Any suppliers mentioned, were found in a magazine, and are mentioned for courtesy - as the origin of the information. I have no knowledge of them. NO - I don’t sell hardware.

This is an Intel-PC because it is. I don’t have an ALPHA or any opinion on them. To be honest, I’m not THAT interested in hardware, which is why Raven is built from standard, replacable components.

As well as the Intel-PC, you will need books. It’s your list, don’t forget ... hand-scanners, video-frame-grabbers, FM-radio - but check LSM’s and Linux DOCs for keywords. Many devices are supported in Linux, but it isn’t easy to see HOW-WELL they are supported. Ask your supplier, and other users.

2.1 URLS - Hardware FAQ’s

If you have Internet Facilities at work (uni), there are a number of URL’s listed in a separate file. If you can’t find that file try one of these.

• news:comp.sys.ibm.pc.hardware.chips

• news:comp.os.linux.announce

• news:comp.os.linux.hardware

• news:comp.os.linux.misc - newbie help question OK here

• ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/pc-hardware-faq/ pc-hardware-faq • ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/pc-hardware-faq/enhanced-IDE/part2

• http://www.li.org/Products/Articles/iX-06-1996.html if not Intel try DEC Alpha

2.1.1 pc-hardware-faq

pc-hardware-faq is a 5 part faq about ibm.pc hardware, BIOS information, etc It applies to Linux and DOS.

Near there is an E-IDE FAQ which tells you about good/bad hardware and the symptoms. It has a list of EIDE manufacturers’ URLs.

ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/pc-hardware-faq/enhanced-IDE/part2
        says PIO-0 is 3.3 MB/s PIO-4 is 16.6 it also lists the IO_PORTS
        for 4 IDE cables (two cards).
        Near there are other URL's about graphics cards and other things.

2.2 BOOK - Linux Doc. Project - LDP (£30)

This book is indispensable. You should really buy it first, as it contains information about hardware.

This is a collection of LDP ’books’ and ’HOWTO’s, assembled from several sources. Most of the individual authors and editors are now collectively producing the Linux Documentation Project.

The Networking Guide will tell you EXACTLY how TCP/IP and all its various features (NIS, boot servers) are configured. The Ethernet HOWTO hints at what is involved in writing a driver for an ISA card.

The NET-2/NET-3 HOWTO, is the Networking Guide for developers, and provides a well valued second opinion (from the original authors), and different descriptions of the networking software and its configuration.

The Ethernet HOWTO is written by (any maybe for) the writer of many drivers for Ethernet cards. It ’compare-and-contrasts’ different card designs, costs and performance. The Hardware HOWTO lists a range of hardware that Linux supports (at time of writing!)

The book is published independently by a number of distributors. More or less the books are the same, from the same text, but may contain different chapters. They are printed at different times and may add extra chapters for their own distribution.

All the information in the book is available on your CDROM or over the NET. http://lsl.com/ If you want to print it and sell it ... please add a better tabbed index.

The online Index of Howto’s is available from http://sunsite.unc.edu/˜ mdw

¡-! tilde became amp mbsp in chimera ! -¿

2.3 Mini-Tower case: (£30+VAT)

• Mini-tower - not a desktop case • 3 drive bays (5.25”) is probably better than 2 bays (I’ve got 2)

• 200 watts PSU or better, proper certification of case

• PSU wires to CPU-FAN (if it accepts them - or splitter)

• Modern thin drives JUST fit in the frame in pairs.

• BEWARE OF OVERHEATING! It shortens component life.

• PSU out to VDU means ONE plug (printer, modem, ...)

• Do not connect speaker, or 66 MHz front panel (unless you want to)

• If there is a turbo switch, it is really a go-slow switch

I’ve just noticed that my mini-tower, puts the back end of a hard disk, where I want my sound card to go! The second choice card slot is also unusable, because the CPU+FAN gets in the way. Oh well. Of course, if you want an 8 GB server, you will need a big case. You would also need 100-TP ethernet cards to the central HUB. You may prefer a desktop case, that sits beneath the monitor. Personally I hate these, because they don’t work ergonomically for me. They tend to have less space for disks and cards, (or raise the monitor too high). Conversely, you may hate towers, because they require most things to have an extension cable, which get in the way, and there might be less leg room under the desk. or the floppy is harder to reach.

2.3.1 removable back plane The back-plane that holds the system board is removable and makes it much easier to set jumpers and handle the PCB. I didn’t notice that!

2.3.2 CPU FAN has own PSU cable. If your PSU has a connector with a pair of thin red and black wires (as well as several thicker 4-wire connectors), make sure that the CPU FAN has the corresponding connector, otherwise you will need a splitter (or plan moving to a box with a different PSU).

2.4 System Board (£100+VAT)

Linefeed is a UK company with opinions, facts and information on a range of system hardware. See www.linefeed.com for their information about ide and system boards such as the GA486AM.

• 486 AMD 80/40 - unless you need a P6

• ZIP CPU FAN - you DO need one of these (PSU cable?)

• PCI or VLB - PCI is a better choice • 72 pin Simms - accepts 16Mb alone (not 2 x 8)

• EIDE + IO - enhanced PIO UARTS twin EIDE + floppy

If you get EIDE + Floppy + Serial + parallel on the motherboard, you save a PCI slot. Maybe now that V34 technology is standard it will also appear.

Some boards have faults with extra features, but you should be able to test it fairly soon, and if it is non-standard - take it back. Also any extra features should be disable-able, allowing use of other cards.

2.5 16 Mb memory (£100+VAT)

4 Mb is not enough, 8 is OK, 16 is exactly OK, 32 is rich.

This has come down in price recently from £325 to £100. Shop around. Getting it from the same place as your system board and CPU makes sense. Don’t get two lines of 8M, as this prevents you from expanding later, unless you motherboard can take it.

4Mb offered in most ’bundles’ is NOT enough (except for a 386/sx running X11 remotely, and local SVGA text apps). 8MB is runnable, but I find it irritating. I’d upgrade, but it’s only a second machine, and it’s is still a lot of money.

If you can afford a P5 and memory, you are lucky (consider an alpha). If you have to make a choice, go for 16 M memory, with the best 486 you can get.

Without real memory, the CPU spends it time waiting:- re-loading code pages from disk, and reclaiming data pages by writing them to swap, then reading in the required page.

A ’P5-Alive’ sticker looks different when illuminated by your disk light.

2.6 CPU: 486-DX2-80

You do not need a Pentium. A 486 runs office apps just fine.

The 486 is yesterdays technology, but it is still meat enough to handle millions of bits in X-window redraws and it multi-tasks smoothly. Running X11 with several windows active, I got a tidal memory usage of 10-14 Mb with low disk activity (less paging). Applications start up and run quickly. I compiled a few system apps (samba, smbfs, smail, ... ) and each only took a few minutes. I compiled the kernel - that took longer.

However, I only use 8 bit X11R6, not 24 bit displays, which uses 3 times as much memory, and has more bytes to move around. I don’t watch TV, I don’t race MPEG-video-data to disk, I don’t mix sound data real-time, and the biggest compilation I do is the Kernel (takes chunk of an hour).

Pentium chips and system boards carry a premium price, and may not be value for money, when competing against other components in a budget. However that depends on what you want to do, office tasks or graphics rendering.

Of course, by the time you read this, costs have changed. The CPU price gap (and motherboard price gap), may make a Pentium worth while.

Software developers - please DON’T get the fastest possible machine. It will only hide the performence problems that others are experiencing when multi-tasking. DX2-80 means that the memory bus runs at 40 MHz, but the CPU has an internal signal at double that speed: 80 MHz. DX4-100 runs at 25/33 MHz. 40 MHz may push the memory chips to their limit, or require extra wait states, whereas 25 MHz memory is OK. This is set on the motherboard and in the CMOS settings. Problems might show up as occasional system problems, or mysterious lockups. If gcc often gives you SIGSEGV, it may be a memory speed problem, try adjusting your CMOS, or cleaning the contacts.

• 486-DX2-66 (£29)

• 486-DX4-120 (£85)

• P-75 (£120)

• P-120 (£250)

• cyrix 586/100 (£119) on 486 style system board (£88+VAT) with EIDE+IO

A Pentium also needs a Pentium system board, which may cost more. The non-Intel 486’s, are close to being 486’s (eg the AMD), but the higher clones drift towards their own design, and may require a system board that supports them particularly well.

2.7 EIDE ATAPI disk controller

• AT-API mode 4 (eg 3,4,5 all in)

• dual controller (ie 2 cables = 4 disks)

• floppy controller is usually on-board

• nb in DOS 16 bit CD slows other disk on SAME ctrlr from 32 bit

• CMD-640B and RZ1000 interfaces may be ’unreliable’

• see README.ide and hdparm(1) for how to protect (but not detect?)

• Cache controllers with LOTS of cache are worth considering.

• ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/pc-hardware-faq/enhanced-IDE/part2

2.8 multi-function EIDE with IO on-board (£35)

Serial+parallel IO does not need VLB or PCI, it needs 8 bit XT bus! but it does save a card. • EIDE as above

• floppy as above • enhanced Parallel IO

• NOT: 8250 16450 16550 type UART (man setserial)

• YES: 16550A - much preferred, has 15 x FIFO (PAIR com1 + com2)

• Comes with rs232 sockets and ONE (1) IDE cable

• Devices should have selectable addresses and OFF (IRQ + IO PORT)

• may be able to have 2 cards per system (8 disks)

If you can get these features on your system board, it saves a card.

2.9 PCI or VESA-Local-Bus ?

Some time ago I got VLB, because it was cheaper and more tested. PCI is now reliable on 486 boards, and you can carry the cards to other machines. It is also faster.

The idea of VLB -or- PCI is to move large amounts of data around, using 32 bit words instead of 16 bits and use better clock speeds doing so. It makes a HUGE difference to the screen and disk drives, but less to the network card, and none to the UART card which uses 8 bit data.

When compiling the kernel, you should select PCI support, and watch out for semi-broken IDE controller chipsets, that the kernel can fixup (but only if you tell it to!)

2.10 DISK drive: ATAPI mode 3 (or more) 1.2Gb (£135+VAT)

There are tiny-Linux installation disks, that let you survive in 10 Mb, but that is the realm of 386/sx printer buffers with NFS disks.

The Slackware base uses 300 MB, a few apps uses up another 300 MB.

If you already have an existing (DOS) system, get a second disk 1.2G for Linux only. Then save up to buy ANOTHER disk! 2.0 G disks are an option.

Whatever you needed, you need that much again! Then you can have two independent systems, ie your existing old system, and your unstable new system.

You could build up the new disk in one of those removable IDE drive bays, then swap it out of the system, as a sort of 1 stop upgrade, but then you will need a second machine with TWO exchangeable bays, to duplicate the ’ROM’ you have just created.

If you had the 0.5G DOS disk then the 1.2G Linux, you can use the Linux disk to hold a copy of the DOS partition whilst you repartition the DOS disk, perhaps creating a 32M swap space (performance gain - heads don’t move on OTHER disk).

Linux can feed ext2 disks to windows-for-work-groups, but only over the LAN (samba over TCP/IP). Locally Linux can mount DOS disks, but DOS cannot read ext2 partitions (except with a read-only utility and name mangler). OS/2 can read/write ext2 partitions with long names (recent, may be stable).

It is possible for DOS to read individual Linux files using a utility program and a driver that can reach above 1024 cyclinders.

There are variations between disk manufacturers, interfaces, etc. Get the biggest disk with the smallest seek time (access time), and then get PIO-Mode-4.

2.11 ATAPI-EIDE CD-ROM: Quad Speed (600 Kps), 200ms access (£50+VAT)

I have an old dual speed CR-562 on its own interface card, on one system, and an EIDE quad speed Mitsumi on raven. The Mitsumi developed a head-seek fault, but the replacement unit is OK. Other than the hardware failure, I have never had any problems with the quad speed EIDE drive.

The CR-562 uses a Panasonic interface, that appeared on original sound cards, but the EIDE drives use the same EIDE interface as hard disks, so you don’t need an extra interface card or driver. It is possible to disable the EIDE-CDROM code in the kernel, but you don’t want that.

You might have 3 disks and a CDROM. If the CDROM is on its own IDE cable, jumper it as the IDE master, otherwise jumper it as the slave. Don’t use cable select, because even the manufacturers disagree on what that means.

External SCSI CDROM’s may require high quality cables and limit the number of drives that can be cascaded (2). This is a generic problem with external SCSI and is often helped by good termination (active).

SIX-speed and EIGHT-speed IDE CDROMS are now available for a few pounds more. After that check seek/access times and reliability.

SEVEN-DISK auto-changers is an interesting idea (especially audio), but there would be a 3 second delay when switching between tasks, accessing different disks. It’s only dual speed, and the cost including the SCSI controller would buy a few quad-speed always-online CD-ROMS (in a tower case).

TRIPLE-DISK-IDE auto-changers. I saw an advert for these, but they won’t be supported until a driver appears for them.

Don’t forget to enable IDE-CDROM in the kernel when you compile it. You know it’s there, because when the kernel boots, it lists all drives found, and says ”CDROM” against one of them. If the messages ran by too fast, run dmesg.

2.12 CD-writers (£700+VAT)

This is NOT part of the basic Raven spec, but is mentioned here as many people will wish to plan for it.

Writing CDROMS would make it possible to backup and rebuild sections of the hard disk. You will also need a free 660 MB partition to build the filesystem on, before burning the cdrom. This is because cd-writers have to get the data on-time, first-time.

If you plan several installations it offers you a way to duplicate a system, and distribute it to each CD equipped workstation. The writer needs a SCSI card.

If only CD-writers would drop in cost as fast as readers!

2.13 SVGA PCI Cirrus Logic 5434 (£50+VAT+1MB)

2 MB is essential. It allows a large X11 window, with spare space for fonts or BLIT zones.

You might have to purchase the RAM chips separately (£30), but if possible get them on-board (soldered in). Some 64 bit cards may need an initial 4M (+4M blank).

Linux (XFree86) supports many different cards, 5434 is only an example. I’m waiting for a new breed of cards, so I got a CL-5429 VLB. Its fast enough, hi-res, well known, had the spare sockets for the 2nd Mb, it was in the shop, and cheap. It also has on-screen memory streaks.

It’s got to be a PCI card (or VLB or on-board) because there are so many pixels in X11, that the ISA bus is *too* slow for snappiness.

The chipset is the core of the SVGA card. You want one with the latest technologies for accelerators and RAM-DAC circuitry, but one that is well known enough to be better supported by XFREE drivers. Look in /var/X11R6/lib/doc for information about supported S3 chips.

I’m not a shop, so you really need to refer elsewhere, maybe: ftp://rtfm.mit.edu/pub/usenet-by-group/news.answers/pc-hardware-faq/video/chipsets

If you are considering a 3-D rendering card, check which are supported by XFree86, (eg Matrox Millenium isn’t, though apparently there is a commercial driver for it). (IE for the 3D functions, the SVGA part will be supported).

2.14 SVGA 15” Monitor (£260)

17” IDEK recommended if cash and portability are not a problem.

If you can, get the refresh rate of a range of monitors eg 72 Hz at 1024x768. This gives an indication to the top end limits of the monitor. You will configure the card as close to this limit as it will go (if you want to).

Faster monitors are better, but you also want one with a sharper picture. This will be more apparent at the higher resolutions. Hopefully, the better tubes are put with the faster circuitry, otherwise you should go to the shop and look.

Old 14” monitors should be ’retired’ from regular use, but can still be usable with X11 desktops, at 640x480.

2.15 MODEM: V34 28.8k fax/data (£99)

Internal is much neater, but you can’t see the lights telling you that something is happening.

Some modems make a lot of noise. VOICE ones have ear phone sockets to listen to line (and otherwise go quiet).

Voice modems can act as ansa-phones, or a MENU of voice directed options, with the caller using a touch tone phone to select options. This might then be a FAX service to a specific user, and both ends switch to FAX mode.

NOTE: Rockwell chips use an undisclosed compression format, so you can play and record sound clips down the phone, but NOT through the sound card or CONVERT them to or from any other format. You will need the software for this to work. I never got voice working (and never leave the machine on when I go out as it is a potential fire risk).

        sunsite: /cdrom/system/Serial/mgetty+sendfax-0.98.lsm

I’ve seen a V34 + SoundBlaster combo advertised. Hope it works.

US models detects most BT signals sort-of badly and are 2/3 the price. BT approved models are no better, but sport that stylish green triangle. If anyone can tell me of a modem that CORRECTLY detects all UK signals, please tell me. Mine has to timeout.

Personally, I distrust RS232 WIRES at high speed. An internal modem doesn’t have an RS232 cable, it has a virtual wire, the length of a chip, and is less prone to noise. SLIP and PPP will detect any errors, but why get them at all?

Individual brands may have special bugs, or capabilities, such as CallerId (know the callers phone number before answering). You milage may vary, see mgetty.

My Internal V34 modem (an early version) had unbelievable problems with IRQ’s when it was set to anything other than COM3 (the default additional COM port). This may have been it’s fault, or the fault of the IDE card not getting out of the way. Things got a lot better when I put them both back on their preferred ”default” settings.

2.16 PRINTER: none, Epson-FX80, or YOUR-CHOICE (NON-GDI)

Linux will drive a POSTSCRIPT printer or any ”common” printer. HP, Epson, 24-bit dot matrix, colorink-jet, PCL, etc. You can get a second hand 9-pin for £20, but they are slow and noisy.

I don’t know anything about laser memory requirements, for complex pages. Especially since ghostscript will be converting to a pixel image.

GDI requires MS-Windows software to drive it. I don’t think Linux does this yet. But some GDI printers have an ’upgrade to normal printer add-in’. and can be driven in PCL from DOS.

Printer cables can be quite long, but beware of total length, with switch-boxes. The printer will go quiet if the total footage is excessive (40 ft). If you are lucky, you can avoid buying an expensive, bulky and messy printer, and use the printer at College, or work.

2.17 TAPE-DRIVE:

Don’t bother. Get a second disk, and keep YOUR files on floppies. Label the floppies 9601-Jan, and keep backups of them on an ext2 disk. Take TAPE backups of that ext2 disk.

The system is HUGE, but can be deleted and re-loaded from CD-ROM (as you shall see ...). Reloading the system from scratch is difficult to get right without forgetting SOMETHING, but each time, make a note to improve next times installation procedure.

Collect all the ftp files you found. Put the ones you have installed on a backup archive. If the machine needs to be rebuilt, you have them.

For site backups use an external CD-writer. This won’t backup working PC’s, but you prepare a 660M image using mkisofs, and borrow the CD-Writer for an hour (or so). Sites with incremental backups merge departments, each ’posts’ 50M to a weekly backup (N-copies takes N-hour’s :-). How do you dispose of CD’s?

Some tape drives are very noisy, and can’t be active in the same room as a human being. DAT tapes (quiet) have a high capacity, but cost a lot.

2.18 Removable media

I have an old Syquest SCSI 80 MB cartridge, which works very well. There are newer 1 Gig drives, and these should work well, (using standard SCSI interfaces).

I did have problems with DOS requiring a reboot on every change, but this is NOT a problem with Linux.

They are more expensive than faster non-exchangable disks, but may be more suitable for sending through the post to get CDROM’s cut, or more convenient for archives, or moving between machines.

The parallel interfaces, will be much slower than internal SCSI cards, and you should check whether they are supported or not, and the convenience looks very tempting. It is, however, another box, power cable and interface cable. Portable users would probably swear by them.

If you don’t want to switch disks very often, you might consider an exchangable SCSI or EIDE frame.

2.19 Sound Card (£35+)

I don’t have one, though I have seen one at £20 (second hand). I did have one a long time ago, but I was disappointed by the amount of HISS and general sound quality. I lent it to a friend, who has moved.

2.20 Multi-disk system upgrades

System upgrades are easier if you can boot two independent systems (as well as DOS). IE: the old-system and the new-system. If you plan to do that you must reserve the disk now, possibly leaving you with only 2 of 4 disks (+new system, +cdrom)

During the migration, you might do a lot of deleting. Be lucky.

If you are lucky, you can share /usr/andrew, eg as /hdc2/andrew. With other apps, beware of different library file versions, but try /etc/ld.so.conf.

2.21 Second disk (£135)

Put the second IDE on either the first or second EIDE cable and controller.

With both disks on the same cable, one must wait whilst the other uses the IDE cable. You will need a second ide cable (the first one is always included with the controller card), and scrounge a few jumpers. Check that you have enough PSU cables (or a splitter).

DOS currently halves the data path width of a hard drive ON THE SAME CONTROLLER as the IDE CD. Linux does not have this problem. It may be fixed with a DOS driver.

Splitting data across two disks can boost performance, for a number of reasons. If you are hardly using the DOS partition, but have a swap space on that disk, every time the system wishes to read or write a swap-page (4K block), it can do so without moving the disk head of the other disk, and conversely.

2.22 Bundled Machines

Shops often put out adverts of complete machines at low prices. These are not fakes, but checking the specification, you may notice only 8Mb RAM, or whatever. Take the specification home and price it on an item-by-item basis. Then go back to the shop with a proposal for an upgraded machine, they’ll probably snatch it out of your hand. Remember that their prices depend on sustained turnover, and your thousand will enable them to get newer stock.

2.23 Books

2.23.1 Running Linux - Matt Walsh

Subject to availability.

2.23.2 Essential System Administration - Aileen Frisch

I don’t have this, but I’ve heard it is very good.

2.23.3 Linux Documentation Project LDP

Did you know that in the UK, books without CDROM’s are VAT excempt (17.5%). This book may appear under different names, eg:

2.23.4 Doctor Linux - LDP selection printed (£30)

This book is indispensable. See above. I’ve seen this advertised for $22, but then you need US-UK postage. It weight 4 pounds, so confuse your local post office with two bags of sugar. US-UK air mail can take 2 weeks, bulk mail ... who knows?

2.23.5 TCL/TK John Ousterhout (£29)

TCL is a threaded interpreted language that is a sort of a mix between BASIC, LISP and SHELL. Its very flexible, but has a limited number of data-types (as does shell).

You can add C++ code into Tcl, or add run tcl script() ability to you program. ELF will hopefully add dynamic linkage.

TK is a library that bolts onto Tcl and X11, giving object types such as frame, label, button, radio-button(s), data-field entry, canvas, text panel widget (with multiple fonts, etc, etc).

Tcl/Tk is rumoured to run on WIN-311. When that hits the fan, a lot of windows programmers will go lemon squeezy. I don’t know what DOS does for unix services, but it sounds like a reasonable cross-platform tool.

This book is the authors guided tour of features. It is a reference for commonly used command options, with an accurate and concise index.

2.23.6 Others

If you have a book you’d like reviewed, email me and I’ll have a look.

2.23.7 Linux Journal ($22 US, $32 world)

A monthly magazine, with lots of articles. Its has technical articles, background info on famous names, development progress stories (Is BLADE running yet?), and a very high quality finish. It’s nearest sibling is WebMaster, also from www.ssc.com.

2.23.8 Linux Gazette

This is a FREE online e-zine, available as html and available for download. It also appears on some CDROM’s.

• http://ftp.redhat.com/lg/

• ftp://ftp.redhat.com/lg/

• ftp://ftp.ssc.com/pub/lg/

2.24 Motif - optional

X11 is a window maker’s toolkit. Different window makers experimented with different styles. EG:

        TRAD. Scroll Bar Behavior: CLICK-ing on SCROLL-BAR:
                LEFT    - scroll page up so that THIS line is at top
                RIGHT   - UNDO of LEFT
                MID     - JUMP to this % place in DOCUMENT
           DRAG-MID     - scroll text (tiring)
        OTHER Scroll Bar Behavior: CLICK-ing on SCROLL-BAR:
                LEFT    - scroll page up by one page
                LEFT    - scroll page down by one page (above bubble)
           DRAG-LEFT    - scroll text (tiring)

Each of these, and the variety of them are confusing to people who are used to MS-WIN, and everyone got excited about the Motif library (and style guide). In the need to declare a standard, they did so.

X11 is FREE, with contributions from the big names. Motif costs, so you have to buy it separately.

Then you can down-load all those Motif applications, compile them, and link them with shared-libraries. The rest of us can’t compile them, and can’t link them, so we down-load the bigger static-library executables.

A Motif clone is brewing (LessTif). It will take time for everyone to confirm that their code compiles and runs correctly with it. In the mean time you don’t NEED it (Motif). Most of the interesting stuff compiles without it. The rest is available pre-compiled from the net .

Motif is not fast. I only realised that the motif linked executables were sluggish when I saw faster ones. Utilities (xedit, xterm), applications (modula-2:oberon), or even scripted applications (using tcl+tk) - so comparatively fast it is astonishing (and depressing when its back to sludge).

FYI I find ddd slow. Is this Motif, or my machine?

In balence, the Scriptum program is static Motif, and is fast, so maybe it isn’t just Motif that causes the problem. However, I prefer to have everything on one CDROM (set), so I’m waiting for LessTiff, and prefer not to code X11 directly (using Tk or other instead).

X11 includes a set of applications that do not use Motif, and a proportion of the software on sunsite (etc) also.

2.25 Internet Service Provider - account - (£10+VAT pcm)

There are different types of dial-in accounts. You want your own static IP address with full TCP/IP access to the Internet.

You also want some space on the ISP’s machine for your web pages, available 24 hours. You may prefer an ISP that has a fixed rate, no time charges, and ask about 0345 (local call) options (£15 pcm).

An ISP has a ”high speed” 24 hour link to a gateway near a backbone. The ISP also has 1-500 modems, each with its own phone line. The 500 connections fan-out with 4-16 modems per terminal server.

Your ISP provides you with a gateway for routing packets to/from the Internet.

The ISP has one machine that checks your password when you dial-in, and permits access to the services (SLIP) you pay for - routing packets from your host to and from the Internet.

The ISP has other machines to provides you with services that ISP’s are supposed to provide, ie:

• gateway/router (to direct traffic)

• name-server (to convert ”ssc.com” to an IP ADDR.

• name-server to provide MX records to steer SMTP requests

• news-server (to feed you comp.os.linux.announce)

• mail-server (to catch your email when you are off-line)

• ftp + www server with commercial and BBS zones • www-cache proxies (reduces comms time, gets loaded)

• support Remember that most people are still MS-DOS based, and your ISP’s support desk might not have a lot of Linux experience, but when you are connected, and after you have read the FAQ’s, there are a lot of people who may recognise your problem.

2.26 T-H-R-E-E Button Mouse (£7.50)

My very old serial logitech mouse recently got trodden on, and I looked at several on display for £30, and didn’t like any of them. Then I resigned myself to the cheapest I could find without even looking at it. You decide whether you want an Taiwanese mouse in the current political climate. It is a Genius Easy Mouse, and it is brilliant! It is a serial mouse, so set /dev/mouse -¿ /dev/ttyS0, and it is configured as Protocol ”MouseSystems” in /etc/XF86Config and in /etc/rc.d.rc.serial it is gpm -t msc.

2.27 MISC

• Keyboard – 102 key

• Floppy – 3.5”

• mouse extension cable

• keyboard extension cable

• phone extension cable, splitter, ear-plug for voice modem

• jumpers come in two sizes, the larger ones can be scrounged from other cards, small ones (used on disks) are never there when you need them.

• IDE cable for second pair of drives (if absent)

• removable drive bay

• SCSI terminators, extern cables.

• phone line splitters, cables, UK adaptors

• portable diary computer with LINK to PC (cheap not PC)

• PSU splitters

2.28 MISC-II if you have a second 386/sx, MORE, or LESS

• ne2000 - network card (a good clone)

• WD8003 - network card (for variety, any good one will do)

• 3C509B - network card (3COM)

• Maybe - 100 M TP instead of 10 M TP.

• Ethernet cable (T-pieces come with cards)

• terminator - pair of 50 ohm

• cable - null-modem - check spec. Lindy is non-standard

• cable - laplink-par-cable, see PLIP-FAQ for wiring spec.

• cable - 25 way straight thru - overkill for modem but has other uses

• cable - ext-SCSI - check its ROBUST at the cable pinch points

• box - FAX line eliminator (£20) See the ETHERNET HOWTO for more information about cards. An ISA NE2000 clone, is fast enough to run the wire at full speed, but it probably has a high ’cost’ on CPU overhead, hence is ’slower’. I used jumpered IO ADDR + IRQ, so that I don’t have to run a DOS utility to program the card.

2.29 Home Ethernet Cables

If you are building a new network in a tiny office, install the absolute minimum that you can relocate easily. IE loose 10-MB thin ethernet. They’re the cables with ’T’ pieces. You string the PC’s in a line with a terminator resistor plug on the end ’T’ pieces. Unconnected PC’s are simply unconnected. The cable is like TV arial coax. The PC’s are strung in a line.

        X-T-----T-----T-----T-X
          PC    PC          PC

2.30 Office House Cables

TP is twisted pair high-grade phone wire that runs 100-M ethernet -or- 10-M. Every wall socket cable runs to where the HUB is, with a spray of cables sprouting out of the wall. Each tagged wire has another 2 metres and an end plug (you need a crimping tool and box of plugs). 7 cables plug into the HUB box (£200) which has a mains plug. That gives you 7 PC’s on a private LAN. IE the entire building. 15 port HUBS are also available. Specify 100-M TP cables, even if you only use standard 10-M TP cards. Burying TP cabling with a BT staple gun is expensive but easy. Digging it up ...

2.31 Office Floor Cables

If you have 100 PC’s on 3 floors, every wall socket is labelled, and runs to the rack cupboard in the room adjacent to the dry riser.

Each work group has their own HUB.

Groups that have PC’s with mixed 100-M and 10-M cards will need a pair of HUBS, and a host to bridge them (or indirect connections via other work groups).

The group’s server is located with the group, and like all their PC’s, it has a TP cable to the local groups HUB.

The group’s server also has a second (hi-speed) card, and it’s TP wall socket, runs to where the HUBS are, then plugs into an extension cable that runs down the dry riser, to the computer room, where it joins a HUB of other groups’ servers.

The group server is acting as a gatway/router, as well as providing it’s services to the LAN-HUB and to the BUILDING-HUB.

Any of the group’s servers can be the gateway, it just needs 2 ethernet cards of the correct types for the cables. If you chain LANS of 15 hosts with gateways between HUBS, you will want to monitor traffic levels.

For example, here are two groups connecting to the central LAN.

         HUB                      HUB                         HUB
         |||                      |||                         |||
         ||+-GW-------------------+|+-------------- -------GW-+||
         ||                        |                           ||
         |+- PC                   |||                      PC -+|
         |                                                      |
         +-- PC                 RHUBLAN                    PC --+

You may need to consult a cabling and networking company to get this done. If you do it yourself you will only have yourself to blame. But at least you can start asking questions.

3 Assembling

3.1 Hints

Before you can load Linux , you must assemble the hardware. And this is Issue-One, all about doing that. Remember to write down the SERIAL numbers of every hardware item.

DON’T PANIC! It’s easy - really. Like MFI-DIY-Furniture; its all a bit confusing, but there are EXACTLY the correct number of screws and cables and sockets and things (don’t drop them). You need two tools - a Phillips cross-head screwdriver, and PATIENCE.

3.1.1 jumpers -aka- DIP switches

Every circuit board has a number of ’jumper’ switches with strange names, to be set correctly. Multi-circuit cards (eg ide + IO + floppy) should have ’disable floppy circuitry’ jumpers (you already have one installed on another card).

Most modern PCB’s have all jumpers clearly labeled, so that you could re-configure them in 5 years time when you’ve lost the instruction sheets (many don’t).

3.1.2 pin one

All connectors have a ’PIN-ONE’ indicator in one corner.

Match pin-1 on the card, the cable and drive. Most ribbon cables have an ink line following wire-one. Occasionally ribbons are put upside-down onto the connectors - but this is rare. Think it out. Some connectors will only fit-one way up (look before losing your head in the tower).

3.1.3 push - click - crack

MANY connectors require a bit of FORCE to push together and pull apart.

Cards do NOT push smoothly into the system board, you have to wiggle them so that you believe they are seated correctly, then push one corner first, and PUSH.

3.1.4 cards that pop out

During this unnerving activity, the system board will bend, so YOU pincer it (you not the case), or else the adjacent cards will slide out (because the system board pulled away). I didn’t notice that, as it looked OK.

Beware of solder on the main PCB, it will cut you (also clean your hands first).

3.1.5 static

Be aware of STATIC electricity. Don’t wear ANYTHING that is 10% non-natural. Take your shoes off. Touch around you, touch the radiator, touch the system case, touch the EARTH pins of the PCB (eg speaker out pins). Never touch or get grease on the edge connectors (finger sweat contains all sorts of chemicals, that eats into the copper connectors). Keep the cat out of the room.

Get the shop to seat the CPU and the memory in the right bank, the right way up.

3.2 System Board Jumpers

The system board sits on a REMOVABLE back-panel. (I didn’t know that). It makes it a lot easier to handle when setting jumpers.

The details for your system board will very, but these are the sort of things you will see documented in the ’manual’:

3.2.1 ON-BOARD battery -vs- External battery. The motherboard has a NON-RECHARGABLE battery, shipped as OFF. 3.2.2 CPU TYPE Tells the MB circuitry to drive one of:

• 486-SX

• 486-DX-2 486-DX

• 486-DX-4

• CYRIX M-3.2.3 CPU CLOCK Tell the MB circuitry to drive the CPU at (MHz).

• 25

• 33

• 40

• 50 486-DX-2 80 is 40 MHz 3.2.4 486-DX4 clock multiplier Selector One of:

• 3

• 2.5

• 2 I presumed that this only applies when you have selected DX4. 3.2.5 CPU power One of: (volts)

• 5

• 3.5 3.2.6 Cache Jumper

This is where you tell BIOS what kind of cache RAM chips are plugged in, and how much you have. EG 256 KB of { 64 128 256 512 1024 }

Cache memory is faster than SIMMS (20 ns ¡ 70 ns), so repeated reads are taken from cache.

3.2.7 VESA clock

I don’t know what this does, but it says 40 MHz ¿ 33 MHz -CLOSE-

3.2.8 VESA wait state

Adds 0 or 1 delay ”wait state” in the middle of bus accesses.

wait states are an extra clock cycles that make bus accesses longer. This allows slower chips more time to read the BUS signals and respond to them. It also makes a difference in noisy environments, or at the other end of a long run, where the rising edge of a square wave, might not be clear enough, soon enough, to be reliable.

It is how a CPU running at 40 MHz (DX2-80), can use memory that is really only designed for 25/33 MHz.

3.2.9 Simms

You might not have to set any switches, but might have to follow instructions in the system board manual, when purchasing and installing simms. EG:

72 PIN SIMMS can be either ”1 bank” or ”2 bank” type. If the 30 PIN SIMMS are also used, they will be bank 2 of { 0 1 2 3 }, so that bank must be free, ie of type ”1 bank”. This may be slower.

Ask the shop to explain.

3.2.10 System board connectors

Having set all the dip switches, and found all the connectors on the system board, install the back-panel into the chassis, connect up the speaker (if you want to), the two special power connectors from the PSU, the various disk LED’s cables etc.

You will need a VGA card installed to see that the system board is OK.

3.3 Assembling Continues ..

3.3.1 Everything should click

allowing for a plethora of different component sizes, every screw in the machine matches up! There is a confusing excess of bolt-holes, and there are two different threads (disk-drive chassis bolt, ISA-card bolt) as well as a range of depths (don’t drill through a hard disk).

3.3.2 Everything should click

Except curiously the plastic pillars that are supposed to hold the motherboard. It tried my patience, I didn’t believe it. I thought about it again, sobered up and still don’t like it. Strange that.

3.3.3 break-away plastic covers

Panel sections where optional CD-ROMS poke thru, and those metal covers where the cards go, have to be broken to be removed (unless you are into metal fatigue). Do not worry, this is normal.

3.3.4 step by step

Build your system one piece at a time. The first boot is just the monitor, keyboard, video card and system board.

Without any other devices, the SVGA card will still boot and say ”EFA Innergy saver - reducing pollution by 10%.

DON’T power-cycle too often, but special components should be added one at a time. Boot after each installation, and checkthat the cable is not reversed, or up-side-down..

The floppy disk light will blink before boot up, and blink again during boot.

The hard disk light will come on when the system BIOS is looking for an OS to boot.

IF NOT - POWER OFF and check that the cable is OK.

The worst place is after the SVGA has been boot-initialised, before press Del for setup, whilst it’s counting memory and doing it’s memory page layout.

If you get past that, your memory is working, the cards are not rattling loose (eg holding an IRQ line in a strange or conflicting manner) and by pressing the Del key, you get an interactive menu and a working keyboard!

3.3.5 step by step - with Linux

The first boot has no floppy, the second boot is to add the floppy, check that BIOS has found it, and then boot using the boot diskette copied from the CDROM.

Even without disks, you can boot Linux. Now continue adding devices, and each time, look for the device using BIOS, and then using Linux.

Check that particular device is detected, and has the expected configuration (IRQ). Either the driver is built into the kernel, and gets it’s turn to look, or it is a module that is loaded sometime.

After the boot messages, you get the login prompt. Pressing SHIFT-PageUp scrolls the boot text back. The dmesg command also re-lists them.

Check that the device was detected, at the expected address.

Check that the device is working by running a Linux command. fdisk -l lists all disks found and all partitions on them (if any yet).

• Video, keyboard and system baord. BIOS SETUP

• Floppy, BIOS SETUP, boot Linux kernel, dmesg, SHIFT-PageUp

• read the driver’s reports, on-screen or /proc

• Add EIDE card (no disks), boot Linux

• EIDE brings floppy, parallel and serial. Check if you have them.

• Add EIDE disk (s), BIOS SETUP, boot linux, fdisk -l

• Add EIDE cdrom, BIOS SETUP, boot linux, mount /cdrom

• Add NET card. boot linux, check detect, insmod ne.o

• Add SCSI card, BIOS-SETUP, CARD-SETUP, boot linux, insmod aha2940.o

• Add MODEM card, boot linux, setserial, minicom

At some point, you will get bored with booting from the diskette, and go for an actual Linux install. Good Luck!

3.4 BIOS SETUP

Different manufacturers’ BIOS’s have different menus, with special options that only they offer. But they are all reassuringly simple and familiar. Albeit clumsy and with no HELP-TEXT.

The opening menu offers you categories of things to configure such as:

        Standard CMOS
        BIOS features
        CHIPSET features
        POWER MANAGEMENT
        PASSWORD
        IDE HDD AUTO DETECT
        save + exit
        abandon + exit
        load BIOS defaults
        load SETUP defaults

”load BIOS defaults” means take pre-defined ”safe” values from the ROM-BIOS. The BIOS should do this automatically, when it detects a CMOS checksum error (eg never booted before).

load SETUP defaults means revert to values as previously saved (is as now).

Standard CMOS
DATE =
TIME =
A: = 3.5"
B: = ABSENT 5.25"
C: = 1.2 GB 2240 cylinders (etc)
VIDEO = VGA
BIOS features
BOOT_SEQ = A: then C:
shadow ZONE = disabled
CPU Internal cache = enabled
EIDE Block mode disabled (helps Linux take control of blocking)
CHIPSET features
Auto configuration - use to get better defaults then disable
DRAM WAIT STATE = 1 WS
ISA Bus clock = CLKI / 4 (-?- 10 MHz)
VIRUS - detect and prevent write to fdisk or boot sectors OFF
        otherwise the system will HALT when you run fdisk
POWER MANAGEMENT
detect system activity = watch keyboard mouse ...
spin down EIDE after 2 minutes idle
switch CPU into 1/2 speed
VIDEO OFF = blank_screen -or- monitor SYNC blank

I use spin down, and it is sometimes irritating as it takes a handful of seconds to come back. If this is a code page for the X11 SVGA driver or a swap page for an application, the screen may ’freeze’ during this time, but you will hear the disks spinning up. Hopefully this won’t be followed by the other disks also spinning up!

I have not yet configured the range of screen-off power saving into BIOS and would prefer to do it through Linux. The X11 documentation suggests that a screen-blanking screen saver is semi-useless, you should get the monitor into standby mode, where it burns a lot less phosphor and energy. However the X11 screen saver is a blank screen (the VC is power-saving off).

Or switch off at the front panel, rather then wait for timeout.

If you have a monochrome display, there is an F5-color key somewhere. eg SHIFT-F2

Design Bugs permitting, BIOS’s are clever programs that can detect a serial UART at any standard IO PORT address. BIOS’s are dumb programs, you can tell them things that aren’t strictly true.

The BIOS can tell you that the disks are installed and talking sense.

3.5 BIOS settings

The Motherboard manual tells you exactly how to set the dip-switches and jumpers. It also lists ALL of the options you will be presented with during the ’press DEL to run SETUP” stage. Note that ”Load BIOS defaults”, means LOSE all existing config, and revert to the most cautious settings possible. Do that ONCE, then think hard - the safe options will REDUCE the speed of your system. However pushing options to their limits may cause ’intermittent’ failures (eg memory parity errors).

In addition, overclocking CPU’s can cause them to deteriorate, until they become marginal and fail. ie they get older sooner.

3.6 BIOS detects disks

I have a VLB multi function EIDE x 2 UART x 2 PARALLEL. You may have these on the mother-board, saving a PCI slot.

In the same way as detecting serial UART chips, BIOS can detect IDE controller card chips. The system BIOS will probably only be aware of the FIRST IDE controller of the pair (and the first two disks). The Linux kernel will detect the second EIDE (and the other two disks). DOS won’t use the second EIDE controller until you get the DOS device drivers loaded (the IDE controller -or-just- the cdrom controller). LILO can’t be loaded from the second EIDE controller, because BIOS can’t see it.

3.6.1 BIOS detects disk geometry

The BIOS display menu for the disk drives allows YOU to tell BIOS what to tell DOS (ie disk geometry). With E-IDE, BIOS can now grope disks for their geometry and manufacturers label - by asking them!

If you get an option to ”search for disks”, it will take a long time if the device is not there. If it comes back quickly with the right answers, then your disk drive is plugged in, not upside down.

Now that your keyboard, screen, memory, UARTS, disk, CD, floppy, BIOS settings ... are all working, you can proceed and boot an OS from the floppy, which will then load an OS onto the disk. Configure it to boot and boot it!

3.7 BIOS BOGUS disk geometry

DOS has a 1024 reachable cylinder per disk limit, which makes disks bigger than 0.8G pointless (DOS), so disks and BIOS collaborate to halve the number of cylinders and double the number of heads (or quadruple), and you program fdisk with the fake geometry (which is now 1024 or less).

The DOS World BIOS will probably be aware of disks with more than 1024 cylinders - but be unable to do much about it, except double the number of heads and half the number of cylinders. This figure is what is told to DOS when booting. see /linux/drivers/block/README.ide Linux does not need this! Linux has the option of doing the same as DOS (for the fdisk information), or using the drive’s ”real geometry”.

Personally I put my boot partition (16 MB) and my DOS partition below 1024 cylinders, and then the Linux stuff upto the line and beyond. I don’t use fake geometries, I prefer things to be ”as they are”.

I don’t use any strange DOS software to tell other lies about the disk geometry. This only creates confusing FDISK entries, and may prevent interworking between DOS and Linux, or even prevent them from co-existing!

Your software MAY be supported, but it’s easier not to use it.

3.8 BIOS IDE HDD Block Mode = Disabled

The BIOS IDE menus may also offer you options to optimise your EIDE controllers and disks, when using them from DOS without any drivers. These should be disabled so that the DOS driver (in config.sys) or the Linux Kernel can take control of the card without BIOS interfering.

Setting this switch does not disable the facility on the card, it stops BIOS from using the facility. If you are running an intelligent driver, you don’t want that.

If IDE HDD Block Mode is ”Enabled”, BIOS will use it, DOS-without-the-driver will use it, but DOS with the driver WON’T, and Linux won’t either! SEE: hdparm(1)

Set it to Disabled.

3.9 BIOS Shadow, cache,

BIOS offers the option of shadowing memory zones, and disabling the cache in memory zones. If the on-card memory is a program ROM that is run a lot (eg the SVGA BIOS in DOS) enable shadowing. The system BIOS copies the slow ROM to faster RAM (Maybe this is outdated on PCI/VLB cards?).

Linux does not use the SVGA BIOS, or other ROMS. It has equivalent code built into the kernel. Having shadowing enabled is using up memory pages for no reason (unless you often run DOS). DOSEMU also expects it to be disabled. (usually).

If the on-card memory is actually a special communications buffer for the device (eg network packet data in, or POKE data to this memory location to make the device do something) then DISABLE the cache for those zones, otherwise three reads (of different values) will be optimised by the CPU/board into one read, ”assuming memory doesn’t change itself”.

Disable shadow-ROMS every-where.

Go through your list of cards, disabling cache over device memory pages. Some BIOS’s may already disable cache where a DRAM page is not mapped. ie any on-card memory that is detected in the area where cards appear is either shadowed (and cached) or not shadowed, and not cached. No DRAM page is mapped there.

It doesn’t make a lot of difference, but you do want ROM’s to be cached, so that boot-up is quicker.

3.10 BIOS Clocks + TIMEZONE

The easiest thing to do is to set the PC clock to your local time, so that it makes sense to you and to DOS. You will have to adjust the clocks twice a year, when they go forward and back (spring + fall).

The correct thing to do is to set the PC clock to UST-Universal-Standard-Time, ie GMT. You tell Unix that you have a ’local’ clock that is different from GMT by a fixed amount, and that summer-time is apparently 1 hour later. This is set by the Slackware installation setup into /usr/lib/zoneinfo and /var/adm/setup/setup.timeconfig. I selected the GB-EIRE zoneinfo file.

NOTE: If your system CMOS battery loses power (eg whilst installing a card), you have to set the time in BIOS setup, not from Linux. This is because setting the Linux system time, doesn’t write it back to the CMOS.

3.11 Device Addresses: IRQ IO ADDR MEM ADDR

These are three independent types of address. MEM ADDR (either ROM or buffer space) is in the same domain as your 16 Mb RAM.

3.11.1 Memory Addresses

Memory usually holds programs or data. Certain regions of the PC’s first megabyte, are ’reserved’ for different functions. Cards with programs installed on ROMS will make the ROMS ’appear’ at a specific (configurable?) address (ie an 8K block of addresses).

The different cards must have different addresses for their ROMS and data buffers. The Video BIOS is the easiest, as everyone agrees on vague standards.

Linux will use its own device driver, and not the one on ROM. So shadowing won’t help Linux, but it will help DOS. Windows uses it’s own driver.

The Video BIOS tells DOS how to drive the video hardware. It’s on the card, and usually installs at a well known address. If you do a lot of work in DOS, you may wish to set SHADOW BIOS ON that area of memory, so that the system BIOS copies the ROM into RAM memory at boot time. This is much faster than accessing the ISA bus. However (1) this reduces the pool of memory (available above the 1MB mark), (2) Linux and Windows don’t use the card BIOS’s (except for booting), and VLB/PCI card speeds are almost as fast as main board memory. I switch BIOS shadow OFF everywhere.

DATA BUFFER memory, appears on Ethernet cards and other devices that do INPUT. Either the CPU or the CARD may write to this memory, so the CPU must NOT assume that it hasn’t changed since last time it did an access. You must set CACHING off on these areas.

You must tell DOS-EMM386 to avoid all these areas in C:\\config.sys:

        device=emm386 noems x=d000-d7ff x=dc00-dfff

Note that DOS uses a 4 digit hex number, whilst Linux uses a 5 digit hex number. This is because DOS is using 8086 SEGMENT addresses, which are shifted by 4 bits (one hex digit).

3.11.2 IO address

IO ADDR RANGE (eg starting at 0x320), is a smaller range of addresses of hardware IO registers (eg to control UARTS or motors). You have to make sure that no two cards have overlapping address RANGES (but no-one tells you how big each range is!). When you install a card you will have to tell the DOS driver where it is, or help the Linux driver find it sooner

C:\\config.sys
device=C:\\ETC\\CDdriver.sys /P:320
/etc/lilo.conf
append="sbpcd=0x320,LaserMate"

3.11.3 cat /proc/ioports

0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0070-007f : rtc
0080-009f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : npu
0170-0177 : ide1
01f0-01f7 : ide0
02f8-02ff : serial(set)
0300-031f : NE2000
0376-0376 : ide1
03c0-03df : vga+
03e8-03ef : serial(set)
03f0-03f5 : floppy
03f6-03f6 : ide0
03f7-03f7 : floppy DIR
03f8-03ff : serial(set)

NOTE: you have to be running Linux, for cat /proc/ioports to work! First you have to plan what it will look like. It’s also how you know that the modem card’s serial UART was detected.

3.11.4 IRQ - Interrupt ReQuest lines.

There are very few of these, and again each must be unique. Often cards are programmable by DOS or Linux (or their own driver.sys), to take a specified IRQ. Often there will be a ’pre-reserved’ IRQ address line for that type of device. These should be listed in your board docs eg:

0       timer
1       keyboard
2       -cascade- from IRQ8 to IRQ15
3       COM2
4       COM1
5       LPT2            <- Internal Modem
6       FLOPPY
7       LPT1            <- Parallel Port
8       CLOCK
9       -FREE-
10      -FREE-          <- WD80x3 (Ethernet)
11      -FREE-          <- BUSLOGIC  || Adaptec
12      -FREE-          <- NE2000
13      FPU
14      IDE-CTRL-1
15      IDE-CTRL-2      -FREE-
see logfile: /var/adm/messages

3.11.5 IRQ - cat /proc/interrupts

These are the values currently in use by the kernel . Hopefully the device is using the same values.

interrupts may be currently ”un-loaded”, eg lp.o hasn’t been used for 15 minutes, so kerneld has unloaded it, and IRQ 7 isn’t really free, because lp might want it back. (see tunelp).

0:   255599   timer
1:     5629   keyboard
2:        0   cascade
4:    10674 + serial
8:        0 + rtc
12:        1   NE2000
13:        1   math error       # kernel did that error to test it
14:    24060 + ide0
15:     4777 + ide1

AFTER you have set up a working machine, you may be able to re-arrange how the IRQ’s are allocated. Linux can SHARE IRQ’s between devices. eg COM ports can share IRQ’s, because the driver looks to see which UART actually generated the interrupt. This will depend on your devices and drivers (and patience).

IRQ’s on the ISA bus, CANNOT be shared by different CARDS (unless you are extremely lucky). They can be shared within the same CARD (or motherboard).

Linux can drive two EIDE cards, giving 4 EIDE cables and 8 EIDE drives. You may need to find a free IRQ, or take one away from the printer (making it a polled driver), or get the printer to share the EIDE Cards IRQ (is this possible?) if it is a multifunction card.

3.12 Software setable cards

My genius NE2000 clone, is software programmable to change IRQ’s and IO PORT addresses.

However this gave me two problems: firstly the software that does this is DOS based, and I would have to boot DOS to set it. Normally you only have to do this once, but some cards may need it every cold boot. Some cards have a Linux utility to do the same.

The second problem, was that the software/hardware needed to have the old settings to reprogram it to the new settings! Since this conflicted with another card, I was stumped.

The answer was to ”hard” set the jumpers, to IRQ 12. Then it worked a treat.

3.13 Device Addresses: LILO and /etc/conf.modules

Linux has to ”guess” the settings, so that it uses the same addresses as the card. This can be done in three ways (assuming that hard setting it in the kernel source is not wanted).

(1) The kernel driver gropes a list of addresses, and gets lucky - before it gets unlucky, and gropes something that doesn’t like being groped!

read the kernel source for the list of typical device addresses, and the SomeThing-HOWTO, and other docs on your CDROM. Some cards only have 3 IRQ options, so pick yours.

(2) You tell it on the LILO command line and the driver picks up that value, when it runs.

        LILO: raven ne=0x300

(3) You tell the loaded module in /etc/conf.modules. In this example, knowing the IO address is enough, the driver tickles the card, and sees what IRQ line it chuckles on.

        # /etc/conf.modules
        alias eth0 ne
        options ne io=0x300

(4) Other

3.14 Keep a record of your configuration and switches:

If you’re going to take the lid off, you should do a quick hardware audit of the machine That means fetching the printout from the database, and comparing a few landmarks.

It helps the PC’s owner if you know which disks it has, what kind of cards, etc. Basically every machine has a free-form text page, with serial numbers and mod levels, extra notes OK.

Print-out the following, write over it, type it in.

(these are NOT all from the same machine).
ISA-BUS CD-ROM
IRQ              <NONE> # for me anyway
IO_ADDR 0x320           # uses maybe a dozen
MEMORY  ----            # NONE or DUNNO
PART NO
SERIAL          7029218
LILO            sbpcd=0x320,LaserMate
BUSLOGIC SCSI
IRQ             11
IO_ADDR 0x330           # 12 < 16 ?
ROM             0xDC000 # 0xDFFFF # ie DE000 - 1
P/N             ---
Serial          41027 327
SCSI            7 (could be 6 on shared bus)
Adaptec 1542b (in a second machine!)
IRQ             11
IO_ADDR         0x330
DMA             5
ROM             DC000 + 16k
BIOS            3.10
HOST SCSI       7
NE2000
IRQ             12
IO_ADDR         0x300
MEMORY
Serial          E11 145857
MAC             00 C0 DF 45 08 DA
SMC Elite-16
IRQ             10

IO              0x280
Buffer          0xd000 +4000 = 0xd3fff
Serial
MAC             00 00 C0 6C 5E 41
IDE-second
IRQ             15
IO_ADDR -
MEMORY  -
IDE-first
IRQ             14
IO_ADDR -
MEMORY  -
Serial          DY0 Z505A 39570
Video CL5429 2M
Memory  - standard VGA locations
ROM             0xC000 +32k
Serial          090Z5 02Q12 372
Alto modem
IRQ             5 (or NOT??)
Serial          1721 5911 A
BIOS            1.021A (Feb 95) (checksum error)
IBM disk IDE
P/N             85G2272
serial          3H94490151
Geometry:
Quantum Maverick IDE
P/N             MV54A011 rev 02-g
Serial:         33 55 00 86 41 95 F
SCSI extern case:
model           E-MTB-353

        serial          09408604
M26235A DISK SCSI:      (broken and Fujitsu won't replace!)
        P/N             B03B-7195-B015A # N
        Serial          12171   (1991-06)
M2694ES-512 812A
        Serial
        Geometry:       C=21072 H=186 S=57
SQ5110                  Syquest 88 M cartridge
        Serial
        Geometry:       C=      H=    S=

So if someone sells you one of these 'real-cheap', gimme a call.

COM-PORT-UART-TYPE      8250    16450   16550   16550A[F]
---------------------------------------------------------
COM1:   IRQ 4   0x3F8           16450
COM2:   IRQ 3   0x2F8           16450 (poor choice for modems)
COM3:   IRQ 4   0x3E8                           16550AF
COM4:   IRQ 3   0x2E8
LPT1:           IRQ 7 0x378
ROM-BIOS        F000 +64k

To get this info, look in /var/adm/messages, and MSD Utilities, Browse
/proc for what the kernel thinks is the case.

3.15 And Now ?

The first time you read this, you are planning to do this, allocating addresses from the cards. Do remember to build your boot disks in advance, from another machine that can read the cdrom.

The second read, is when you are plugging in the cables and devices.

You’ve added them, one at a time, and now

4 IP ADDR - Allocating IP Addresses

During Installation, you will give the machine a name, and a position in the networking world. If you have an Internet account, you have an IP address. If you have an Ethernet card installed, it should have an IP address.

4.1 Allocate your own PRIVATE LAN IP addresses

See also: rfc1918 (previously 1597) Address Allocation for Private Internets.

• Think of a number from 0 to 255. Your LAN is — 67 —

• Number each host from 1 to 199. Your PC is — 50 —

• Never 0, never 255.

• The IP address of your machine is 192.168.67.50

• The IP address of private LAN is 192.168.67.0

• The IP netmask is 255.255.255.0

• The IP broadcast is 192.168.67.255

If you are creating an Ethernet network, you must allocate a unique TCP/IP address for each network and for each machine. How do you do this ? Think of a number? How do you know that your number will not conflict with someone else number? What is the ’right’ thing to do? Many documents tell you to ’consult your network administrator’, hmm.

4.1.1 Allocate 20 LANS per Site

        Newcastle       192.168.140.0
        Manchester      192.168.160.0
        Reading         192.168.180.0
        Dial-ins        192.168.200.0 # off-site PC's with modems + SLIP | PPP

Actually multiples of 16 or 32 might be easier if you have a real national network, as you could then use bit masks to pick the correct route. However, you will probably only have occasional links between them, such as dial up batch email delivery, so building routing tables won’t be a headache, but remembering numbers will be!

4.2 Properly registered addresses

A TCP/IP address is an Internet address. A ’proper’ Internet address is one allocated and registered by the Internet authorities, and it is unique in the world. No-one else is allowed to use the same address.

If you have an Internet service provider, they will allocate you one of their numbers, and register your machine name and address in the correct places.

Your Internet provider allocated your modem dial-up IP ADDR. This address is valid the world over - any caller will be directed to your machine (if you are online). They also allocate and publish your email address, so when you are off-line, their email machine accepts email on your behalf, and batches them until you get connected.

4.2.1 Privately allocated addresses

If your PC is connected to Ethernet you will have a second IP address. If you have an Ethernet card, you have a LAN. Unless it’s registered, it’s a private LAN.

Your private LAN will have private addresses. Several address ranges have been reserved for this. They allow you to allocate your own IP addresses, without having to ask anyone. Note that they are PRIVATE, you can’t use them to communicate with the PUBLIC Internet.

I presume that you have both a SLIP (PPP) account, and a local LAN.

4.2.2 Address conflicts

Other people will also use addresses in the PRIVATE range (conflicting with your use of the same range). Neither your network, nor theirs remote network can communicate with the ”The Internet”. Only your registered machine(s) is allowed to send packets to and from the Internet. Your private machines can only communicate with other private machine addresses.

As long as all your machines have unique addresses, you will be OK, except that you can only use the Internet from the REGISTERED host.

Yes there are tricks to get around this.

4.2.3 EMAIL gateways

Your REGISTERED machine has TWO addresses. It can talk to hosts on both the public and private networks. When your global EMAIL arrives at the REGISTERED address machine, the post room forwards it to the correct local machine (over the PRIVATE network). Similarly outgoing mail has to be sent via the post room on the gateway, which will send it directly to the destination, or the destinations nominated EMAIL exchanger, or probably your service providers EMAIL exchanger.

4.2.4 PROXY gateways / firewalls

If you want a private host to connect directly to a host on the public Internet, you can’t. You can only initiate/receive comms from the REGISTERED address. However, you can build up your network so that your private machines ask the gateway to do this for them. The return address is the gateway, which then relays the results back to the private host (in real time, on a packet-by-packet basis, not SMTP batched EMAIL files).

To do this, you will need a firewall machine or PROXY machine that is properly configured, and lots of client APPS on the PC’s that understands that flavour of PROXY. Not all apps are proxy aware, and there will be extra work configuring the security options of the firewall.

IP Masquerading is about getting the gateway/router to substitute addresses in every packet between a private machine and the Internet. It works with TCP, but not (so well) with UDP, and utilites like ping.

4.3 RFC 1918 reserved address ranges

The reserved private ranges are:

        10.0.0.0                - upto -
        10.255.255.255
        172.16.0.0              - upto -
        172.31.255.255
        192.168.0.0             <-- SUGGESTED
        192.168.255.255         <-- RANGE

So for example, you decide to number your machines:

        192.168.67.1
        192.168.67.2
        192.168.67...

4.4 What is IP and what are IP addresses?

IP (Internet protocol) is a system for transporting packets - networking. Each packet has a destination address - a 32 bit IP address.

Routers retransmit packets that they receive to other routers that know how to reach the remote network. Routers talk to other routers, and can redirect traffic - hopefully via the best route.

TCP is a system (protocol) that uses IP packets to implement reliable connections (with retransmission, timeouts etc). Hence TCP/IP (over).

The 32 bit IP address is split into two parts. The split can be at any bit boundary, but a typical split is used in ’C’ class addresses 24:8

        |<------ NETWORK --------->|<-HOST->|
        +--------+--------+--------+--------+
        | BYTE   | BYTE   | BYTE   | BYTE   |
        +--------+--------+--------+--------+
        +--------+--------+--------+--------+

        | 192    | 168    |  67    |   3    |  HOST 3 on LAN 67
        +--------+--------+--------+--------+
special | 192    | 168    |  67    |   0    |  Address of LAN itself
        +--------+--------+--------+--------+
special | 192    | 168    |  67    |  255   |  Broadcast to LAN
        +--------+--------+--------+--------+
        | 192    | 168    | 100    |   2    |  Different LAN
        +--------+--------+--------+--------+

All the hosts in a physical LAN share the same NETWORK address. Two host addresses are reserved: zero and all 1’s. The NETMASK-SPLIT for our sample network is 24:8, so the Host part of the address is simple.

192.168.67.255 is reserved for broadcasting to ALL hosts on LAN 67. 192.168.67.0 is reserved to describe the LAN itself. 192.168.67.1 is your first host (upto 254 in a C mask LAN).

4.4.1 running two networks on the same LAN - no benefit

If you have two network addresses in operation on the same LAN wire, both will run concurrently. You may get communication between them, especially if there is a gateway on the LAN, which listens to both broadcasts.

This is not a good idea, unless two independent departments share the same LAN wire, or you are testing something.

4.4.2 sub-netting - don’t do it

If you have more than 254 hosts, you should not run them all on the same wire. Split your network into chunks so that each LAN uses a C-class address. You may wish to have fewer (eg 14) hosts on a LAN, with 16 such mini-lans inside one C-class address range. However most people with small office networks will have more address space than time, and would use several ordinary C-class network addresses, with default bitmasks.

Redefining the position of the split is ”sub-netting”. Its biggest benefit is to allow several LANS connected by gateways OR bridges, to share in broadcast traffic, and act as one ’logical’ LAN.

Sub-netting’s biggest use is in re-defining a huge block of B-addresses as blocks of C range, and configure them as such.

The problems are mostly in configuring in the correct mask values in the correct places. It is easiest to leave the hosts (ie not gateways) on LANS with upto 254 addresses, and the standard broadcasts.

4.4.3 NETMASKS

An IP address is really a 32 bit number (that’s binary), it’s just usually printed in dotted quad decimal for readability. This address is split into two sides: network and host. The split can happen any where (if you use sub-netting), but there are three ’default’ recommended splits, depending on how may hosts you want to have on a network.

These are class A, B and C. The 192 range is within the class-C range where the split is defined as

24 bit network part (left = high) 8 bit host part (right=low)

So your network address is 192.168.67. , and the host part is …3, which combined gives 192.168.67.3

Although the default interpretation of 192… addresses is class-C, and that has a split of net.net.net.host it is possible to redefine the boundary line. If you did that, you would have to tell all the hosts about the special splitting boundary line. This is done using the NET-MASK and BROADCAST address. That is called sub-netting,.

Note that any routers, outside the LAN, can be told a slightly different story. If all of Manchester fits under one bitmask, (and noone else does), you can route traffic towards Manchester by telling the routers about the bigger bitmask (sub-net), but still telling every host within Manchester to use the standard C-class sub-net mask.

In binary logic, a MASK is used to AND or OR, to select bits of data or to mask them off (de-select them). With the default split line, most of the networking software can guess correctly at the default. You may need to calculate the following numbers in-order to configure the TCP/IP interface devices (eth0 sl0), and routing software. ifconfig(1) route(1)

Converting binary to decimal, 11111111 is 255

        netmask  = 255.255.255.  0      11111111.11111111.11111111.00000000
        hostmask =   0.  0.  0.255      00000000.00000000.00000000.11111111
        netaddr  = 192.168. 67.  0        -192- .  -168- .01000011.00000000
        broadcast= 192.168. 67.255        -192- .  -168- .01000011.11111111
        hostaddr = 192.168. 67.  3        -192- .  -168- .01000011.00000011

NEVER have a host at address 0 or at address 255. Host address 0 is reserved for the network itself and 255 is reserved for broadcasting to every host on the network. (If you have a different net mask, re-read as host part all ’0’ or host part all ’1’, and avoid 255 and 0 anyway).

So now you should see that the 192.168 range gives you 254 networks of 254 hosts If you only have one Ethernet LAN, simply PICK-A-NUMBER (eg 100) for the LAN address. If you have four LAN’s pick 100, 101, 102, 103 for them. Actually you can have 256 networks, no problem, but why allow confuse in the door?

The only real problem you may have is when your company merges with another company, or you decide to link networks together. If you both have picked the same network addresses, one of you will have to move. So pick a magic number (67) at random (not 1,2,3 ...).

4.4.4 point-to-point networks

Each network must have a unique network address, if you experiment with SLIP or PLIP (SLIP over a parallel cable), you should really create a new network address for the cable itself, and two numbers for the hosts.

This is not absolutely necessary, as the two ends are ’point-to-point’ when you can re-use the Ethernet address. Doing so works because the two networks are otherwise disconnected, and every packet has an unique destination and origin.

4.5 MULTI-ADDRESS machines

Now your machine has TWO IP addresses! One for the SLIP connection via the modem, one for the LAN connection via the Ethernet card. One is globally registered, the other is privately registered and publicly ignored.

This is only confusing if you let it be. Every network has a network address, every interface card has a host address, and most machines only have one interface card.

A host with several (physical) connections to several networks, has several addresses.

There is also the special ’loopback’ address 127.0.0.1, which is used to allow hosts to talk to themselves.

4.5.1 /etc/hosts

IP addresses exist whether or not they are listed in /etc/hosts. This is just a mechanism of finding the address from the NAME. Of course it makes sense to keep a central host up-to-date with all the hosts on the network, and document which addresses have already been allocated by editing this file.

The job of /etc/hosts (finding IP address of hostname) can be configured to be done over the network. That’s how you can call ftp.Microsoft.com without it being in your /etc/hosts file.

After the IP address, the first name in /etc/hosts is the ”proper name” of the host, followed by abbreviations, and aliases. Multi-address machine will have multiple lines for the same name.

If you use /etc/hosts in preference to NIS+BIND, it makes it harder for hackers to feed you lies about your own network addresses (it also provides a list for them to try out).

4.5.2 /etc/networks

This file is a list of network addresses (without NETMASKS - confusingly). It is only really used by the ifconfig and route commands. It is limited by it’s lack of NETMASK.

4.6 Ethernet MAC addresses (-aka- DTE address).

Every Ethernet card in the world has a unique MAC address, on a plug in PROM. This is put there by the manufacturer (though most cards can be programmed to pretend to have a different address!).

This address is used within the LAN segment, to uniquely identify the card (and host). You don’t need to know the address, it all happens automatically. You might have to program the address into any ’secure’ bridges.

When running IP over ethernet, it is the MAC address that gets used in the ethernet packet headers. ARP and RARP is all about converting MAC addresses to IP addresses (and reverse). Inside the ethernet packet is an IP packet with the IP address, and the ethernet packets have their own checksums, and often retransmission protcols.

5 Sysbuild

You’ve assembled the machine and DOS boots from floppy. All the devices have been detected, and operate. You’ve got got the blank boot floppies, (or the disks prepared from your friends PC a working CD-ROM). You’ve got your netmask ready, You want to install Linux.

Actually, you should have used the BOOT disks to confirm that the devices are detected, using linux to check each device as it was installed.

When the kernel goes through it’s initialisation, each driver in the kernel, reports on the device it initialises, confirming it is there, and has the correct IO ADDR, IRQ, Ethernet MAC address, etc. If these scrolled by too quickly, the text is written to /var/adm/messages (after the disks have been mounted rw). The dmesg command recalls the boot messages, if you can get to a shell to run it. If a driver isn’t included in the kernel, it won’t report anything! /var/adm/syslog is also used.

This is explained much better in the Linux Getting Started documentation that comes with and on your CD. This may even be readable using a DOS viewer. However at the risk of confusing you even more ...

-NB- this was written before Linux driver MODULES were popular. If a driver is not built into the kernel, it won’t be loaded and initialised with the rest of the kernel, but later.

5.1 Documentation

Everybody has to install, as well as here there are documents in:

5.1.1 LDP manual - eg Doctor Linux

        LDP-II          Getting started Chapter 2
        LDP-IV          Sytem Admin Guide - eg swap space
        LDP-VIII        Bootdisk HOWTO
        LDP-XIV         Distribution HOWTO
        LDP-XXII        Installation HOWTO - Mat Welsh
                        The mini-printed inset with the CDROMS.
        LDR1:/cdrom/HOWTO/*.HOWTO - In text format.

If the printed versions are old, look on the CDROM’s or on the net for http://sunsite.unc.edu/mdw/linux.html.

Remember to read through the rest of Raven, before starting. Especially things like formatting the disks (etc). It will make passing references more meaningful as reminders.

5.2 Slackware directories

Slackware(tm) from Patrick Volkerding is arranged to fit on floppy disks, all held under the /cdrom/slakware directory. CDROM distributions include extra things, and it can be confusing to know which directory is which.

Of course things may have changed by the time you are reading this, but you should be able to look for yourself, and annotate this list if things are different.

/cdrom/slakware - the disks with ./a1/package.tgz
/cdrom/slaktest - ./a1 disks configured for CD dependence (AVOID)
/cdrom/slackwar - the installation help texts, dos prgrams etc
/cdrom/slackwar/source/a1       # the sources to Slackware/a1
/cdrom/slackwar/contrib - extra stuff (AUIS, IRC, ...)
/cdrom/slackwar/kernels - should not need - but ... !
#
/cdrom/slackwar/docs - other stuff which might not be in /usr/doc
/cdrom/live/usr/doc - InfoMagic duplicates /usr on the CD
/cdrom/help/booting - and some others
/cdrom/HOWTO/*.HOWTO - In text format
/cdrom/viewer/*  - MS-WIN HOWTO viewer (nice)
/cdrom/utils/FIPS/FIPS.EXE      # shrink a DOS fdisk partition
/cdrom/utils/RAWWRITE.EXE       # DOS write entire floppy (slowly)
/cdrom/HTML/ldp/*.html          # Infomagic put it on cdrom #1

5.3 FIPS.EXE shrank my DOS partition

If your disk is already full of DOS, you should get a second disk for Linux. If that is not possible consider a UMSDOS installation (slow), or use DEFRAG then FIPS to reduce the DOS partition, releasing space for Linux. Most people don’t need FIPS, It is simple, but not documented here..

/cdrom/utils/FIPS/FIPS.EXE      # shrink a DOS fdisk partition

5.4 BOOT ’n ROOT

As always, Linux is changing. The new scheme has better RAM-DISK technology, and loadlin.exe can load the RAM-DISK from the CDROM using the DOS driver. IE you might never need a BOOT+ROOT pair! However, you might not have DOS available to you, and you might not have an EIDE CDROM, ie you require a special driver to access the CDROM, which is where all the extra files are!

/cdrom/utils/RAWWRITE.EXE       # DOS write entire floppy (slowly)
/cdrom/slackwar/boot144/idecd   # ide hd + ide cd
/cdrom/slackwar/rootdsks/color.gz # colour menu setup - not tty

Firstly you need to create a pair of diskettes that will boot Linux on your box. The BOOT disk contains the kernel, and (usually) the LILO program to load it. The ROOT disk contains a (compressed) file-system that gets loaded into the RAMDISK, which gets mounted as ’/’ (ROOT).

The second disk is the easiest to pick. Almost everybody wants the same installation programs (some want text mode - not dialog screen, some want UMSDOS - not performance). I used /cdrom/slakwar/rootdsks/color.img.

        # to copy color.img to a floppy
        # with only DOS access to the E:\ CDROM
        #
        E:
        CD \SLAKWAR\ROOTDSKS
        E:\UTILS\RAWWRITE.EXE   # DOS write entire floppy (slowly)
        #
        # then follow the prompts
        # A:
        # COLOR.IMG

If you have a linux system, you can write out a root floopy with:

        dd if=/cdrom/slakwar/rootdsks/color.img of=/dev/fd0 bs=18k

The bs=18k is optional, but a lot faster, as it writes a complete track in one go (then re-reads it to validate it?). This is why RAWWRITE is so slow! It writes a sector or two, does a full spin, rereads to validate, does a full spin, then writes the next! (Actually Linux has been internally optimised so that this happens anyway, but it used to be true and it still applies to SVR4 and other UNIX’s).

The BOOT disk holds the Linux kernel that will be used during the installation process. You must pick the right one.

There are several supplied on the CD, and you have to pick one that is right for your hardware. The kernel drives the hardware, and you will need to pick a kernel that can drive yours - ie the CDROM and the root partition DISK DRIVE.

Other options such as network controllers are probably less relevant to the process of installing Linux base and packages from CD to disk. If the kernel you select doesn’t have the correct CD driver, it won’t be able to read it. Ditto for the hard disk. If you have an EIDE CD, it uses the same driver as the EIDE hard disk - which is now standard.

If you have a SCSI disk (that you are installing to, or from a SCSI CD), you will need a kernel that can drive your SCSI CONTROLLER. If you have a IDE CD and disk, then the kernel will include the EIDE driver.

If you have a special CDROM, you need a kernel that can drive it (or install some other way).

If you don’t have a CDROM, but do have a second machine, you can connect them using ethernet, parallel cables (see plip) or a null modem serial cable. You will then need a boot kernel that can drive your ethernet card, or has plip or pppd or slip built in (or available as a module). Then you boot, and configure TCP/IP on the card. Then you establish NFS or SMB over TCP/IP (SMB is used by windows-for-workgroups, WIN-311, WIN-95, NT, but you might have to convert the WIN-311 from netbios to TCP/IP using a freely downloadable module from microsoft).

With all these methods, you are estabishing local access to the slakware directory, which you configure as the ”SOURCE” directory, with the ”TARGET” directory being your new Linux root partition.

If your booting system uses MODULES, it is much the same, but the driver is a separate module on the floppy, not built into the kernel. This allows more flexibility, but also more care and attention to detail. Unless you use some really fruity SCSI disk, you needn’t worry. It is perfectly OK to use an older kernel to install a newer Linux with.

If it works, it is SO easy. If it doesn’t, you will have to work a bit. Use your imagination, you need the CDROM to read the /slakware/a1/files.tgz (etc). But you may be able to pre-load them onto an MSDOS partition, or make them available over NFS or even SMB (or even floppies!). Having a second machine helps, but is not necessary. If the first attempt fails, and it looks like the start of a long session, use LOADLIN to boot the kernel from MSDOS. It is a lot faster (though you will probably have to remove config.sys to get sufficient memory).

5.4.1 BOOT disk

Look in /cdrom/slackwar/boot144, If it’s not mouted as /cdrom, use mount(1) or df(1) to see if it’s mounted on /var/adm/mount or elsewhere.

You can use DOS and the rawwrite.exe program to read the help texts and create the disk.

Boot from the boot disk and switch to the root disk when prompted.

You will get a prompt BEFORE the kernel is loaded off the boot disk. This enables you to set special options to be passed to the kernel, eg /cdrom=/dev/hdc. The BOOT disks already have a few parameters builtin to the LILO configuration. You probably don’t need to type anything here as the kernel can usually ’grope’ the hardware to find what it is looking for (if it is there). But it is an option that helps if the kernel doesn’t look at the IO PORT where you installed your hardware, or crashes by probing a device that didn’t like being probed, or ...

More modern BOOT+ROOT diskette pairs, may fit onto one floppy! There may even be a third disk (ie soon a second diskette) with a collection of kernel driver modules (and other stuff) on it. This would enable you to boot+root off the first diskette, then mount the utils floppy which you could always customise with any special drivers you need from your supplier (the LAN-CARD, SCSI-CARD or CDROM).

5.4.2 ROOT disk

Look in /cdrom/slackwar/rootdsks.

The ROOT disk gets loaded into a RAM disk, where it is used to complete the boot. It contains programs like /bin/login, /etc/passwd, /bin/sh ... so that you can login. If the ’ls’ command is missing, try cd /bin ; echo *

5.4.3 RAM disk

When you use BOOT+ROOT, they are configured to copy the ROOT disk to a RAM-disk (size 1440 Kblocks). This frees up the floppy device, for those who don’t have a CD-ROM. During normal system use, you don’t have a RAM-disk (unless you want one).

People installing with only 4 MB ram, might have trouble, as the RAM-DISK is eating up their space. In that case establish some swap space as soon as possible.

5.4.4 login as root, run setup

Login as root (there is no password) to get a login shell (an open prompt), type setup to run the Slackware installation program. This program will go through a series of steps to configure your machine.

You could do much of this from the command line. The setup program calls programs, that you could call directly. Doing so will help you understand your machine better, and you will still be able to run the setup program and have it take over. The setup program seems to be quite aware of second-attempt installations, and detects all sort of things (though it can get tedious re-typing in names, and ’y’ to obvious options).

REMEMBER: ALT-F2 switches to the second console.

Before or during setup you will

• fdisk your disk into partitions,

• run mke2fs to create a blank file system,

• run mkswap to create disk swap space,

• mkdir, ’mount’ and ’umount’ to mount partitions.

You or setup will edit /etc/fstab on your HARD-DISK (the one on the RAM-DISK evaporates when you reboot). You can mount DOS disks (eg floppies) with:

        mkdir -p /dos/a         # -p does a mkdir /dos first - if required
        mount -t msdos /dev/fd0 /dos/a
        ...
        umount /dos/a

This will enable you to save+load /etc/rc.d/rc.inet1 files when upgrading, but beware of dos filename.ext (8.3) not matching unix long filenames.

5.4.5 BE AWARE

This is UNIX (not). You are the system administrator. You are supposed to know what you are doing, the machine obeys. You say ”jump off a cliff”, it’s gone.

Many commands do include sanity checks, and will notice if a device does not exist or is unusable because it is currently IN USE for something else. But avoid these hand rails, you only have yourself to blame.

Generally, in day-to-day operations, there are sensible checks, but system installation is about doing crazy things, like deleting file-systems, setting up swap sections, and generally setting the indicators that daily operations will check, over-riding any established indicators.

Before pressing return: relax, check the device numbering (eg /dev/hda4 -vs- /dev/hdb4), avoid using ¿ when you meant ¡ . Hopefully, we’re building a new system, so any loss is time not data.

If you forget to do something in setup, you can probably reboot and do it later. Look in /var/adm/setup for the scripts. Really, all slackware does is untar the files to the root directory, run a shell script to create sym-links (/install/doinst.sh gets moved to /var/adm/scripts), and runs any special setup-script, to establish an initial configuration.

The brains of slackware is the setup script that does all the /etc/fstab editing (which you can do manually), /etc/lilo.conf editing (ditto), and maintaining a few lists of lists of files and package descriptions, and of course the huge task of integrating a system that works.

If you want to do it manually, you only really need a text editor to prepare /etc/lilo.conf and /etc/fstab so that it will boot. You may find an editor on the cdrom or your old system (I once used PICO the PINE editor, it was very strange, but very simple).

5.5 READ THIS IF NOTHING ELSE

• Use the BOOT+ROOT disks, run setup.

• Run fdisk to partition your hard disk, create a swap space.

• Create a small partition below 1024 cylinders, to boot from (see later).

• Install the base (a1) disks.

• create an initial /etc/fstab (Using setup)

• Find a usable kernel (q1). Install it with LILO (via setup).

• Use setup, configure host to select your keyboard, time-zone-info. name your modem, mouse, cdrom.

• Reboot ...

• Load the networking (n) disks. The required packages will get installed by default, and the others offered to you.

• If you need to build a kernel, load the ’d’ disk series (development = compiling), and either of the kernel source trees on the ’k’ disks.

• Load all the recommended AP apps, it’s stuff like man pages, groff, ...

• Load all the other packages you want.

5.5.1 Notes

Do not install more than ONE pre-compiled kernel (q1-q9). The last one in overwrites any previous ones. Maybe it won’t boot your machine if you don’t have the right disk controller driver! Either cnews or INN (don’t mix).

5.6 Won’t Boot Independently

I’ve had sytems installations failing for every reason under the sun. The earlier incidents were from ignorance of Slackware’s setup, but many of the other’s just happened, and Slackware’s simplicity (?) came to the rescue,

EG At one time the Adaptec and BusLogic SCSI controllers confused my 1542 card, Passing the LILO option BusLogic=0 didn’t help (no effect!), and the only BOOT kernel with SBPCD on it, also had BusLogic. To get the right kernel driver, I had to boot without SBPCD.

I’ve installed using a second WIN.311 machine to read the CDROM, feeding the CDROM to a booting slackware diskette over smbfs.o (I needed to copy the .o module file to floppy). I’ve even recompiled a kernel from the BOOT+ROOT environment. I hope you never have to. With Modular kernels you probably won’t have to, you’ll just need to get that cd driver.o onto a floppy so that you can read the other driver.o files.

Note: Slackware helped me, but slackware setup script usually got in the way, eg installing with NFS is easy, as long as you don’t have to type in the numbers to the dialog boxes, again, and again ... until you get it right. It’s esier to run the commands manually, and install from a ”pre-mounted SOURCE directory”.

5.7 Using CHROOT to build a kernel from the BOOT diskettes

        chroot /var/adm/mount /bin/sh
#       -----------------------------
        cd /usr/src/linux
        make config
        make dep
        make
        make zdisk
# NO?#  make modules
# NO #  make modules-install

The chroot command, makes /var/adm/mount/usr/src/linux appear as /usr/src/linux, and /var/adm/mount/etc/lilo.conf appear as /etc/lilo.conf.

As soon as it runs, sh probably puts out an error message, because it can’t find the current working directory (outside the chrooted zone), but cd / soon fixes that.

lilo -r /var/adm/mount uses a similar trick, to allow you to install lilo from /etc/lilo.conf, when that is currently mounted beneath /var/adm/mount.

If you have a pre-installed partition, you can run it’s commands with the chroot command. EG if the new partition won’t boot, but you can use the BOOT+ROOT disks, you can then get access to the ”full” set of utilites, that you have installed (but can’t boot to).

Be careful with chroot, and things like mounting a disk twice, or forgetting to unmount it.

        chroot /var/adm/mount /bin/sh
        cd /    # tidies up error message "cannot determine PWD"

        vi /etc/fstab
        vi /etc/lilo.conf
        mount /hda4
        lilo
        umount /hda4
        exit

Another reason for not being able to boot independently, is that BIOS needs all the boot files to reside below 1024 cylinders. If you forgot, try loadlin.exe from DOS or a boot floppy.

5.7.1 Boots Independently

Don’t throw the BOOT+ROOT away (or boot disk creaed with make zdisk), just because you don’t NEED them anymore! You can use them as REPAIR disks, for when something goes wrong.

Load the X11R6 base, called XF86 SVGA, not XF86 Mono or XF86 Mach3 unless you have that kind of card. The LAST X11 server installed will override the LINK from X to XF86 SVGA.

Load the X11R6 contrib section (xdvi, xpaint), as well as the xview libraries and apps.

Install all the backward compatibility libs, a.out and X11R5 if you want to. There is still some of it about (PRE-ELF, occasionally pre-POSIX, k+r originals).

Slackware gives you the choice of two kernel sources. Disk3 has others, but slackware arranges them better with symbolic links - which prevents two source trees overlapping. Build a kernel for either ALL your cards, or the minimum to boot (the other devices are supported as modules).

Install as much of the other series of disks, as you wish. DO NOT SELECT ALL TeX fonts or your disk will be full before you start. Ditto for all EMACS gadgets.

Don’t install cnews and INN on the same machine! If you don’t install either, you can use netscape, pine, knews or skim.

5.7.2 A few packages more ...

Remember that /cdrom/slackwar/contrib contains loads of goodies, like AUIS, which may sound like an X25 protocol, but is actually a very nice X11 wordprocessor, with a spread-sheet / table editor. That is slackwar with a c but no e. Where you found the BOOT disk.

The other disks also contain Arena (an up and coming browser), an archive of kernel increments, apple comms, TCL-TK apps libr (old/new tk), TeX fonts.

5.7.3 Misc Admin (After boot)

Copy the huge /cdrom/ls lr file from the FIRST disk to /tmp, then you can grep(1) for things like hdparm, to see who has the latest version for you. Ditto for MANIFEST.

When you desperately need space, rm -rf /usr/doc then use the copies on /cdrom/live/usr/doc. If you do delete it, recreate it with mkdir /usr/doc, so that new docs have somewhere to go.

Run updatedb, then locate README.ide The slackware version of mc-2.0 does not do justice to mc-3.1, one of the finest programs in existence. grep /mc /tmp/ls lr or ftp it. add youself as a user with adduer and set passwords with password root and passord user (forget? me? no!) edit /etc/profile, setting ignoreeof=2, PS1=”$LOGNAME@$PS1” edit /etc/fstab, setting up correct permissions for cdrom, dos-uid, exchangables. edit /etc/XF86Config, xvidtune, locate README.Cirrus, see X11 configuration. edit /etc/rc.d/rc.inet1 (and others) with routes to eth0 (explicitly, not the default route, leave that for when you dial Internet). edit smb.conf, dosemu.conf, /etc/rc.d/*, PPP.HOWTO, README.Tunnel Get some sleep.

5.8 Formatting the disks ..

You need a Linux partition, a swap partition.

5.8.1 FDISK Splits the disk into (upto) four main partitions.

Any of the 4 partitions can be ”extended-partitions” divided into sub-partitions. NB ”ext2” also uses the word ”extended” - a coincidence. As long as DOS doesn’t complain you will be OK, Linux is very flexible. The FDISK information is written on sector 0, and no-where else on the disk. If you accidentally get it wrong, you can run fdisk again to redraw the partition boundary lines and get your original data back - PROVIDED YOU KNOW WHAT THE ORIGINAL VALUES WERE and HAVE NOT MODIFIED THE DISK IN ANY OTHER WAY. Use fdisk to create your root, swap, dos and maybe boot partitions. Check that your system will boot from files below 1024 cylinders. Put the correct tag on the swap partition. If you don’t create a swap partition, you can create swap FILEs. The 4 partitions can have any numbers you choose, not just the sequence on the disk. That is how I created hda4 to boot from, which appears before hda1 (the main partition). There are two versions of fdisk (as well as the DOS versions). fdisk and cfdisk. cfdisk is supposed to be more friendly (curses menu version), but it can actually be more confusing. The real difficulty with fdisk is knowing how big to make each partition (etc), not with the commands that make fdisk do it! Use fdisk, and accept that it is a boring TTY-text application with simple commands (new partition, delete partition, tag partition, x-tended commands / export mode).

5.8.2 fdisk -l # lists all partitions on all drives.

Each partition has a partition TAG that tells Linux (and DOS) which operating system this partition is intended for, and whether it is a SWAP partition or a file system. fdisk has a list of tags to help you.

See the next chapter for more details on fdisk.

5.9 mke2fs - make ext2 file-system on partition

Creating the partitions, with fdisk, creates raw partitions areas. The information on them is random magnetic junk. A logically structured index of files needs to be written using the ’mke2fs’ command. (Make file system). DOS uses the FORMAT command.

Linux understands a number of different fs layouts, the one used for hard disks is the ext2 fs, (they extending the Minix fs for bigger disks producing ext, then they extended the specification to a second version - ext2, you NEVER want plain ext).

The partition device name is the partition number 1 − 4 on top of the disk device, eg /dev/hda4 on /dev/hda. The mke2fs program is intelligent enough to get the disk size correct, but proceeds IMMEDIATELY to initialise that partition, erasing any files that used to be there (note that the file data blocks are not actually overwritten, but the index is).

The ’superblock’ is the root of the index, and you get a few ’backup’ copies just in-case. The ’fsck’ program knows where to find them. The inode table is the index of the disk. Linux-ext2 actually splits the partition into several zones, each with it’s own inode tables - but you don’t need to know that.

        mke2fs /dev/hde3        # CHANGE THIS OR DIE

mke2fs won’t ask for confirmation. Its effect is immediate (and devastating). Check your typing. It operates with extreme prejudice.

5.10 mkswap - prepare swap partition

Swap space is used as a virtual extension of memory. When running, pages of 4K bytes memory are swapped in and out of RAM to/from disk as needed (or not recently needed). If you don’t have a swap partition you can use a plain file -see mkswap(8).-

The swap partition will get overwritten (destroyed slowly) if it isn’t really a swap partition. To prevent this, the swapon and mkswap commands check the partition tag, and mkswap puts a marker to indicate that it has prepared a swap partition. The mkswap command is run once during installation, other than the device being CURRENTLY mounted, or nonexistent, mkswap won’t check much.

        mkswap /dev/hda5        # change this
        free                    # check that the swap section isn't yet used
        swapon /dev/hda5        # if not in /etc/fstab
        swapon -a               # loads those listed in fstab

        free                    # see the difference

Remember to edit /etc/fstab, otherwise the swap sections won’t be loaded when you reboot. eg X11 will freeze mysteriously and totally.

Remember that the /etc/fstab on the hard disk is not the same as /etc/fstab on the RAM-disk!

You don’t have to have any swap space, but you won’t get any virtual memory. When real memory runs out, malloc and sbrk will return FAIL, and your applications will print error messages and fail gracefully.

Unfortunately XF86 SVGA the X11 server, does not program defensively against running out of memory, and will simply crash your machine. (Try connecting with TCP/IP or a second VDU).

(After some USENET discussions, it seems that there are other problems that make it difficult to correctly predict when FREE space is completely exhausted. Personally, I hope things will get better.)

Without swap space, Linux cannot free up memory pages by writing data pages out to disk. This leaves it fewer pages to cache program binaries in, and it has to reload program pages excessively. If your system seems slow, use the free(1) command to see how much free space you have, and how much swap space is available.

If that seems ok, use the top(1) command to see if any processes are consuming ’too-much’ CPU time (locked in a loop), and kill them.

5.11 How to boot with LOADLIN.EXE

If you find yourself booting from the floppies a lot, you can sve yourself some time by booting DOS and then using LOADLIN.EXE to boot Linux.

You can specify all those parameters that LILO also allows, but they can appear one-on-a-line, (which is much neater than /etc/lilo.conf). Copy all the files onto c:/boot1 and create two files:

5.11.1 kestrel.bat

        loadlin @kestrel.txt

5.11.2 kestrel.txt

This is a DOS text file, ie CR-LF, not just LF. Calling it .txt makes it easy to access. Commented-out lines are OK, as are multiple driver config lines

        c:/boot/2-0-7.knl       # the kernel file on C:
        # c:/boot/vmlinuz       # a different kernel
        # root=/dev/fd0         # floppy disk
        # ramdisk=1440          # loaded into RAM
        root=/dev/sda4          # the root partition MUST be specified
        sbpcd=0x320,LaserMate   # saves ages when groping
        # aha1542=0x330,11,4,5  # sample parameters for a card

# buslogic=0            # bug # cannot diable !!

If you have DOS 6.0, you can edit config.sys to present you a menu of different boot profiles, including a range of Linux options. I don’t have DOS 6. If you have System Commander or other, follow it’s documentation. (I don’t, I use LILO on the MBR and occasionally DOS 5 + WIN.311).

5.12 Mounting disks

Creating disk file-systems does not bring them online. /etc/fstab makes it a lot easier, but you can issue the commands manually (as root).

mount                           # see what was mounted before
mkdir /mnt                      # usually already exists
mount -t ext2 /dev/hda4 /mnt    # bring the disk online
mount                           # see that is is mounted
df                              # shows disk free space
umount /mnt                     #
other similar commands (examples)
mkdir -p /dos/c
mount -t ext2 /dev/hda1 /dos/c
mkdir /cdrom
mount -t is09660 /dev/hdd /cdrom
mkdir -p /sparrow/cdrom
mount -t nfs sparrow:/cdrom /sparrow/cdrom # requires working TCP/IP
mount -t ext2 /dev/hda5 /mnt            # possibly a root disk
mount -t ext2 /dev/hda6 /mnt/boot       # boot partition
# Slackware setup may use /var/adm/mnt or other

The /etc/fstab on the hard disk is not the fstab on the RAM-disk. This can cause confusion that wastes a lot of time! Slackware setup will help you setup a working /etc/fstab on your hard disk. Then you can use much simpler commands like:

mount /cdrom
mount /sparrow/cdrom
mount /hdc2             # I choose dir names similar to the device

5.12.1 /sbin/e2fsck

If an ext2 partition isn’t unmount’ed cleanly (eg you pressed reset mid flight), you won’t be able to mount the partition fully until the e2fsck has had a look at it.

        /sbin/e2fsck /dev/hda1

You should be able to mount the partition readonly, either by booting in single user mode, or from the BOOT+ROOT pair, using

        mount -r -t ext2 /dev/hda1 /mnt

This is how the boot process runs e2fsck from the disk that is being checked! A risky thing to do, but for a list of reasons, it usually works! This is also an option if the disk or the interface is faulty.

If you did boot single user mode, and have to fsck the disk from itself, you can either reboot, or remount the partition (rw) with the command

        mount -n -o remount,rw /

5.13 /etc/inittab

Normally when the system boots, you select the disk partition to boot as the ’root’ partition ’/’ by configuring the LILO parameters (or LOADLIN.EXE). The kernel mounts the root partition read-only (initially) to prevent a sick system trashing the disk.

After loading and initialising, the kernel starts the one program it knows about: /etc/init. This has to be on the root partition! /etc/init then goes about it’s job of bringing the system up. This includes mounting all the disks, and remounting the root partition (rw). /etc/init is a program and not part of the kernel. It reads the parameters from the kernel and /etc/inittab, and decides what to do - ie run /etc/rc.d/rc.S, then /etc/rc.d/rc.M and the getty’s. The files in /etc/rc.d are all shell scripts.

rc.S runs fsck on the root disk and remounts it writable (rw), and fsck’s the other disks and mounts them - according to /etc/fstab. It also runs the swapon -a command, which reads /etc/fstab.

You do not need to edit /etc/inittab, except when you want to tell /etc/init to start a ’getty’ on a serial line, or boot into a different run level (eg xdm).

If you need to add /sbin/kerneld to your rc.S file, add it before it is needed, eg just after the fsck part.

5.14 /etc/fstab

This file tells Unix what disk partitions to mount, and what partitions are easily available later. This is an example, you MUST tailor this to your system! You can put comment lines in

        /dev/hda1       /            ext2        defaults   1   1

        none            /proc        proc        defaults   1   1
        /dev/hdb1       swap         swap        defaults       0
        /dev/hdc1       swap         swap        defaults       0
        /dev/cdrom      /cdrom      iso9660     defaults,noauto,ro,user 2 0
        /dev/hda4       /hda4        ext2        defaults   1   1
        /dev/hdb2       /hdb2        ext2        defaults   1   1
        /dev/hdc2       /hdc2        ext2        defaults   1   1
        pigeon:/cdrom   /pigeon/cdrom nfs       defaults,timeo=14,intr,noauto 0 0
        crow:/          /crow        nfs        timeo=14,intr,noauto
        /dev/fd0    /dos/a   msdos defaults,noauto,noexec,user
        /dev/hdb3   /dos/c   msdos defaults,umask=001,uid=1016,noexec   0 2
        /dev/hdb3   /dos/x  umsdos defaults,umask=001,uid=1016,noexec,noauto    0 2

The root partition MUST have the correct /dev/hda1 device name. It will still work with the wrong value in /etc/fstab (the actual value used is determined by LILO, eg with root=/dev/hda1), but everyone gets confused if it’s wrong, so make sure they agree.

The root partition MUST be first. Any lines before it WONT get mounted properly (a bug maybe).

The swap lines should be in the file, and should be correct, otherwise the system won’t have enough virtual memory, and may crash inside X11 or other. There is a safety margin, that the swap partition has an fdisk TAG that indicates that it is swap. swapon -a tests that tag.

The /cdrom line does not have to be there, and slackware works without it, by having a specific mount command in /etc/rc.d/somewhere. You should add it. You may also need to run a command like

        ln -sf /dev/hdd /dev/cdrom      # ie cdrom -> hdd

to indicate the real device for cdrom is the fourth ide disk. After that you won’t need to reconfigure workman, workbone or /etc/fstab (unless you have more than one CDROM or a jukebox!)

Then you can change disks with:

        umount /cdrom
        mount /cdrom

provided, of course, that the disk is not is use, eg programs running from it, or pwd says that it is in use by the current shell (or on a different shell, different console, or parent shell!).

The lines like /hda4 use rather un-imaginative names for the mount points, but I like this scheme, since it is what it is. In practise each additional disk has several roles. When I want decent names I use symbolic links, eg:

        /usr/andrew     -->     /hdc2/andrew    # shared by old+new
        /usr/local      -->     /hdc2/local     # beware of tar, check the link
        /home/gps       -->     /hdc2/gps       # lots of ftp files there
        /kernels        -->     /hda4/kernels   # < 1024 cylinders
        /boot           -->     /hda4/boot      # < 1024 cylinders
        /old            -->     /hdb2           # the 'old' booting system
        /new            -->     /hda1   # diff /old/etc/fstab /new/etc/fstab
        /hda1           -->     /               # for regularity

Remeber that extra things don’t HAVE to be in /etc/fstab, but it’s easier if they are.

pigeon is another host connected with ethernet. It has a file etc/exports/ containing:

        /cdrom  (ro)    # no host validation but probably secure ?

The defaults need investigating, but now I can say:

        mount /pigeon/cdrom

The noauto parameter prevents those lines being mounted at boot time (a long timeout for NFS).

The parameters for the MSDOS partitions make it appear as if every file belonged to user 1016. The ’user’ parameter makes it mountable by users without permission on the device, and every file then belongs to that user (for MSDOS, as is for ext2). The umask should really be split into files and dirs (because of the ’x’ bit), but the noexec makes it safer to navigate without running anything (or allowing suid programs in).

Those with sharp eyes will notice that /dos/c and /dos/x use the same device. This is Ok because it can only be mounted once. Simply umount one, and mount the other. It is just a way of testing whether umsdos, with it’s long file names are worth it or not.

My current opinion is not-really, but I’m not certain. There are parameters to mount (msdos) to control whether long file names generate errors. This needs further work, as a cp -p * /dos/a/safe dir managed to overwrite filename with filename.bak. (Because file.name already had a dot in it!).

5.15 /etc/exports

Note that NFS is not very secure. I had a host it refused to recognise, because I had mis-spelled drycon, and it refused my identity (quite properly). However it was quite happy to tell me whether directories existed or not!

# world
                                /cdrom  (ro)
                                /home/ftp (ro)
                                /home/ftp/pub/writable (rw)
# local - via known gateways -
                *.trix.dircon.co.uk:/home/ftp/pub  (rw)
                         *.trix.org:/home/ftp/pub  (rw)

                       *.lan_44.org:/home/ftp/pub  (rw)
# PPP - claiming to be -
                        *.lan_22.org:/home/ftp/pub (rw)

This is some of the ”fireproofing” applied to the Inet apps, including /etc/inetd.conf, /etc/hosts.allow, ftp.allow, and other files. It works by looking at the IP ADDR of the calling host, and converting it to a host name, then allowing or denying access to that host.

5.16 /etc/profile

This is run by /bin/sh when you login. You may wish to make a few modifications. Test each modification before leaving them.

HINT: If you mess up badly, you won’t be able to login. Keep a root login in a different window, that you can use. Also su - user goes through /etc/profile, whilst su user doesn’t. If you can’t login because you messed up /etc/profile, switch to the other virtual console (using ALT-F2), and fix it.

5.16.1 ignoreeof=2

This makes it quicker if you use CTRL-D to exit a shell

5.16.2 export DISPLAY=${DISPLAY:-”0.0”}

This sets the default DISPLAY that X11 applications will use.

5.16.3 export MORE=${MORE:-less}

Selects the prefered pager. You might also want to run (once)

        cd /usr/bin ; ln -s less pg

5.16.4 PATH=$PATH:$HOME/bin

If you use such a directory.

5.16.5 PS1=”$LOGNAME@$PS1”

Put this at the end of the file, after PS1 has been set, to tell you which user you are (as well as which host you are on). This makes it a lot less frustrating to work as a plain user. You should only run as root when doing root things like repartitioning disks.

5.17 ln -s ttyS0 mouse

If you have a serial mouse on ttyS0, you tell Linux apps where it is, (/dev/mouse –¿ /dev/ttyS0), and what it is (MouseSystems mode). using:

        cd /dev
        ln -s ttyS0 mouse

You also have to tell the two main Linux mouse apps, what type of mouse it is. With X11 (XFree86) you put a line in /etc/XF86Config

        Section "Pointer"
                Protocol    "MouseSystems"
                Device      "/dev/mouse"
        EndSection

Text based apps, means the ”gpm” program. You configure it with a a command line option, when you start gpm. Usually in /etc/rc.d/rc.local

        # don't forget the ampersand, it runs the command in the background
        gpm -t msc &

5.18 ln -s cua2 modem

If you have a internal modem on ttyS2 which is the same as cua2 (but different), you tell Linux apps where it is using:

        cd /dev
        ln -s cua2 modem

From then on, you don’t have to specify /dev/cua2, simply /dev/modem. Most comms programs have that as their default, so many things simply ”fall into place”.

6 fdisk - partition disks

fdisk is the program that splits the hard disk into partitions. You will create

• a 10 MB Linux partition below 1024

• a DOS partition below 1024

• a SWAP partition and a linux partition upto and

• beyond 1024 cylinders.

You will add new partitions (maybe delete old ones) and change the partition tag, which indicates the intended usage of each partition, eg

• 82 - Linux swap

• 83 - Linux native (probably ext2)

• 06 - DOS 16-bit ¿=32 M

• db - CP/M

• 65 - Novell Netware

You need to know the names of the disk devices, and the difference between a partition and a disk. eg /dev/hda is the entire disk, /dev/hda1 is partition one. /dev/hda5 is an extended partition.

Check that /dev/hdd5 exists in /dev, you might have to create the ones you need if they don’t. See mknod(1) or /dev/MAKEDEV.

You need to know that EIDE drives are numbered a b c d, whether it’s a CDROM or a disk. You can’t run fdisk on a cdrom!

        fdisk /dev/hda  # look at first ide disk
-or-    fdisk /dev/hdc  # look at third ide disk (master on second ide)
-or-    fdisk /dev/sdb  # look at second SCSI disk

You probably won’t need to know the disk geometry. Usually Linux gets the correct values automatically during boot (those messages are kept in /var/adm).

E-IDE disks are numbered a,b,c,d ... and SCSI disks are also (eg /dev/sda1), however SCSI disks are ’renumbered’ from ’a’ without gaps, whereas E-IDE disks aren’t. IE a,b,c,d is the sequence of the SCSI disk, not the target LUN address.

Conversely, if you have 2 EIDE disks on the second controller, but only one on the first, there will be a gap, a,-,c,d. The difference is traditional SCSI behavior, which (thankfully) the EIDE driver doesn’t do.

6.1 Documentation

• LDP-II Getting started 2.3.3 Creating Linux partitions (etc)

• LDP-IV System Admin Guide (CH 5 - Using Disks) (CH6 - Swap)

• http://sunsite.unc.edu/mdw/linux.html # maybe on CDROM

• /cdrom/live/usr/doc # and others

6.2 FDISK - 1024 cylinders max

This is similar to the DOS fdisk program, but through a command line interface. It’s very simple taken step by step, but there is an initial hurdle to overcome: DOS, BIOS and LILO (but not Linux) have a limitation of 1024 cylinders (#-MAX) on the disk. Your 1Gb disk is probably double that. FDISK will tell you this when starting,

This problem with 1024 cylinders is well known, and modern system-BIOS’s will collaborate when lying about the number of disk heads (usually 16 or less - doubled up to 32). The trick is to tell the same lie to everyone. However, the Linux kernel (AFTER LILO has found and loaded it), asks the EIDE disks direct. see /linux/drivers/block/README.ide

i.e. if you choose to lie, you will have to tell Linux about the lie - it knows the truth!

LILO and the kernel are accessed by BIOS, which can only read the two disks on the first IDE cable. Create a partition BELOW 1024, but only 10MB, and then make sure that the boot files get in there.

You may be lucky, and have the files on a partition that extends above 1024. (ie the partition reaches above 1024, but the files dont). However, your luck may later run out, and the kernel (or other boot files) get stored above 1024, and your system won’t boot. You will then need your boot diskette (if you have one).

IE the easiest thing to do, is to not tell any lies at all, and create your DOS partitions and the boot partition below 1024 cylinders. Linux (after it has been loaded!) will get the real disk geometry, and use it.

6.3 4 partitions per disk

You have a maximum of 4 partitions, though you can also have sub-partitions, which end up as /dev/hda5, 6, etc.

Linux will run in either primary or extended partitions. LILO also.

Presumably DOS is on a different disk or on the first partition of the disk, using 200 Mbytes or so. Then comes the Linux boot partition (10 Mb) then swap space (30 Mb) then the Linux root partition using 400 Mbytes. A full Slackware installation will use much more than that. You can get a bigger disk, a second disk (see later for how), or be selective in what you install.

Note that Slackware doesn’t guide you to use a 10 MB boot area, this is a fix that you have to implement without it’s suggestion, maybe with it’s help.

If you put the 10 MB partition below DOS, it won’t get in the way when you delete the DOS partition!

6.3.1 30 MB swap partition

30 Mb swap is reasonable, personally I have more, and on each disk! If I get desperate for file space, I can convert it, use it for all those down-loaded things, rebuild the cramped disk, copy the files back and convert it back to swap space.

If it’s not in /etc/fstab it might not get used.

The swap partition has a partition tag type of 82 (fdisk: use the L and the T commands). Run mkswap on it during installation. This is MUCH safer than explicitly naming the device and block count in a file during system boot.

Instead, during system boot (in /etc/rc.d.rc.S) the command swapon -a finds all properly tagged partitions listed in /etc/fstab and uses them intelligently (rather than blindly). I prefer it when /etc/fstab controls swap.

Putting the swap space on a different disk is a good idea, as a disk head movement on the swap area won’t effect the disk head on the program disk. IE put the swap partition on an otherwise unused (DOS) disk.

This helps to solve a compounded problem - when the system needs swap space for data, it saves memory by dropping and reloading program pages. If it has to reload swap pages, and program pages from the same disk, the disk head will be flying between partitions. However this is just a thought for those who have the choice.

If you are building a high spec machine, you should probably install binary and data files one-by-one so that disk head movements are minimised. What order ? Impossible to say without detailed monitoring of activity - try using IFS and a CDROM to get a comparable model. Also using multiple disks and controllers will help.

6.3.2 Deleting partitions

Not all versions of DOS FDISK can delete NON-DOS partitions. Linux can. IE an old DOS cannot delete a Linux partition, you need the BOOT/ROOT pair to run the linux fdisk, or a newer DOS.

6.3.3 Alignment to cylinder boundaries

Partitions are supposed to start on cylinder boundaries (head 0 sector 1), obviously the first partition has to leave room for the boot sectors, so the first track is left, and it starts with head 1 sector 1.

Some people wax-lyrical about disk performance when it IS or IS NOT aligned to track or cylinder boundaries. Outside of the operating system indexes, this is rubbish. Modern SCSI and EIDE drives have a geometry that VARIES. It’s not a spiral, but the number of sectors per track varies depending on which track you are on. The drive itself lies about it’s own geometry, by saying it has a SINGLE number of sectors per track, the truth is that the number of sectors per track varies, depending on which track you are on.

For this reason, the operating system cannot even be certain that a system buffer holds a ’single’ track (or cylinder). It is 99% certain that 1 expected full track is broken across two real tracks, with a tiny head step between them.

Deep down, the operating system knows this, and simply requests sector 123456 of zillions, in a virtual linear space.

However the maths all comes out in the wash, especially when the drive’s internal cache comes into play, and an optimizing OS will get it as close as can be.

In addition, modern drives do their own bad-block re-mapping, so occasionally a disk access will be invisibly diverted away from a scratched block to a previously reserved sector. NOTE: the disk does this itself, if it knows the sector is faulty. You still need to run mke2fs -c with the -c option to check each sector, and build a Linux list of bad blocks that the drive doesn’t know about.

The ’active’ partition tag, is used by software to pick which disk partition to boot (especially useful for DOS). However, the LILO boot-linux-loader can sit on any partition, and is a much easier way of selecting which partition to boot, and even which kernel to load.

If you decide to get rid of Linux, and revert to plain DOS, use the dos FDISK /MBR to write the DOS master boot record over the LILO boot code. OR leave LILO to boot DOS! Having to reload your DOS now, will tell you later that you DO have the correct set of disks to do it!

My LILO is installed over the master boot record (sector 0?) of the first disk, but you can put it as the first sector of a partition (or extended partition), LILO doesn’t mind. In that case, the MBR boot code will be provided by DOS, OS/2, SVR4. system commander, or other (eg LILO!).

Both the DOS and LILO are split into two. The MBR block simply finds a second block to boot. DOS goes to the ’active’ partition and boots the formatted system disk, or the LILO second part (which - thanks to careful coding - can also be the LILO ’first’ part).

You can boot DOS from LILO, and vice verse. OS/2 and SVR4 may be more polarised. I don’t have a win95 (WIN-311 + TCP/IP is OK for me).

I think that LILO is great, but it is infamous because it USED to have bugs, and it can leave the system unbootable if you drive it wrong. A prepared BOOT diskette is usually enough to get access to the CD to re-create a lost LILO diskette. A second machine can make that easier.

Chaining MBR’s and BR’s may be necessary with other operating systems, if in doubt, load Linux second as a taggable partition, and use the boot manager on the fussy system.

6.4 FDISK when INSTALLING LINUX

So now you’re ready to meet fdisk, which is available on the BOOT + ROOT disk pair (see earlier in sysbuild). It’s just a plain text menu that does a simple job. The curses based version cfdisk does the same job, but pretends to make it easier by telling you less.

You will actually be using FDISK later, as part of the sys build.

Create new partitions, of the desired size, that start on logical cylinder boundaries. Set the partition id tags correctly. Remember the 1024 cylinder limitation (especially for DOS and LILO booting).

You can run mke2fs or mkswap on the partitions now, skip the next section.

6.5 FDISK using lies

Do not do this. This is a naff idea. I don’t want to do it again, but I don’t want to delete this text. It’s a description of something that may have happened to a disk, not a recommendation of what to do to it.

It’s for those systems that need more that 1024 cylinders for DOS, and don’t have the drivers, so they DOUBLE the CHS ratios (needing only 600 cylinders or so).

Instead you should create a 10M boot partition and DOS upto 1024 (if that’s what you want). After the 10M boot, linux doesn’t mind, and it’s better to not cause confusion by faking strange disk geometries. If you can, skip this and goto the next section.

Here is a sample session that prints out the tables for a system that uses disk-head-count doubling to fool BIOS. It’s so that the warning messages won’t scare you.

To view a disk with 16 heads used as a 32 head by BIOS: From the fdisk X menu set h option to 32 (or 48 or 64!).

fdisk will then make sense of the disk layout, when it has ’that’ number of heads. Then create or delete partitions using that distortion option.

I don’t know how change to heads to normal, without backing up and restoring all data. I guess you’d just double the information recorded in the fdisk tables to reflect the correct values, and hope you didn’t get it wrong, and that it wasn’t a bad idea. I relocated the data, and rearranged the disk.

             ##############################################################
             ##
             ## SAMPLE RUN OF FDISK TO SHOW 1024 CYLINDERS PROBLEM
             ##
             ##
             ## FDISK detects genuine geometry
             ##
             ## these comments are added later
             ##############################################################
     fdisk:
             root@trix> fdisk /dev/hda
             This disk is larger than 1024, and may cause problems with:
             1) software that runs at boot time (e.g., LILO)
             2) booting and partitioning software form other OS's
                (e.g., DOS FDISK, OS/2 FDISK)
             ##
             ## show me the helpful menu
             ##
     menu:
             Command (m for help): m
             Command action
                a   toggle a boot-able flag                  ### 'active'
                c   toggle the dos compatibility flag
                d   delete a partition                       ### NOTE
                l   list known partition types
                m   print this menu
                n   add a new partition                      ### NOTE
                p   print the partition table

6. fdisk - partition disks 64

   q   quit without saving changes
   t   change a partition's system id           ### NOTE
   u   change display/entry units
   v   verify the partition table               ### NOTE
   w   write table to disk and exit
   x   extra functionality (experts only)       ### second menu
##
## print out the fdisk partition list
## also tells you
##   16 heads
##   63 cylinders
## 1049 cylinders
##
print:
Command (m for help): p
yeuk!:
note: 16 heads
Disk /dev/hdc: 16 heads, 63 sectors, 1049 cylinders
Units = cylinders of 1008 * 512 bytes
   Device Boot  Begin   Start     End  Blocks   Id  System
/dev/hdc1           1       1      48   24160+  82  Linux swap
Partition 1 does not end on cylinder boundary:
     phys=(23, 31, 63) should be (23, 15, 63)
/dev/hdc2          25      49    1048  504000   83  Linux native
Partition 2 does not end on cylinder boundary:
     phys=(523, 31, 63) should be (523, 15, 63)
##
## that looks scary to me
## goto extended/expert mode and scare myself again
## try again after setting 32 heads
##
x-mode:
Command (m for help): x
x-menu:
Expert command (m for help): m
Command action
   b   move beginning of data in a partition
   c   change number of cylinders
   d   print the raw data in the partition table
   e   list extended partitions
   h   change number of heads

6. fdisk - partition disks 65

   m   print this menu
   p   print the partition table
   q   quit without saving changes
   r   return to main menu
   s   change number of sectors
   w   write table to disk and exit
print:
Expert command (m for help): p
still_yeuk:
still 16 heads:
Disk /dev/hdc: 16 heads, 63 sectors, 1049 cylinders
Nr AF  Hd Sec  Cyl  Hd Sec  Cyl   Start    Size ID
 1 00   1   1    0  31  63   23      63   48321 82
Partition 1 does not end on cylinder boundary:
     phys=(23, 31, 63) should be (23, 15, 63)
 2 00   0   1   24  31  63  523   48384 1008000 83
Partition 2 does not end on cylinder boundary:
     phys=(523, 31, 63) should be (523, 15, 63)
 3 00   0   0    0   0   0    0       0       0 00
 4 00   0   0    0   0   0    0       0       0 00
##
## Now I'm seriously worried
## gimme rose tinted specs please
## 32 heads is double 16
## Change number of heads and list again
##
32 heads:
Expert command (m for help): h
Number of heads (1-256): 32
print:
Expert command (m for help): p
phew:
Disk /dev/hdc: 32 heads, 63 sectors, 1049 cylinders
Nr AF  Hd Sec  Cyl  Hd Sec  Cyl   Start    Size ID
 1 00   1   1    0  31  63   23      63   48321 82
 2 00   0   1   24  31  63  523   48384 1008000 83
 3 00   0   0    0   0   0    0       0       0 00
 4 00   0   0    0   0   0    0       0       0 00
##

             ## thats better
             ## return from 'expert' mode sub-menu
             ## and list again
             ##
     return:
             Expert command (m for help): r
             Command (m for help): p
     result:
             Disk /dev/hdc: 32 heads, 63 sectors, 1049 cylinders
             Units = cylinders of 2016 * 512 bytes
                Device Boot  Begin   Start     End  Blocks   Id  System
             /dev/hdc1           1       1      24   24160+  82  Linux swap
             /dev/hdc2          25      25     524  504000   83  Linux native
             ##
             ## future's so bright
             ## we gotta wear shades
             ## - or not -
             ##
             Command (m for help): q
             root@trix:~# \
             #################################################################

7 quick build map

If this is an old version of Raven, you should check for a more recent version. Re-reading this stuff, I think that a lot of rework is needed, and may have been busy since this version found it’s way to your CD or BBS. So your first job might be get connected, and have a look.

7.1 Build base

You have done the following:

• purchased Linux Doc. Project compendium. (Or Linux Bible)

• purchased Internet static IP connection + phone

• built BOOT + ROOT diskettes (and they work!)

• assembled hardware

• confirmed that all hardware is detected and runs OK • installed DOS and WIN311 (if planned)

• built disks and installed base + LILO

• confirmed that all hardware is detected and runs OK

• installed d-disks (devel) and compiled something (kernel)

• installed k-disks (kernel source) and rebuilt kernel + LILO

• edited /etc/fstab /etc/rc.d/rc.local /etc/lilo.conf ...

• installed SEVERAL packages, man pages, compiler libraries, ...

• also ... groff, X11, X11-apps, ...

• created a user, group and set passwords and things.

• scratch configured comms with /var/adm/setup/setup.netconfig

• upgraded to Linux 2.0 (if not a recent distributions)

IE: you have built a minimum base, then a more comprehensive base. Congrat’s you have built a Linux box, and Issue-One can leave it as an exercise to make it usable! This is what most people would call their starting point. You can read and write floppies, so you’re not trapped to rawrite.exe. You can rebuild kernels, so you’re not limited to those on the CDROM.

        dd if=/cdrom/slackwar/rootdsks/color.img of=/dev/fd0 bs=18k

7.2 End of the Beginning.

7.2.1 And that’s it? Yup. You have assembled the hardware ready for a Linux system. You know so, because it just booted. End of issue-One.

7.2.2 But there’s loads left to do Yup. The rest of this is just discussion. You can also find a list of things to do on sunsite.unc.edu, mit.edu or disk3 /cdrom/gnu/DESCRIPTIONS.

7.3 Other distributions

It doesn’t really matter whether you used Slackware, or Red-Hat, or debian, FT or any distribution. These all have their advantages, and features. Hopefully you will see that yesterday you had a blank hard-disk, and tomorrow you will have a system. If one day, the entire machine accidently went pear shaped (by ignoring those various warnings), you can rebuild the BASE from the CD-ROMS, and any FTP packages you fetched. The system can be seen as plug in programmable ROM. Your files in the $HOME directory would of course be lost.

HINT: It’s a lot easier if most things came from one set of CDROM’s.

In a years time, you can decide to upgrade to a different, newer distribution (on a second machine, or second disk). Internet software develops in waves. Now all Linux machines are ’ELF’ based, previously it was a.out. Similarly X11R6 has tempted many applications to use it’s facilities, and X11R4 is an SCCS OFF-branch. TCL/TK language and library versions have changed from 7.3/3.1 to 7.4/4.1. A lot of apps now only run on 7.4. 7.5 is available ...

The new system will be constructed, step by step, starting with the basic boot, going up to configuring each app, to do the same as it used to. You did archive those ftp.tgz files from the Net, but you want to try newer releases anyway.

Most applications unroll into /tmp/pkgs ftp/appname-0.85, and expect to be compiled and tested as a user login. When you are happy, root will do a make install, and delete /tmp/pkgs ftp (or not). Some apps demand their own db admin login, to access files, and run system maintenence.

NOTE: I used to chown files to myself, so that I could edit them, but this opens them up to a cracker’s attack - where somehow my user session (uid) gets hijacked. Any files I can read/write/delete could also be accessed by the cracking utility. Personally, I blame VideoTron for giving me a phone line that is FREE in off-peak hours to my ISP.

7.4 Linux and viruses

People say that Linux is immune to virus, because it is all source. This is complete baloney. The majority of individuals are quite happy to run make install as root without checking the source. Backdoors can be created in a single system call, for use later, or be built into a daemon that normally behaves securely. Most people will install Java browsers, and happily run postscript programs (ie it only really depends on your definition of ’virus’).

There is a bigger risk of crackers having a database of accidental backdoors, and you having a system with the unfixed version. Getting a list of version numbers from your system and patches necessary is a hassle. Maybe these is something on the www pages of your disk supplier.

        MORE INFO REQUIRED HERE, eg comp.security.announce + URL's

7.5 Linux is a virus

Technical arguments aside, Linux IS a virus. Mine arrived on floppy, cleverly working first time, only failing later. When I didn’t have a phone, it invited it’s support army, which arrived snail-mail on CD-ROM. Ie the old VIRUS morphed itself into an updated, and stronger one, jumping from floppy to CD. It encouraged me to buy a 486 and let the 386 out to pasture. The 386 still carries the remnents of the overwritten parition (The BIOS has an 120 M max, plain DOS can’t see the remaining 100 M). It multiplied and split into seperate geographic locations, albeit with one branch currently broken (DOS). It made me get a phone and Internet access, to allow itself connectivity. It encourages me to brush contact with any number of home sites, or ISP servers. It is using me as an agent, to draw other connections in. Now it’s reaching out through these pages ...

7.6 Dial-up IP

For more information about networking see Raven Issue-3. Here is a quick list of things to check.

• purchased Internet connection, modem + phone

• /etc/rc.d/rc.serial # edited to 4 lines for 3 com ports

• /etc/rc.d/rc.inet2 # no changes (check)

• /etc/rc.d/rc.inet1 # netmasks devices routes

• /etc/HOSTNAME - host.domain

• /etc/host.conf - already setup

• /etc/hosts

• /etc/ppp/* # use PPP

• /etc/ISP gw.dip # dip script to call ISP

• /usr/local/bin/dip in # full script to call ISP

• /usr/local/bin/dip out # dip -k

• ftp works to localhost

• minicom -s # can talk to modem #

• minicom -s # can connect to BBS or ISP

• ping ISP gw

• /etc/resolv.conf ping • lynx http://www.site/dir/file.html

• ftp sunsite.unc.edu /pub/Linux/doc/raven/ftp/ssr1-b.tgz

• smail or sendmail ?

• /etc/XF86Config running

• ftp to get Mosaic, and running

• news or tcl-nntp drain

• cola via email

• dial-IN IP, fax out, getty in,

• nfs, samba,

7.7 Other apps

• Use netscape or mosaic to read NEWS from your server

• Use knews under X11 to read NEWS

• Use archie to find netscape or mosaic eg ftp src.doc.ic.ac.uk

• use mc as a filebrowser (mc-3 not mc-2), try CTRL \

• learn vi, or one of the several varients (ELVIS, vim, vile, nvi, ...)

• use PINE or ELM to read mail you have received

• edit /etc/XF86Config to configure X11

• grep samba /cdrom/ls lr | less

• locate samba | less # to find it on the disk

• echo help | sendmail rtfm.mit.edu

• adduser # to add a non-root user # use it!

• check /var/spool/mail/postmaster for non-delivery reports (etc)

• MAC and Netware users - check the FAQ’s

8 /etc/lilo.conf and /hda4 - 10 M below 1024 cylinders

This is some more information in booting using a 10 MB partition. You might have to do this from the BOOT+ROOT diskette pair.

Calculate the top cylinder completely below 1024. Subtract 10 MB. Everything below that above 10 MB is available for DOS.

Make a 10 MB partition for boot files, on either of the first two disk (or every drive if you plan to relocate disks).

This holds all the kernel images, and the files that lilo needs to boot. It has to be below 1024 cylinders on either of the first 2 disks, so that BIOS can find them during BOOT time.

Alternatively, you could copy kernels to a DOS directory. Just don’t defrag the disk without a boot disk available, so that you can run LILO to look for the files with the new disk sector layout. Having a boot disk around is a good idea anyway. (LILO remembers which sectors on the disk, where the kernel and boot files are located. If you run DEFRAG, the files move to different sectors, so you have to run lilo again - but you have to boot to do that!)

To create /hda4 you run fdisk to create the partition. fdisk allows you to allocate the 1 2 3 4 numbers as you choose. Don’t blindly copy this example at it erases part of the disk (no not that part ..)

        fdisk /dev/hda # create part#4
        mke2fs /dev/hda4
        mkdir /hda4
        vi /etc/fstab # add the following line
        #
        /dev/hda4       /hda4        ext2        defaults   1   1
        #
        mount /hda4

8.1 /boot -¿ /hda4/boot

LILO looks for its file in /boot. These files have to be moved to /hda4 and lilo must find them there (but it still looks in the ’standard’ place)

        mkdir /hda4/boot
        cp -p /boot/* /hda4/boot
        mv /boot /boot.del_soon
        ln -s /hda4/boot /boot
        ls -1 /hda4/boot
                /hda4/boot/any_b.b
                /hda4/boot/any_d.b
                /hda4/boot/boot.0300
                /hda4/boot/boot.b

                /hda4/boot/chain.b
                /hda4/boot/config
                /hda4/boot/ftape.o
                /hda4/boot/map
                /hda4/boot/os2_d.b

To see exactly which files you needed, run lilo with lots of -v options (or strace it).

8.2 /hda4/kernels/vmlinuz

When you build a kernel, it will be called ’vmlinuz’. When you are happy with it, edit /etc/lilo.conf and copy the file to vmlinuz-2.0.7, use ’vmlinuz’ as the name of your unknown test kernel.

Twin booting systems will need names, such as ’old’ and ’new’, or simply make a point of using a different (newer) kernel increment, vmlinuz-2.0.8. Note that you might have old and new kernels, and also old and new root partitions. The idea is to install the new root partition, and configure it until it works, THEN you can delete the old. Note that they could all be ”new”, but different, eg Debian, Slackware, RedHat, FT, homw-brew ...

To build kernels direct into /hda4/kernels/vmlinuz, use the command

 #NOT#  make ... zlilo
        make INSTALL_PATH=/hda4/kernels/. zlilo
 # or easier:
        make install

Note that you should edit /etc/lilo.conf, to register each kernel version, so that you will get the option of booting the one that works! As well as vmlinuz.

8.3 /sbin/installkernel

If you want make install to do something special, such as install itself into /hda4/kernels, create a script called /sbin/installkernel, and it will get called by /usr/src/linux/arch/i386/boot/Makefile with the right parameters, when you do a make install

# Arguments:
#   $1 - 2.0.7                          - kernel version
#   $2 - /usr/src/linux/arch/i386/boot/zImage - kernel image file
#   $3 - /usr/src/linux/System.map      - kernel map file
#   $4 - /hda4/kernels                  - kernel install path (blank)

You could then build into /hda4/kernels/vmlinux-2.0.7. And always know what version ’vmlinuz’ was (ext2 fs only, not FAT or minix). The script might look like:

#!/bin/sh
# /sbin/installkernel
DIR1=${4:-/hda4/kernels}
[ -f $DIR1/vmlinuz    ] && mv $DIR1/vmlinuz    $DIR1/vmlinuz.old
[ -f $DIR1/System.map ] && mv $DIR1/System.map $DIR1/System.old
cat $2 > $DIR1/vmlinuz
# OR #  cat $2 > $DIR1/vmlinuz-$1
cp  $3   $DIR1/System.map
lilo

8.4 /hda4/kernels/vmlinux-1.2.13

Because you keep your old kernel images available, and even test them occasionally, you can experiment with new kernels without losing access to a working system (as long as the disk doesn’t get corrupted). If you have upgraded other system components, this might not work fully, as very old kernels may be incompattible with very new system components.

/hda4/kernels/vmlinuz           # experimental
/hda4/kernels/vmlinuz-1.2.13    # tested
/hda4/kernels/vmlinuz
/hda4/kernels/vmlinuz-1.3.41
/hda4/kernels/vmlinuz-2.0.7

Of course other support files, on the system disk also change, eg 1.3.74 uses /lib/modules much more that 1.2.1 did, and modules compiled for one shouldn’t be used with the other.

8.5 /etc/lilo.conf: old-121

Each kernel will have it’s own boot stanza. As will combinations and variations of the other parameters. Here is an example. Notice that the root disk is hdb2, not hda1. The read-only is standard, it means mount read-only, until fsck has had a look at it. It will then be remounted rw.

image = /hda4/kernels/vmlinuz-121
root = /dev/hdb2
label = old-121
read-only
append="sbpcd=0x320,LaserMate"

The append=”A very long line with lots of hexadecimal”, is how you pass parameters to the kernel that haven’t already been passed (root=/dev/hdb2,ro).

In this case it is telling the sbpcd driver to probe 0x320, before taking ages looking at other locations. sbpcd=0 tells the driver not to probe at all. sbpcd is the Panasonic interface to my external CDROM. I now use an EIDE cdrom.

It’s how you tell Linux that your NE2000 card is at 0x300, if it couldn’t find it fast enough (or safe enough). Multiple lines are joined with commas. See also /etc/conf.modules for IO PORT assignments with newer kernels.

The first /etc/lilo.conf stanza found will be the default boot image. The others are available at boot time by pressing CTRL to get the LILO: prompt, and TAB to get a list of labels. The very first stanza is about where lilo will install the boot sector code.

8.6 /etc/lilo.conf: boot = /dev/hda

This tells LILO to install it’s boot sector code at the start of the first disk. This overwrites the MBR sector (Master Boot Record), instead of installing in an ext2 partition. Users of DOS-5 and WIN.311 will find this OK. Users of Win95, OS/2, SVR4 or others may need to install that OS’s MBR and install LILO on /dev/hda4. DOS-6 users can setup their config.sys to provide a fancy menu that selects the boot image, and starts loadlin.exe

It may be possible to move the other OS’s MBR, and call it from LILO, but that would be getting confusing (except for maybe SVR4.0 which doesn’t have a boot manager, except at sys-build time). It would be nice for other manufacturers to allow their MBR blocks to be included in anybodies boot manager (ie openly distributable on CDROM’s). If only ...

LILO can boot DOS and WIN.311 just fine. Other OS’s or versions may require their boot loader to call LILO, not the other way around. Then you would install LILO onto a partition containing an ext2 file system. Ie a partition or extended partition. This is documented in /usr/lib/lilo/doc.

        boot = /dev/hda
        delay = 50      # half second to press CTRL key
        vga = normal    # force sane state
        ramdisk = 0     # paranoia setting

If you have just clobbered your DOS boot sector - you can restore it using the dos command fdisk /mbr c:

You should be able to boot DOS via LILO. If not, then boot using your dos boot system disk. The one that CAN access the compressed SCSI disk. Then you will have to figure out how to make your boot loader, load the LILO loader on the Active tagged partition (/dev/hda4 or /dev/hda1). It may be possible to load a mini-dos partition (using your system boot manager) and run loadlin.exe from there. Loadlin allows simpler/multi-line append= lines, but these are now being replaced by modules.

8.7 /etc/lilo.conf: where to put it

If you have several bootable root partitions, you might get several /etc/lilo.conf files. Not a good idea. It makes sense to put /etc/lilo.conf on the same disk as the kernels, so that you can find it.

Do this for both the old and the new system. They share the same config file.

ls -l /etc/*lilo*
mount /hda4
mv /etc/lilo.conf /hda4/lilo.conf
ln -s /hda4/lilo.conf  /etc/lilo.conf
vi /etc/lilo.conf       # -> /hda4/lilo.conf

I don’t normally put files on the root directory of a partition, but creating /hda4/lilo.conf as a sym-link to /hda4/./etc/lilo.conf would probably confuse you, and might make the file harder to see (hts).

8.8 /etc/lilo.conf

# /etc/lilo.conf
# LILO configuration file
# generated by 'liloconfig'
# overwrite /MBR (entire boot responsibility)
        boot = /dev/hda
# general options
        delay = 50      # from LILO prompt to default
        vga = normal    # force sane state
        ramdisk = 0     # paranoia setting
# /hda1 is the new raven system (elf), soon to be renamed old! ...
# current experimantal kernel
# make INSTALL_PATH=/hda4/kernels zlilo
        image = /hda4/kernels/vmlinuz
        root  = /dev/hda1
        label = raven
        read-only
        append="ide1=serialize,hdd=cdrom"
        image = /hda4/kernels/vmlinuz-1.3.41
        root  = /dev/hda1
        label = raven41
        read-only

append="sbpcd=0,ide1=serialize,hdd=cdrom"
image = /hda4/kernels/vmlinuz-1.3.74
root  = /dev/hda1
label = raven74
read-only
append="sbpcd=0,ide1=serialize,hdd=cdrom"
# hdb2 is the _old system, about to be deleted and replaced
image = /hda4/kernels/vmlinuz
root = /dev/hdb2
label = old
read-only
image = /hda4/kernels/vmlinuz-1.3.74
root = /dev/hdb2
label = old74
read-only
image = /hda4/kernels/vmlinuz-121
root = /dev/hdb2
label = old-121
read-only
# /hdb3 - DOS on second disk requires any_d.b (apparently?)
other = /dev/hdb3
label = dos
table = /dev/hdb
loader = /boot/any_d.b

# NOTES:
# lilo -C /hda4/lilo.conf
# boot=/dev/hda indicates MBR installation of LILO (not boot sector)
# boot=/dev/hda1 indicates boot sector installation of LILO (after MBR)
# boot=/dev/hda5 indicates boot sector installation of LILO (extended)
#
# hdd=cdrom NOT needed for NEC_260,MITSUMI IF driver detects name
# read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# /etc/conf.modules now contains many IO_ADDR settings not /etc/lilo.conf

8.9 /sbin/lilo -C /hda4/lilo.conf

Or just plain ’lilo’.

This command reads /etc/lilo.conf, and builds a table of where the sectors are on the disk, writes out a map file (/boot/map -¿ /hda4/boot/map).

Lilo writes over the MBR sector (or as you configured it), so that when it boots, it loads its own code and can call either the DOS loader, or the LILO loader, to load the kernel and start it.

In addiition to this, the first sector of the Linux kernel image is a floppy disk boot sector, so you can simply write the kernel to a floppy, providing the root=/dev/hda1 has been poked into the kernel defaults (along with any other options).

lilo -v is more verbose, -v -v -v -v even more so.

8.10 /etc/conf.modules

This has nothing to do with LILO, but the IO PORT and IRQ settings that you used to put in /etc/lilo.conf may need to be put there. The reason for this is that the modules are loaded after the system has booted, and modules tend to be more conservative about probing the hardware than the old style kernel drivers. IE my ne2000 is at address 0x300. The old kernel driver used to grope for it and find it. The new driver has to be told its IO PORT address (but it then finds the IRQ).

Similarly, people with TWO ethernet cards, used to see which card the kernel found first, than adjust their configuration to eth0 and eth1. Now you have to tell the modules which card address is which driver.

        # /etc/conf.modules
        alias eth0 ne
        options ne io=0x300

9 Swap Space

The maximum size of a single swap device is 128 MB (man mkswap).

9.1 What is swap space?

Swap space increases the virtual memory capacity of your machine. You have a 16 MB machine. 2MB is used by the kernel and trashed buffers, leaving you 14.

This 14 MB is a window on all the code that can be reloaded from binaries on the disk, and other pages stored on the swap device files. You want to have about 64 MB swap, though you will only use more than 32 MB occasionally.

Inside the intel 386, is a builtin MMU with mappable 4K pages. The 486 and Pentium chips are just 386 chips with go-faster-stripes, and occasional new op-codes. (You can agrue that the ’go-faster-stripes’ are actually significant internal structural changes, but the result is much the same).

In 386 mode, every process gets a virtual memory space of 4 G (addressed with a 32 bit pointer). Most of these pages do not exist. Attempting to read from or write to any of them would cause a MMU-CPU exception, or ’page fault’.

If that page fault was you, trying to use a page of memory that has been swapped out, Linux will reload that page from disk, and rerun the instruction that generated the page-fault, as though there never was a problem (just an unexplained delay). In this way, a 16 MB machine can have a 64 M footprint (or more).

The ISA bus, is not inside the CPU, so DMA may be limited to the first 16 M of RAM. Other constraints might effect how much of the 4 G space, you are actually allowed to control.

Any page can be moved (mapped) to any page location - instantly - and can appear in several places. Pages can be marked for read / write / execute, and all page faults get trapped and interpreted.

Program text and data files get reloaded from their original files (usually :-), but data in memory doesn’t have an original file, so it gets written to the swap file. This happens in units of 4K pages.

In the olden days, and with mainframes, complete processes were swapped in and out in entirity. This makes sense, if you think you can complete the task in the available time + data. But it can be inefficient, moving large chunks of data when 4K or even 1K might be better. Paged memory is better for interactive use, but everybody still calls it swap space.

Programs go through ’modes’, such as startup mode, redraw mode, reformat document mode. Each activity will have a list of relevent ’c’ functions, scattered around the executable, and in dynamically linked libraries. Each activity will tend to look at certain pages of data. Some data pages might be used every time a key is pressed, other might only be used during program startup, then never used again until closedown.

The swapper tries to keep the most frequently accessed pages loaded, at the expense of the least recently used.

Swap space is a partition or a file, for the swapper to write and read to.

Other CPU’s, with their internal/external MMU’s might have 2K pages instead of 4K pages, but the result is much the same. Except that the granularity is different. This may effect applications differently, depending on how the programmers designed it, EG a linked list of objects might be scattered across several 4K pages. Loading 2K pages might be faster, or slower in other circumstances.

9.2 Swap file

If you choose to use swap files, you want to do so on an unfragmented disk, so that blocks in the swap file are sensibly packed. Any swap code optimisation will presume that it is a contiguous 4k page device, and may bring certain pages together.

        mount /hda1
        mkdir /hda1/swap_files
        dd if=/dev/zero of=/hda1/swap_files/swap_16_d bs=1024k count=16
        mkswap /hda1/swap_files/swap_16_d 16384

        dd if=/dev/zero of=/hda1/swap_files/swap_64_e bs=1024k count=64
        mkswap /hda1/swap_files/swap_64_e 65536
# every boot: /etc/rc.d/rd.swap_files
        swapon /hda1/swap_files/swap_16_d
        swapon /hda1/swap_files/swap_64_e
        swapon ...

9.3 Swap partition

Swap partitions may be faster than swap files, because they have a direct route to the disk (the partition is just an area of disk sectors on the disk). Swap space in files may be a bit slower, because Linux has to map swap pages into the file then into disk sectors. However the difference is not much.

        fdisk /dev/hdc  # create a 30 MB partition on a drive
                        # set it's partition tag to 82
        mkswap /dev/hdc12 # change this or die
        vi /etc/fstab   # add the following line
/dev/hdc12       swap         swap        defaults       0
        free            # see how much memory is in use
        swapon -a       # add all swap partitions listed in /etc/fstab
        free            # check it worked

Swap partitions are easier to find (than files) at boot time (the system looks in /etc/fstab), and easier for sysops’s to find (fdisk -l gives a list). However files are eaier to create and delete, without having to rebuild your disk(s).

Swap files may be faster than partitions, when the swap space AND the programs have to be on the same disk, because the swap file sectors are closer to the program sectors (being in the same partition). Seperate partitions guarantees that the disk head will have to move away from this partition. However, seperate physical disks is the best, as neither a swap seek or a program seek effects the other disk, possibly leaving the disk head close to the NEXT request!

True system performence would require a unified cache. It would copy program blocks onto swap space, and have several swap tracks scattered around the active partition (if still forced onto the same disk).

This would be even faster if disk blocks can be transferred by the disk itself, without involving the CPU for every byte. (eg device to device transfers within the SCSI cable, or sector to sector copies on the same EIDE disk).

To me it is more convenient to set up swap partitions on every disk, selecting those on otherwise unused disks, and then forget about them.

10 Twin Boot Upgrade

This is the easiest way to upgrade, but it needs loads of extra disks. If you buy an extra disk to install an upgrade, here is where you use it.

If you have a 2 GB disk, split it into 3 sections (bigger than 660 MB size of a CDROM), and a 10 MB boot partition. You put the swap onto a physically seperate disk, or use extended partitions if you choose (PROJECT: Convert).

Try to arrange it so that opposite ends of the disk won’t be used at the same time, and put a SWAP partition just before the linux main partition.

If you create partitions, edit /etc/fstab. If you create swap files, edit /etc/rc.d/rc.swap files and call it from rc.local (or earlier).

For the really curious, the ext2 fs splits the disk into compartments or zones. Files created under a directory in zone 3 will PROBABLY also be in zone 3. This makes it quite difficult to compare performence of different machine, unless you can set them up to be the same. It also makes it difficult to create swap files near the programs that will need them. In general, just forget about the problem, and put the swap space on an otherwise unused disk. As long as you have enough space, you will be OK.

You setup /hda4/boot and /etc/lilo.conf as before.

You (will) have two independent Linux systems, housed in one box. Only one is active. You can boot the ’old’ system, much as you did yesterday, and do some work, or you can boot the ’new’ system and get it working.

The only thing shared by the two systems are the swap partitions, the lilo boot configuration, /dos/c and your HOME directory (maybe). They run different kernels (eg 1.2.13 and 1.3.74) and use different binaries (eg a.out and elf). You build up the new system, service by service, until it can do everything that the old system could do.

Initially use only new test data, you don’t run the new system on your old data files. You BACKUP your $HOME directory before running on the new system. Or better still you start a new user, without all those .x-res-rc files. Beware! the new version of an app might clobber the old versions file!

Even after switching to the new system for daily use, you keep the old version available, for when the new system can’t do what the old one could.

Some of you will be doing this from the boot+root disk(s), installing Linux for the first time. Others will be doing an upgrade, using their ’old’ system to install their ’new’ system, so that it can boot OK.

To be sure that the new system isn’t using the old system (eg /etc/ld.so.conf), edit /etc/fstab so that the partitions aren’t loaded. If they’re not loaded, your not using them, use df to see.

11 X11 SVGA Display

To make X11 work you MUST configure it.

X11 runs on any supported display driver. XF86 is a well supported driver for Intel (386+) PC displays (and keyboard, and comms, and X11R6 base). See /var/X11R6/lib/doc/README

XFree86 3.1.1 supports many ’brands’ and SVGA chipsets. Most drivers are linked into /usr/X11/bin/XF86 SVGA, but others are available for various species of card, and hardware modes (eg SVGA Mono with 1 bit per pixel).

The video card is driven ’directly’ by XF86 SVGA or XF86 S3, and needs to know the correct set of timing values to drive the card and the display. If you are lucky, your user-group can help you. The answer is on the disks somewhere.

11.1 xf86config

This utility can be confusing. You run it once to create an initial /etc/XF86Config file, which you save with:

        cp -p /etc/XF86Config /etc/X86Config.01

It will offer you a list of monitors, mine wasn’t on the list. Chosing defaults for my 15”, and telling xf86config the bandwidth range, sort of worked. I got better luck from manually editing the file, and grep’ing modeDB.txt.

xf86config will leave you with a working /etc/XF86Config, you just need to improve the list of timings. If you can only get 640x480 working, don’t worry. I do most of my work at this resolution. You will need a larger virtual resolution, so that windows are larger than the screen, and you have to scroll the screen about a lot. The default virtual size is the maximum resolution.

However, it is nice to have 4 resolutions to switch between, to get different views. It makes the following worthwhile ... 24-bit is not covered here, or 1-bit or 4-bit. They use the same timings.

11.2 Installing XF86 SVGA - x14/x312svga.tgz

With slackware, you have the option of loading the driver relevent to your card (eg XF86 SVGA), and having it installed as the X driver. Look in /cdrom/slakware/FILE LIST for a list of other drivers to browse. use mc to view inside tgz files without installing them. To install a slackware package, try:

        tar -C / -zxf /slack/d9/package.tgz
        sh /install/install.sh

If you loaded all the XF86 S3* packages, they use different file names, but the last on in, gets installed as the X file, by setting the symbolic link in /usr/X11R6/bin.

NB: diskless stations often share /usr but not /var, so the /usr/X11R6/bin/X link will probably crossover to /var/X11R6/bin/X where it points back to /usr/X11R6/bin/XF86 SVGA.

11.3 CARD: DOT CLOCK 75 MHz

The card emits a pixel to the screen every full cycle, ie 75 million times a second.

When the beam is ’off-screen’, no pixel is output, and other wires may be sending signals such as V SYNC, H SYNC. But the card still counts in pixels (DOT CLOCK CYCLES) and lines. It may insist on multiples of 8, when counting.

Your card can be switched into a number of different frequencies. You select which work best for you. SEE: X -probeonly and SuperProbe

The monitor also has a maximum bandwith (90 or 140 MHz), above which pixels cannot be resolved by the amplifiers (edges fade, and lines go dim).

Having chosen the DOT-CLOCK (eg MCLK 80 MHz), you need a list of monitor timings that worked for somebody at that DOT-CLOCK. What matters is that they use the same monitor and DOT-CLOCK , not the same CARD.

You find several, and cautiously try them all out. You pick one and calculate it’s timings, and adjust it with xvidmode. Repeat for several modes.

11.4 Monitor: acceptable timings

Your monitor has a quoted ’maximum’ (and minimum) bandwidth, for both horizontal and vertical frequencies. If you exceed them it may catch fire, or not work properly.

These number are not really enough detail. As well as finding out how often you need a H SYNC, you need to find out its acceptable width.

You can find a list of timings that made sense to somebody, in the MONITOR SECTION of modeDB.txt in /var/X11R6/lib/doc. But maybe thay had a fire-proof monitor.

You may also find the SVGA LIB docs useful, they document a NON-X11 system.

11.5 /etc/XF86Config

This is the file where you put the numbers, along with names for them, and your mouse type.

I ran xf86config to scratch-generate this file, then editied in the timings. It sorted out all the syntax (and even got 640x480 working). You could also copy /var/X11R6/lib/XF86Config.eg

It can be located in any of 3 places, to confirm that your file is being found first, delete it and check that you can’t startx because ”No config file found!”

11.5.1 Setting mouse type

I have 3 button genius mouse, which emulates the Mouse-System Mouse.

        Section "Pointer"
                Protocol    "MouseSystems"
                Device      "/dev/mouse"
        EndSection

11.5.2 FRAME: Borders Screen and SYNC Pulses

For an easy life, don’t read this, just find and adjust standard timings. This is for people who want to stretch their hardware to do more refreshes per second, or extra steps of resolutions.

Remember that the faster you make your card work, the more work it has to do - fetching data from memory, and the less time it has for CPU accessing memory, or optimisations (ie the card displays faster, but the machine draws slower).

11.6 Borders

BORDERS are the blank bits. You need them so that you can see the corners.

During the BORDER the beam may be ON screen, no pixels are drawn - and the border colour is used.

Much of the BORDER may be OFF screen, adjusting them will move the image to be central on the display. If a BORDER gets too thin, the drawing area may be too close to the SYNC pulse, or the beam position may be too far away from its expected value.

11.7 Screen Area

This is where pixels actually get drawn. The card will now be accessing its memory, reading bytes and sending pixels.

With 256 colours, each pixel-byte is looked up in a pallette, and the RGB intensities are send to the DAC’s (digital to analogue), which sends the voltage/current to the monitor. The faster you run them, the hotter they get.

The monitor does not know it’s in 256 colour mode or 24-bit mode. The card does.

11.8 H SYNC Pulse

During the H SYNC pulse, the beam does it’s fly-back, and the monitor sync’s onto the repeated H SYNC pulse.

11.9 V SYNC Pulse

During the V SYNC the beam does it’s fly-bak to the top.

11.10 Monitor Sync’s on SYNCs

In addition to fly-back, the monitor sync’s onto the repeated timings of H SYNC and V SYNC. It compares them to pre-set values in its memory, and makes some attempt to scale the image width, height and offset.

The monitor may decide that the timings resemble those of a pre-set, and invoke parameters associated with that preset, ie on the front of the monitor are controls that regulate height and width. They get remembered.

11.11 Timing Layout

The following diagram shows the left border on the left, which makes sense.

  off  visible            off  h_sync
+----+------------------+----+--------+
blank  |TLC |                  |    |        | BP
+----0------------------+----+--------+
|    | visible          |    |        |
|    | screen           |    |        |
|    | area             |    |        |
|    |                  |    |        |
|    |                  |    |        |
|    |                  |    |        |
|    |                  |    |        |
+----+------------------+----+--------+
blank  |    |                  |    |        | FP
+----+------------------+----+--------+
v_sync |    |                  |    |        |
+----+------------------+----+--------+
  BP                      FP

It also makes sense to count from the visible screen area, just remember that there IS a border before it, whose numbers appear to be last.

FP is the front porch, the distance from the end of the screen to the beginning of the h sync and fly-back.

3----+
| BP | visible            FP   h_sync   BP
+----0------------------+----+--------+----+
     | visible          |    |        |    |
     | screen           |    |        |    |
     | area             |    |        |    |
     |                  |    |        |    |
     |                  |    |        |    |
     |                  |    |        |    |
     |                  |    |        |    |
     +------------------1----+--------+----+
blank       |                  |    |        |    |
     +------------------+----2--------+----+
v_sync      |                  |    |        |    |
     +------------------+----+--------3----+
blank       |                  |    |        | BP |
     +------------------+----+--------+----4

11.12 Timing numbers

These two sets of numbers worked on a 15”, the 65 MHz figure flickered at 52 Hz (ie frames per second), the 75-MHz looked more stable at 61 Hz. I used an 85 MHz clock to get 69 Hz, but that may be frying the DAC’s.

You can comment out references to lines you don’t want, and add variations, calling them ”65-1024x768-a”, ”-b”.

Modeline "75-1024x768"    75    1024 1160 1176 1368   768 820  822  903
Modeline "65-1024x768"    65    1024 1168 1192 1392   768 820  822  905

Remember that ’75’ is an abbreviation of ’75.23 MHz’, so get the correct number for the calculations (xvidtune seems to know).

11.13 Horizontal: 1024 1160 1176 1368

Display    = 1024 = 8 x 128  (1024 pixels wide)
BorderRight = 136 = 8 x  17
H_SYNC      =  16 = 8 x   2
BorderLeft  = 192 = 8 x  24
---------------------------
LINE TOTAL   1368 = 8 * 171
---------------------------

The vertical timings are exactly the same format, but don’t have to be ’multiples-of-eight’. Notice how much border time there is, especially off screen left.

If you experiment, changing border timings, or changing the SYNC pulse width, the cycles you add or trim, make it run slower or faster, ie effects the number of frames per second.

11.14 Vertical: 768 820 822 903

Display     = 768 lines
BorderLow   =  52
V_SYNC      =   2
BorderTop   =  81
-----------------
Frame total   903 lines
-----------------

You may have noticed that only 64% (1024x768) pixels are used out of (1368x903).

Increasing 64% to 100%, would require an amazing monitor, and clever double banking memory accesses, or 64 bit memory lines. Accessing 24 bit data would be more.

11.15 Horiz: 75.0 MHz / 1368 clocks per line = 54.8 KHz

This is in range 29-64 KHz, so it’s ok for THIS monitor.

    Bandwidth   85      # MHz
    HorizSync   29-64   # KHz
    VertRefresh 47-120  #  Hz

These figures are ’for your protection’ in /etc/XF86Config. They dis-allow mode lines that go outside these boundries. Many 17” monitors go to 135 MHz, if the card can generate it.

11.16 Vert: 54.8 KHz per line / 903 lines = 60.7 Hz

This is also in spec. Note that simply being in spec, doesn’t make it work or look good! However, going out of spec is not a good idea.

70 Hz is your target for a good display. You can get 100 Hz at 640x480.

11.17 H SYNC PULSE = 16/75.0 Mhz = 0.21 usec

My monitor’s specification came as a set of sample timing figures. You should be able to figure out the formulae to calculate them from the diagram.

Making sense of matching them is not so easy.

11.18 Interlaced mode

These figures have worked for me so far. Just because they haven’t yet started a fire, doesn’t mean that they wont ...

If you do experiment with them, let me know your findings. If you do so with a range of monitors, publish and send the URL.

This shows the different syntax you can use.

        USE THESE AT YOUR OWN RISK!
        ---------------------------
Section "Monitor"
Mode    "1280x1024i_80_a"
        DotClock        80              # 88 Hz # 51.04 KHz #
        HTimings
                1280    # h_resolution          # 8 x 160
                1440    # h_sync_start          #
                1480    # h_sync_end
                1720    # h_end # before pix[0]

     VTimings
             1024    # v_resolution
             1080    # v_sync_start
             1090    # v_sync_end
             1210    # TLC
     Flags
             "Interlace"
EndMode
Modeline "65-1024x768"    65    1024 1168 1192 1392   768  820  822  905
Modeline "75-1024x768"    75    1024 1160 1176 1368   768  820  822  903
Modeline "85-1024x768     85    1024 1152 1168 1368   768  816  818  902
Modeline "50-800x600"     50     800  904  920 1064   600  637  643  706
Modeline "25-640x480"     25.175 640  664  760  800   480  491  493  525
Modeline "50-640x480"     50     640  696  760  850   480  515  520  580

11.19 Switching Modes

CTRL-ALT-PLUS and CTRL-ALT-MINUS zoom through the list, which is pre-arranged in sorted order, found in Section ”Screen”, in the sub section for 8 bit depth displays.

If your monitor has a Hz and KHz display LCD, use it to check. xvidtune gives it’s timings.

11.20 quick route

• Select and install X11 base + libs + utils + apps

• Select and install XF86 SVGA or S3 or Mach

• type X ; ls -l /usr/X11R6/bin/X

• ln -sf XF86 SVGA /usr/X11R6/bin/X

• Find your card’s dot-clocks list using: X -probeonly

• xf86config into /etc/XF86Config

• edit /etc/XF86Config to change the timings figures

• pick a dot-clock rate from X -probeonly

• grep 1024x768 /var/X11R6/lib/dos/modeDB.txt | sort

• pick the lines close to your dot-clock,

• call them ”a”, ”b”, ”c”, in /etc/XF86Config

• start openwin and hotkey to find a usable mode.

• BEWARE: don’t BURN the MONITOR!

• use vgaset to check the numbers

• use xvidtune to check and adjust the numbers

• adjust numbers, RHS first, then SYNC, then LHS

• then VERTICAL, then all again

• collect 4 modes + 25 MHz standard line

• go on to do something more interesting

• ln -s /dev/ttys0 /dev/mouse # and edit XF86Config

11.21 README’s and places to look

/var/X11R6/lib/doc/README         - Hello XFree86 3.1.1
/var/X11R6/lib/doc/VideoModes.doc - HOW TO DO THIS PROPERLY
/var/X11R6/lib/doc/README.cirrus  - glitches + work arounds
/var/X11R6/lib/doc/modeDB.txt     - the answer is in here somewhere
/var/X11R6/lib/doc/Monitors       - the answer is in here somewhere
/usr/X11R6/lib/X11 -> /var/X11/lib
man XF86Config
man xf86config
man reconfig
man xvidtune
man xmodmap
locate modmap
/usr/X11R6/bin/xf86config         - helps write XF86Config file
/usr/X11R6/bin/xvidtune           - view / adjust settings
/usr/X11R6/bin/reconfig           - convert old XF86Config file
/usr/X11R6/bin/SuperProbe         - told me CL-GD5429
/usr/X11R6/bin/viewres            - when X running
/usr/X11R6/bin/X -probeonly       - what is groped OR set
/var/X11R6/bin/X                  - xf86config may put it here
/etc/XF86Config                   - best option -> next option
/var/X11R6/lib/XF86Config         - option
/var/X11R6/lib/XF86Config.trix    - option
/var/X11R6/lib/XF86Config.eg      - example template file
/var/X11R6/lib/etc/xmodmap.std    - xmodmap -e "keycode 22 = BackSpace"
/var/X11R6/lib/Cards

Do not be confused by other facilities offered, such as creating your own XF86 my card.c, and the makefiles used to compile and install the rest of the X11R6 base (lib/config).

        skip these
        /usr/X11/lib/Server/XF86_SVGA.c   - the driver link-kit
        /var/X11R6/lib/doc/VGADriver.doc
        /var/X11R6/lib/doc/INSTALL
        /var/X11R6/lib/config/.

12 Copywrite and DISCLAIMER are in the Base Station

The Copywrite note and DISCLAIMER notices are currently common to each Issue, and appear in the Base Station. Click above to find them.)

You can locate Raven at

• http://sunsite.unc.edu/pub/Linux/docs/Raven/

• http://beyond.malmo.lth.se/˜ gps/Raven

• http://trix.dircon.co.uk/Raven

• http://www.users.dircon.co.uk/˜ trix

If you are having problems locating them, please contact me by email. gps@trix.dircon.co.uk

Raven is copywrite Graham Swallow, it is try-before-you-buy shareware. The authors cannot accept any liability for the content of this magazine. It is up to you to check that any actions you take, makes sense, matches other documentation, and work on a test system.

This is a summary. Please locate and read the actual notices.