Method 1: Booting LRP from a hard disk

This is really very easy, so if you've been itching to use that spare HDD in your LRP box, let's get going.

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 hard disk and controller (duh). Just about any size drive will work here, remember, you were using a 1.44M floppy, so even an old 50 Meg drive will seem HUGE

    Note

    This document assumes you will be using an IDE hard disk. While it is possible to use a scsi disk and controller, or other device (like a flash disk), anything but IDE will require you to add 'bootstrap' module support to LRP, which is described below in the section on using SCSI hard disks.

    Note

    You can use just about any IDE device (zip, LS120, etc), as long as it can be made to look like drive C: to dos (and the BIOS in your computer).

  2. A DOS boot disk (floppy), you can also use a windows 95/98 boot (startup) disk.

  3. Copies of the DOS fdisk and format commands on floppy, and a DOS based editor you know how to use that does not 'wrap' long lines.

    TODO: Insert good editor choices here

  4. A copy of the syslinux.com program on a floppy disk. You can find this at some of the LRP sites listed above, or get the latest version at http://www.kernel.org/pub/linux/utils/boot/syslinux/

  5. A disk image for the version of LRP you want to run, copied onto a floppy.

  6. An LRP kernel with IDE support compiled in. You should be able to find this at one of the LRP sites listed above if you are using a standard distribution. If you wish to boot of a device that does not have kernel support built-in (ie anything other than an IDE or floppy disk), this is still possible. See the section on SCSI drives, below.

    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 you are running on, and set up the BIOS to properly recognize your hard disk.

Partition and Format your hard disk

Note

If you plan on mounting partitions on your hard disk after boot, rather than just booting from the hard drive, I suggest you partition your disk using linux instead of DOS, as you will have MUCH more control over the partition types, numbering, etc. See "MAKING A PARTITION" in the section: "Mounting a Hard Disk at runtime" for some information on using the linux fdisk instead of DOS based fdisk. If all you want to do right now is boot LRP, using DOS for partitioning is probably easier for most folks than the linux alternative.

  1. Boot your LRP machine from the DOS disk.

  2. If you are running from a windows 95/98 startup disk, you have to run 'lock' to allow low-level access to the hard drive. If you do not do this, syslinux will be unable to install the boot loader on the hard 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.

  3. Run the fdisk program. You should delete any partitions that already exist (unless you really know what you are doing) to avoid confusion regarding device numbers.

    Warning

    This will destroy any data currently on the hard disk!

  4. Create a 'primary dos partition for LRP. I make mine about 10-20 Meg, which seems big enough.

  5. Mark the partition as 'active', or 'boot'

  6. If required, save the changes to disk

  7. xit fdisk, you machine should reboot from the DOS disk

  8. Run 'format c:' to format the new partition

At this point, you should have a working MSDOS drive c: You should be able to do a 'dir c:' command, and see an empty directory with lots of free space.

INSTALLING THE SOFTWARE

Now it's time to put LRP on your freshly made partition.

  1. Put the disk with syslinux.com in the drive (if it's not on your DOS boot disk)

  2. Run 'syslinux -s c:' to install the syslinux bootloader

  3. Put your LRP boot disk into the drive.

    Warning

    DOS will only recognize 1.44 Meg floppy disks. If your LRP system is on a 1.68 Meg or other non-standard size floppy, you will either have to copy the files to a 1.44 meg disk so dos can access them, or copy the files to your hard disk using LRP (which can access the high-density formats) instead of dos.

  4. Copy all the files except for 'ldlinux.sys', which is already on your hard disk.

  5. Delete the file 'linux' from the hard 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 hard disk support.

  6. Copy the new kernel you downloaded that has IDE support compiled in onto the hard disk. Rename it 'linux' if it is not named that already.

You now have installed LRP onto your hard disk, but don't try to reboot yet! LRP is still set up to look for the LRP files on the floppy disk.

CONFIGURING THE SOFTWARE

You need to know the partition you installed LRP onto for this step. This is almost always /dev/hda1, which is used in the text, but could be something else. If /dev/hda1 doesn't work for you, try to find the 'partition check:' part of the kernel messages that spit out on boot. If it scrolled by, you can press <shift><Page Up> and <shift><Page Down> keys to scroll through the messages 'above' the screen. On the line(s) after 'partition check:' the kernel will list all valid partitions it sees on the various hard drives you have attached. One of them should be where you installed LRP.

  1. From a dos prompt, edit the file c:\syslinux.cfg

  2. Change 'boot=/dev/fd0,msdos' to 'boot=/dev/hda1,msdos'

  3. You might also want to make your ramdisk a bit larger, especially if you plan on using all your new HDD space 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).

  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 hard disk!

BOOTING FROM THE HARD DRIVE

It's time to cross your fingers and watch LRP boot from the hard disk.

  1. Remove any floppies from the disk drive.

  2. Press <ctrl><alt><del> or toggle the power to rebo

  3. 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.

Note

If you had custom boot software on your HDD previously (like LILO, system commander, etc), you may have to replace the Master Boot Record (the MBR) on your hard disk so your system will boot 'normally'. You can typically do this with the DOS command 'fdisk /mbr' (an un-documented command line switch), but it depends on which version of DOS and fdisk you're running. The /mbr switch seems to work with Win 95/98 boot (aka startup) disks, as well as the actual MS-DOS fdisk.

SOMETHING WENT WRONG

Oh No! Your new LRP hard disk 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 hard 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 hard disk. If this doesn't work, you have something basic wrong with your BIOS, hard disk, 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'

MIGRATING FILES FROM AN EXTENDED CAPACITY FLOPPY DISK

If your LRP system is currently using a non-standard format (like 1.68 Meg), you may need to copy them to a 1.44 Meg disk so you can get them on your hard disk with dos. There are other ways to do this, including copying the files directly from LRP. If you're enough of a guru to know how to do this, feel free to get the LRP files on your boot partition using whatever method you feel is most convenient.

  1. Get two 1.44 Meg blank formatted floppies.

  2. Boot your LRP system from the floppy disk.

  3. Mount the LRP floppy disk. Be sure to use the correct device. Most LRP systems have a /dev/boot device that is the format of your boot floppy, but you may have to use an explicit device, like /dev/fd0u1680):

    mount -t msdos /dev/boot /mnt
  4. Clear the /tmp directory:

    rm /tmp/*
  5. Copy all files from the floppy disk to /tmp:

    cp /mnt/* /tmp/
  6. Unmount the floppy:

    umount /mnt
  7. Remove the LRP disk, and insert one of the blank 1.44 Meg disks.

  8. Mount the disk and copy root.lrp:

    mount -t msdos /dev/fd0 /mnt
    cp /tmp/root.lrp /mnt/
  9. unmount the floppy:

    umount /mnt
  10. Delete root.lrp and ldlinux.sys from the /tmp directory:

    rm /tmp/root.lrp /tmp/ldlinux.sys
  11. Insert the second 1.44 meg disk, mount it, and copy the rest of the files:

    mount -t msdos /dev/fd0 /mnt
    cp /tmp/* /mnt/
    umount /mnt
  12. Use the two 1.44 Meg floppies in the above steps when copying files to your hard disk.