---------------------------------------- Booting LRP from a Zip Drive HOWTO ---------------------------------------- Written by: Charles Steinkuehler Version: 1.1 Last Revised: 09/18/2000 Revision History: 1.1: Released under GNU General Public License 1.0: Initial release License: Copyright (C) 2000 Charles Steinkuehler This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: http://www.gnu.org/copyleft/gpl.txt Disclaimers: I am attempting to document some of the things I have done with my Materhorn LRP package, so you don't have to learn everything the hard way. While I have tried to explain things so most anyone can understand how to do this, I cannot be responsible if you accidently format, delete, partition, or otherwise destroy any data you might have on your Zip disk, or even if you just wind up wasting an evening or weekend trying to get things working. It is assumed you are smart enough to adapt some of the commands to your particular environment. For example, if this HOWTO says to perform the command: insmod /lib/modules/mymodule.o and you are trying to load support for your Adaptec SCSI card, you would actually type something like: insmod /lib/modules/aic7xxx.o It is further assumed that you know the basics of setting up hard disks on a PC, and that you are familiar with concepts like disk partitions, linux device numbering, mount points, and other such basic linux concepts. If you don't understand any of these things, try to track down some HOWTOs, or read through the first couple of chapters of a linux users guide or installation manual. Most of these will cover linux device nubmering and disk partitioning enough for you to get through this HOWTO. WARNING: Adding a Zip disk, or any other storage media that cannot be physically write protected fundamentally makes your LRP system less secure. In addition to a hacker being able to store data across a reboot, you will be running more software, in the form of device drivers and file system support, than a basic LRP system. While this software is fairly safe in the general scheme of things, every additional piece of code you run has the potential of adding security holes to your system. It is up to you to determine if the risk is worth the reward in your system and setup. Conventions: For clarity, commands you should type in, filenames, screen output, and other such items are either on their own line: Like this or enclosed in single quotes 'Like this'. You should not type in the single quotes when entering commands or filenames, or expect them to be on screen output. ---------------------------------------- Useful LRP related links: ---------------------------------------- http://lrp.steinkuehler.net/ http://www.c0wz.com/ http://linuxrouter.sourceforge.net/ http://www.linuxrouter.org/ http://beta-linuxrouter.razorsedge.com/ http://lrp.plain.co.nz/ http://wpkgate.kc.com.my.cpwright.com/lrp/ ---------------------------------------- The basics: ---------------------------------------- This HOWTO covers setting up your system to boot LRP off a Zip disk. You will have almost 100 Meg to load all your favorite packages, but LRP will still run out of RAM once it is loaded. ---------------------------------------- Booting LRP from a Zip drive ---------------------------------------- BEFORE YOU GET STARTED: You will need a few things, so try to track them all down before you get started. I have tried to collect most of the files needed on my web site at http://lrp.steinkuehler.net 1) A Zip drive and controller (duh). This document assumes you will be using an IDE Zip drive. While it is possible to use a scsi disk and controller, you need a linux kernel with support for your scsi card COMPILED IN to be able to boot, so either roll your own kernel or go find an IDE Zip drive. 2) BIOS support for booting from a Zip drive. On my computers, this is controlled where you set the boot order to default to a, c, scsi, cdrom, etc. If you have an older machine that won't boot off a Zip drive, stop here, as the rest is kind of pointless :< 3) An empty or blank Zip disk pre-formatted for IBM computers. This is how zip disks normally come 'out of the box'. 4) A DOS boot disk (floppy), you can also use a windows 95/98 boot (startup) disk. 5) A copy of the DOS fdisk command on floppy, and a DOS based editor you know how to use that does not 'wrap' long lines. This is all on a windows 95/98 startup disk already. Editors that have worked for me: edit - provided on 95/98 startup disk and later versions of MS-DOS e - provided with IBM PC-DOS 6) A copy of the Iomega guest.exe program on a floppy disk. If you have the install floppy that came with your Zip drive, you can just use that. 7) A copy of the syslinux.com program on a floppy disk. You can find this at my web site, some of the LRP sites listed above, or get the latest version at http://www.kernel.org/pub/linux/utils/boot/syslinux/ 8) A working version of LRP on a floppy. This is the image you will be coping to your Zip drive. 9) An LRP kernel with IDE support compiled in. You should be able to find this on my web site or at one of the LRP sites listed above if you are using a standard distribution. NOTE: All of the above files need to be on floppy disks, so you can access them on your LRP machine. GETTING STARTED: It is assumed at this point that you have properly assembled the LRP machine, and have the Zip drive properly connected to your IDE controller. My Zip drive is configured as the master device on the primary IDE channel (ie drive 'c' if it was a hard disk). Things may not work, or you may have to adjust some settings if this is not how you connected your Zip drive. INSTALLING THE SOFTWARE: 1) Boot your LRP machine from the DOS disk. 2) Put the disk with guest.exe in your floppy drive. 3) Run 'guest' so you can access your Zip drive. The guest program should report finding your Zip drive and the drive letter assigned to it. The drive letter assigned should be 'c:', which is used in the following commands. 4) If you are running from a windows 95/98 startup disk, you have to run 'lock' to allow low-level access to the Zip drive. If you do not do this, syslinux will be unable to install the boot loader on the Zip disk, and you will be unable to boot. You can skip this step if you are running a 'real' version of dos instead of a windows startup disk. 5) Put the disk with syslinux.com in your floppy drive. 6) Run 'syslinux c:' to install the syslinux bootloader. 7) Put your LRP boot disk into the drive. 8) Copy all the files from the LRP floppy to your zip drive, except for 'ldlinux.sys', which is already installed. 9) Delete the file 'linux' from the Zip disk (or just rename it if you want to start wasting all that space you've got now. :) This is the old linux kernel without IDE support. 10) Copy the new kernel you downloaded that has IDE support compiled in onto the Zip disk. Rename it 'linux' if it is not named that already. You now have installed LRP onto your Zip disk, but don't try to reboot yet! LRP is still set up to look for the package files on the floppy disk. CONFIGURING THE SOFTWARE: 1) From a dos prompt, edit the file c:\syslinux.cfg 2) Change 'boot=/dev/fd0,msdos' to 'boot=/dev/hda4,msdos' 3) You might also want to make your ramdisk a bit larger, especially if you plan on using your new drive to load lots of LRP modules. To do this, change the 'ramdisk_size=xxxx' parameter. Note that xxxx is the size of the ramdisk in K bytes (ie 'ramdisk_size=4096' is a 4 Meg ramdisk). If you have 12 Megs or more of system memory, I suggest using at least 6 Megs 'ramdisk_size=6144' for your ramdisk. 4) Make sure that your editor does not 'wrap' or truncate the line. Everything from 'append=' on should be on a single line, with no carriage returns or line feeds. 5) Save the file. You are now ready to boot LRP from your Zip drive! BOOTING FROM THE ZIP DRIVE: It's time to cross your fingers and watch LRP boot from the Zip drive. 1) Remove any floppies from the disk drive. 2) Press or toggle the power to reboot. 3) Go into your BIOS settings, and configure the system to boot from the Zip drive. 4) Save the BIOS settings and reboot. 5) LRP should boot, and you should see the familiar login: prompt. If you don't get to the login prompt, something went wrong. See below for some trouble-shooting ideas. SOMETHING WENT WRONG: Oh No! Your new LRP machine is a high-tech paperweight...LRP refuses to boot. Here are a few things to check: 1) Make sure you have an LRP kernel that has IDE support compiled into the kernel. If your kernel has IDE support, you should see a message like the following sometime during the boot sequence, followed by a message for hda (or hdb-hdd), listing the drive type and parameters. ide0 at 0x1f0-0x1f7,0x3f6 on IRQ 14 2) If the kernel has IDE support, look for the partition check: line in the kernel boot messages. Following this line the kernel displays all valid partitions on your disk. Try using each partition listed as the boot device in syslinux.cfg...one of them should work. 3) Make sure you copied the LRP files from a valid boot disk. Try booting the LRP floppy in your machine. If this doesn't work, you will probably not be able to get HDD booting until you fix whatever the problem is. 4) If you are really stuck, try getting plain old DOS to boot from the Zip drive. If this doesn't work, you have something basic wrong with your BIOS, Zip drive, MBR, partitioning, etc. Once you can get DOS booting, syslinux should run without problems. Make sure you have a clean MBR and the partition you want to boot is marked active. You can install a new MBR from dos with the command 'fdisk /mbr'