Marc Thomas
April 2008
All Dell BIOS settings set as shipped. Note that during system initialization function key F2 takes you into the Dell BIOS and function key F12 gives you a boot menu (which you will want to use when booting the Linux CD).Legacy: Windows 2000/XP/Server 2003 DOS 2000 Install:
If the disk is clean install DOS first. Note that the first diskette is a typical 1.44MB but the other five diskettes are XDF-format and you must use XDFCOPY (not DISKCOPY) . Also the C: drive primary partition cannot exceed 2GB. If the machine ships with Windows but no dual-boot first make a backup of the boot block, registry, etc. (Microsoft calls this making an "Emergency Repair Diskette") with the command RDISK /S Also make sure that you have the Windows Install floppies (we actually have a number of copies of these). If not, you can put the WIN CD-ROM in the drive, go to the i386 subdirectory on the CD-ROM and then run WINNT32 /OX then boot from floppy and install DOS. At this point you have to restore the Windows boot block and change BOOT.INI, so boot with Windows floppies and after Disk 2 press "R" for repair. Deselect ALL OPTIONS EXCEPT "Inspect Boot Sector" and continue...Enter to Detect Hardware...Insert Disk 3...and finally Windows asks if you have an Emergency Repair Disk, say "Yes" and insert it. You should then be able to boot Windows from the hard disk. Open an MSDOS shell (cmd.exe) and edit C:\BOOT.INI as follows. ATTRIB C:\BOOT.INI -R -S edit C:\BOOT.INI and insert at the bottom C:\="MS-DOS" ATTRIB C:\BOOT.INI +R +S Now reboot off the hard disk and check both menu entries (DOS and Windows).Making a D: FAT32 Primary Partition (/dev/sdb1) for sharing between XP and Linux:
On XP go to Control Panel -> Administrative Tools -> Computer Management -> Storage -> Disk Management and make a 1-2 GByte FAT32 partition on the second drive by scrolling down and right clicking and entering partition size (1-2GBytes) type (FAT32, because most linux ports can only READ NTFS and not write it), and drive letter. After you make and format the partition, you will have to play the let's change drive letters in Windoze shuffle game renaming your CD/DVD drives to free up drive letter D:. second drive (/dev/sdb) +-----------------------------------------------------------+ | | | | 1-2 GByte | (unpartitioned for Linux) | | FAT32 | | | | | +-----------------------------------------------------------+Windows System/Unix Utilities:
Once you have partitioned the second drive add the following packages to Windows: MKS Toolkit for Developers (Lots of essential stuff, vi, ksh, telnetd, etc, if you need to work under both Windows and Unix). X11-Intensive users may wish to install either Exceed's Hummingbird or MKS's XServer for X11 support. See section below on X-Windows Support for Windows for more details. Sysinternals tools (from http://www.sysinternals.com) for Windows. I consider Process Explorer (procexp.exe) and Tcp View (tcpview.exe) almost essential since Windows' task manager is brain-dead and its "netstat" command anemic. There are copies of these at /dist/marc/sysinternals/ProcessExplorer.zip /dist/marc/sysinternals/TcpView.zip on our server: helios.cs.csubak.edu.Adding Linux as a Dual-Boot System
This section describes the addition of Slackware Linux 12.0 to a Windows XP system. It assumes that you are going to have a FAT32 as your first primary partition of the D: drive and that it is active , e.g. something like: first drive 0 (/dev/sda) +-----------------------------------------------------------+ | | | | | NTFS | | | +-----------------------------------------------------------+ second drive 1 (/dev/sdb) +-----------------------------------------------------------+ | | | | 1-2 GByte | (unpartitioned for Linux) | | FAT32 | | | | | +-----------------------------------------------------------+ The following describes the current Slackware Linux 12.0 Install process. Note that this changes from time to time so the following is NOT set in cement. Boot the Dell PC and hit function key F12 to take you to the boot menu. Put Slackware CD number 1 into your drive and select and boot to it. You should get a boot message which tells you options. This is good for recovery purposes. Right now, you want to do Installation only. Use fdisk or cfdisk (menu driven) to make extended partitions on your second drive. I use cfdisk. The extended partitions all sit inside of a primary partition and will be numbered: /dev/sdb5, /dev/sdb6, ... etc. I did the following with a 160GByte SATA drive. Of course, your entries may well be different. Make SURE you partition the second disk (/dev/sdb) and NOT the first (/dev/sda): cfdisk /dev/sdb Mount Point Type Size Range Name ----------- ------------ -------------------- ------------ [none] Linux Swap 4096 MBytes /dev/sdb5 / Linux 4096 MBytes /dev/sdb6 /usr Linux 16384 MBytes /dev/sdb7 /var Linux 32670 MBytes /dev/sdb8 /home Linux 101672 MBytes /dev/sdb9 The actual Names are not critical but you will need to record the name for '/' for use later when you strip off a copy of the boot block dd if=/dev/sdb6 of=/tmp/bootsect.lnx bs=1 count=512 for later incorporation of Linux in the BOOT.INI menu. You will then format the drives. Swap has its own format (type=82); the rest have a Linux format (type=83) and I used ext3 (other options are ext2 and reiserfs). You will next be asked to select components. I selected all (takes about 2GBytes) except KDEI (International language support for KDE) since I wanted to run fluxbox as my window manager. You will next be asked if you want to make a USB Boot Stick. It used to be possible to make a Boot Floppy but the Linux kernel is too large now. If you have a USB Memory Stick you can do this; I didn't and did not. In any case, in an emergency, one can always boot from the Slackware Install CD number 1. See the section Slackware Recovery Boot From CD for more details. You will next be asked where you want to install the Linux Loader LILO. BE CAREFUL. You want to select "expert" and put LILO in the boot block sector of your root Linux Partition (i.e. /dev/sdb6 if partitioned as above). *** NEVER PUT LILO in the MASTER BOOT RECORD (MBR) of your hard drive or YOU WILL WIPE THE WINDOWS BOOT LOADER *** You will next be asked to do network configuration. You can do this now or you can run netconfig later on. I usually do it as part of the install and if I need to change something later, I run "netconfig" You will need to specify: (set in /etc/hosts) your hostname (e.g. facpc0 in /etc/hosts) (set in /etc/rc.d/rc.inet1.conf) your ip-address (e.g. 136.168.200.150) your mask (e.g. 255.255.0.0) your Gateway (e.g. 136.168.1.100) (set in /etc/resolv.conf) your domain (e.g. cs.csubak.edu in /etc/resolv.conf) your DNS server (e.g. 136.168.201.110) alt DNS server(e.g. 136.168.1.4) Finally, you need to peel off the Linux 512-byte loader from the boot block sector of your root Linux partition (i.e. /dev/sdb6 if patitioned as above). Do this with the "dd" command (you may need type "/mnt/bin/dd"). MAKE ABSOLUTELY CERTAIN YOU HAVE TYPED THIS CORRECTLY BEFORE YOU HITSlackware Linux Recovery Boot From CD: dd if=/dev/sdb6 of=/tmp/bootsect.lnx bs=1 count=512 (actually you can use "bs=512 count=1" as well). This copies the 512-byte Linux first stage loader to a binary file with 512 bytes, check with cd /tmp ls -al Put a DOS-formatted floppy in a: drive and copy the file to it with mtools and check the copy mcopy /tmp/bootsect.lnx a: mdir a: If all looks ok, write protect the floppy and put it in a safe place. If you reconfigure LILO at a later time you will have to repeat this procedure. Now reboot Linux shutdown -r +1 and let the PC reboot into Windows XP. After logging into XP (as Administrator) copy the file bootsect.lnx from the floppy to the Window root directory C:\. Make the file C:\BOOT.INI temporarily writeable: ATTRIB -S -R C:\BOOT.INI If the system won't let you do this, use the MKS Korn Shell to "mv" boot.ini to boot.ini_old and, with your favorite text editor (vi) edit a copy of this, adding the line C:\bootsect.lnx="Linux" to the END of BOOT.INI then restore the permissions via: ATTRIB +S +R C:\BOOT.INI You can now restart the PC and you should be able to choose between "Windows XP" and "Linux" via the boot menu. After booting Linux, login and check the directory /boot . You should see symlinks something like the following when you do an "ls -lart" vmlinuz -> vmlinuz-huge-smp-2.6.21.5-smp config -> config-huge-smp-2.6.21.5-smp System.map -> System.map-huge-smp-2.6.21.5-smp Also check /etc/lilo.conf which should look something like boot = /dev/sdb6 prompt timeout = 300 # VESA framebuffer console @ 1024x768x256 vga = 773 image = /boot/vmlinuz root = /dev/sdb6 label = Linux read-only It is a good idea to make a backup of this file.
If your dualboot fails, either because you forgot to run lilo after applying a kernel patch or some other reason you can reboot the Dell PC and hit function key F12 to take you to the boot menu. Put Slackware CD number 1 into your drive and select and boot to it. You will get a message about booting options (or installation). For our system, typing hugesmp.s root=/dev/sdb6 rdinit=ro at the "boot" promt will boot the huge kernal from CD but mount your filesystems from /etc/fstab. This will hopefully let you run lilo or whatever you need to do to repair the dualboot system.Add At Least One User for Linux
You don't want to work as "root" all the time. You will want to have at least one non-privileged user (yourself) on the system. Make (as root) a home directory for the user, for example: cd /home/users mkdir demo Use the "useradd" command to set a home directory, userid, and initial group, for example: useradd -d /home/users/demo -u 1024 -g wheel demo Set the initial password for this user: passwd demo Go back and fix permissions on the user's home directory: chown demo /home/users/demo chgrp wheel /home/users/demo You now want to login and test this account on another console. Make sure you can "su" to root from this account (this is the reason for group "wheel"). You can fully customize this login (.profile, etc.) at a later date.Linux Network Security
You may have mistakenly checked services during installation
which you really don't want to run. You should double-check
what is actually running with
netstat -an
I usually tighten up network security by editing
/etc/inetd.conf so that the daemons:
echo
daytime
discard
chargen
gopher
shell
comsat
exec
{any}talk
{any}finger
pop-2
pop-3
imap
login
time
uucp
tftp
bootps
sysstat
netstat
auth (ident)
linuxconf
are all commented out. I also make sure that none
of the SUN RPC services are running
rpcinfo -p
rpcinfo -T udp
In Slackware they should NOT be running, but other Linuxes
may need minimal RPC support in the form of the portmapper
daemon, or support for certain desktops (e.g. KDE). You
do NOT want to run
rpc.ttdbserverd (a tooltalk daemon)
rcp.cmsd (a tooltalk daemon)
under ANY circumstances.
Depending on future events one might have to adjust the above
in additional ways. You should always check the logs in
/var/log regularly.
Linux X11 and Desktop Configuration
I usually do the X-Windows configuration for Linux after the
main installation. I used the X11 installer
xorgsetup
and let it probe for a generic nVIDIA ("nv" in /etc/X11/xorg.conf)
I set 24 bits color, a bus mouse, and I set fluxbox as the window
manager. If all goes well, try
startx
and you should get the desktop. If not, check /var/log for
errors and run xorgsetup again. If is doesn't work, this can
become a frustrating exercise in the case of some graphics
cards and drivers. Once you get it correct, make a backup
copy of /etc/X11/xorg.conf.
If your PC is in an open area be aware the a locked X Server
can be killed by issuing CTRL-ALT-Backspace (bringing
the machine back to the shell prompt). For extra security, you
might want to start X11 with
exec startx
since, then, if someone kills your X Server it will bring the
machine back to the login prompt (not to the shell).
Linux Post-Installation Issues
Here are some minor problems which hung me up for a while: 1. Like many unixes, Slackware lacks an "rexec" command. I got my usual rexec.c source and compiled it and put it in $HOME/bin so that I can easily start an xterm on helios as follows: xhost +helios.cs.csubak.edu rexec helios.cs.csubak.edu -l demo /usr/openwin/bin/xterm -display facpc0:cs.csubak.edu:0 -geometry 80x50 -ls Obviously, it is easier to write a short script for this and put it in $HOME/bin, which is what I did after I got it working correctly. 2. I couldn't get Slackware's lpr command to read the printcap normally. I finally get LPRng from one of the public mirrors, compiled it with some difficulty (got rid of TERMIOX stuff in ./src/common/stty.c, etc.) to make LPRng's lpr, which I renamed LPR and put in my $HOME/bin directory. What I like about LRPng is that, in a pinch, you can use it without ANY /etc/printcap entry, e.g. LPR -Ptext@cs10.pr.csub.edu mytextfile 3. My PC has both a CD/DVD and a CD/DVD-RW. The first is E; under Windows XP (and /dev/cdrom or sr0 under Slackware) and the second is F: under Windows XP. I wasted some time putting the CD into the wrong drive. After uncommenting the "cdrom" entry in /etc/fstab (which mounts the CD on /mnt/cdrom), I was then (as root) able to mount/umount the CD in the standard way: mount /dev/cdrom /mnt/cdrom umount /mnt/cdrom 4. Slackware comes with TeX/LaTeX installed (teTeX package) however some of the defaults need to be changed. For example, "dvips" is set to automatically print to lpr and is set for A4 paper. To fix these problems cd /usr/share/texmf/dvips/config cp -p config.ps config.ps_org and edit config.ps changing the line "o | lpr" to just "o" and commenting out the A4 lines with "%" characters. You should then be able to process and display a TeX file, e.g. "sample.tex" as follows: tex sample dvips sample ps2pdf sample.ps xpdf sample.pdf & 5. Slackware comes with the "vi" editor linked to the "elvis" editor. The "elvis" editor thinks it can interpret *.tex files but it can't and the results look BAD. To "disable" this non-capability cd /usr/share/elvis-2.2_0 cp -p elvis.syn elvis.syn_org cp -p elvis.arf elvis.arf_org and edit elvis.syn commenting out all ".tex" references. Edit elvis.arf and remove the line case .tex set! bufdisplay=tex Elvis should then work like a proper vi. 6. Firefox seems to not have Adobe Acrobat reader built in. Use xpdf instead. When it asks you for an action point to /usr/bin/pdf and make sure that you check the option to use this same program from now on. Check with Edit-> Preferences -> Content -> Manage to see that type *.pdf is now set to use /usr/bin/xpdf 7. Firefox Adobe flash plugin works ok. Download the *tar.gz version 9 for linux, gunzip, tar xvf and stuff will be in some directory like ./install_flash_player_9_linux run flashplayer-installer as root and tell it to put files under /usr/lib/firefox 8. Still problems with getting any sound from flash and the Intel 631 sound chipset on the Dell T5400. Usual way is to just run as root: alsaconf and check with lsmod lspci apparently the kernel is still not supporting this sound chipset on the Dell T5400 (as of Sept 2008).Legacy: BIOS Tricks With LILO:
It is possible to swap drives (drive 0 and drive 1) with LILO so that, for example, you could install DOS on drive D:. Here is what /etc/lilo.conf would look like (you will have to make device and kernel name changes for your system): boot=/dev/hdb5 map=/boot/map install=/boot/boot.b prompt timeout=50 image=/boot/vmlinuz-2.2.5-15 label=linux root=/dev/hdb5 read-only other=/dev/hdb1 label=dos_on_D table=/dev/hdb map-drive=0x80 to=0x81 map-drive=0x81 to=0x80 other=/dev/hda1 label=dos_on_C table=/dev/hda When you get the LILO prompt you hit TAB and then type which option you want. Of course, when you edit /etc/lilo.conf to make these changes you will, of course, have to run LILO again /sbin/lilo -v (the "-v" is for verbose) which will update the boot sector of the partition listed in "boot=" above. Query the update with /sbin/lilo -q Finally, you will need to repeat the procedure above of peeling off the bootblock (using dd:) and updating the file C:\bootsect.lnx as you did in the section Adding Linux as a Dual-Boot System above.Package Management in Linux
Different Linuxes have different methods of software package
management. One common method (used by RedHat) is through
the use of rpm-files. Typical commands are:
Find information on a file:
rpm -qf {filename}
Find information on one package (e.g. "net-tools", "libpcap"):
rpm -q {package name}
Find information on all packages:
rpm -q -a
Find and list all files associated with a package:
rpm -q -l {package name}
Install package (e.g. "net-tools" sources) with:
rpm -ivh /mnt/cdrom/SRPMS/net-tools-1.33-6.src.rpm
or
rpm -ivh /mnt/cdrom/redhat/rpms/kernel-smp-2.2.5-15.i686.rpm
Query an uninstalled package (e.g. "libpcap") with:
rpm -q -l -p libpcap*.rpm
Verify binaries with:
for i in $(rpm -qa); do rpm -V $i; done
Slackware does NOT use rpm's and, in fact, it does NOT
do dependency checking. This is of concern because the classic
scenario in upgrading is: version 1 of both package X and
package Y use version 1 of lib Z. The upgrade of package
Y to version 2 requires version 2 of lib Z but version 2 of
lib Z is NOT backwards compatible with version 1 of lib Z
and, hence, package X fails to work after the upgrade.
An official Slackware package consists of a tar-archive file
which has been compressed by gzip (*.tgz). After installation
there will be a record of the package and its files in
/var/adm/packages (actually symlinked to /var/log/packages).
This record is just a text file.
View information about the installed package:
cat /var/adm/packages/net-tools-1.60-i486-1
When packages are installed or upgraded the files and first
extracted and then, typically, a script named
./install/doinst.sh is run. If you are in any doubt you
can use explodepkg to extract the files in the current
directory without running the "doinst.sh" script or updating
the installed-packages database in /var/adm/packages.
For example:
cd /tmp
mkdir temp
cd temp
/sbin/explodepkg
/fat-d/slackware/patches/xpdf-3.02pl2-i486-1_slack12.0.tgz
You can then look at the files which would have been installed
as well as the script ./install/doinst.sh. Other useful commands
are:
Show the current status of modules in the Linux kernel:
lsmod
Find information on an executable file (e.g. /bin/ksh):
ldd -v {filename}
I tend to first put Slackware patches on my D: drive (Windows),
which is /fat-d under Linux, because I can access this FAT32
drive from either system. I have subdirectories
/fat-d/slackware/patches
/fat-d/slackware/config
for this purpose. I move these to /var/patches for running
installpkg(new)/upgradepkg(exising). For example
cd /var/patches
cp /fat-d/slackware/patches/xpdf-3.02*.tgz .
If I am feeling paranoid I can do
installpkg -warn xpdf-3.02pl2-i486-1_slack12.0.tgz > dumpfile
and examine dumpfile to see what files would have been
overwritten when installing this package. If I am satisfied
and this is an upgrade of an existing package I then do
upgradepkg xpdf-3.02pl2-i486-1_slack12.0.tgz
WARNING: IF YOU ARE UPGRADING THE KERNEL MAKE SURE THAT YOU
RE-RUN LILO and then repeat the procedure above of peeling off
the bootblock (using dd:) and updating the file C:\bootsect.lnx
as you did in the section Adding Linux as a Dual-Boot
System above.
Blocking Outside Routes Overnight on Linux
If you are leaving your machine on overnight, you
can block access from outside domains using the route
command. For example, our class B domain is 136.168.0.0
and our default gateway is 136.168.1.100. Pick any vanilla
PC (who said Windows was useless?) or MAC in your domain.
If one does
/sbin/route delete default gw 136.168.1.100 eth0
/sbin/route add default gw {any PC or MAC} eth0
then effectively there will be NO access to/from your
machine except within the 136.168.0.0 network. One can
restore the situation via
/sbin/route delete default gw {the same dumb PC or MAC} eth0
/sbin/route add default gw 136.168.1.100 eth0
Windows 2000/XP/Server 2003 Registry Security Settings:
If you are NOT going to use the NETBIOS the way to disable
public shares is different than for NT because Windows 2000
also uses port 445. The best solution is to do the following:
Open Settings->Control Panel->Network->Advanced (from menu bar)
-> Advanced Settings
Select the Network Card from which you will be unbinding the
NETBIOS (if there is more than one) and Uncheck File Sharing
for Microsoft Networks. This will disable all incoming requests
to BOTH ports 139 and 445. No reboot should be required. If you
want to test this, go to a 2nd Windows box and make a request
for a generic share by typing
net use \\{ip-address of machine}\ipc$ "" /user:""
This should fail if the NETBIOS was successfully disabled.
Additional Internet Software:
Install from the CD labeled Internet software/floppies or you can get some of these from pegasus:/dist subdirectories. WinZip Adobe Acrobat PuttyX-Windows Support for Windows:
Easiest to use option is Exceed's Hummingbird. This is almost essential for having a session with a Unix box with graphics support (recall that telnet is text based only). Hummingbird Exceed Typical install Register Later No password No shortcuts on the desktop Run Optimization Reboot Run Exceed->Xsession->New Program->Xclient using: pegasus.cs.csubak.edu, DEC UNIX, Command: /usr/bin/X11/xterm -display computername:0.0 -ls File->SaveAs->Desktop->XTerm Check file \Program Files\Exceed.nt\user\xhost.txt for access control Create shortcut to \Program Files\Exceed.nt\Xstart.exe in order to start the X/Server on port 6000 Other Option is MKS's XServer. This requires more work at configuration; if you are not well versed with X11 you will have to spend some time reading the documentation. MKS XServer You MUST Register first Typical install No password/default profile Run Optimization Reboot MKS XServer->Configuration->MKS X/Server Configuration (configure Security) MKS XServer->Configuration->MKS X/Server Services (disable Printing) Check file \Program Files\MKS XServer\User\xhosts.txt for access control (I had much trouble getting this to work!) Create shortcut to \Program Files\MKS XServer\xvision.exe in order to start the X/Server on port 6000Install MikTeX for Windows:
This package includes the mathematical typesetting packaages TeX, LATeX, LATeX2e, the TeX-Previewer Yap. We also have a TeX spell checker (amspell.exe - self-extracting zip). Some faculty like to use these in conjunction with the shareware editor "UltraEdit." If the user does want UltraEdit we have this on two floppy disks. I would recommend making a directory "C:\windows\ultraed" and copying all files to this subdirectory. Then you can use the "set_aed.cmd" file to start UltraEdit. Note that the customizable part of UltraEdit is in the file "uedit32.ini". MikTeX has become sufficiently complicated so that it now has a Windows wizard-type setup. All files are on pegasus.cs.csubak.edu in or under the directory /dist/winnt/miktex-2.1. The best procedure is to go to this directory and read README.txt and follow the instructions which will involve making a temporary install directory (say e:\loc_repo), copying the files over with ftp in binary mode and running setup.exe.