BP6 ATA66 Boot with LinuxTM & LILO

Document Version: 1.0

SCOPE

For those with an ABit BP6 motherboard or with a motherboard that allows booting off a disk other than the "hda". This mini HOW-TO provides some help.

Disclaimer: While I have tried to make this guide as accurate as possible I don't accept any liability for damage or loss of data on your computer system. This advice is free to help those out in the community using Linux.

1. Introduction

The ABit BP6 has four IDE connectors the first two ide0 and ide1 allow for speeds upto 33MHz (ATA-33). The next two IDE connectors, ide2 and ide3 allow for speeds upto 66MHz (ATA-66) via the HPT chip-set.

So if like me you wanted to boot off ATA-66 for the extra disk speed you needed to take quite a few steps.

Assumptions

2. BIOS Update

Before we start on the boot process its worth upgrading the BIOS as I have only tested this setup with BIOS "RU" or above. If you already have this BIOS or above you can skip this section.

Step 1:

Download the DOS files from ABit's web site (http://www.abit.com.tw) you should have something like bp6ru.exe and awdflash.exe when your done. Also download and print out any BIOS upgrade information.

Step 2:

Make a DOS boot disk if you don't have one. If you have DOS on a partition already then skip step 3.

Step 3:

Make room on the DOS floppy. Remove thinks like BASIC interpreter, network tools etc.

Step 4:

Copy the files downloaded in step 1 to the floppy disk.

Step 5:

Reboot and changing BIOS to boot from floppy if required.

Step 6:

You should now have a DOS prompt. Run the awdflash tool as instructed in the ABIT instructions. Something like:
A:/>bp6ru.exe
A:/>del bp6ru.exe (If you don't have much space on the floppy).
A:/>awdflash bp6_ru.bin
(Save a copy of the old BIOS if you can.)
Reboot your BIOS should show "RU" at the bottom or whatever BIOS version you used. Continue to load your version of Linux from hdaX.

3. Preparing /dev/hdg

3.1. Partition the drive

Partiton the drive as you wish I used cfdisk and created the following:

PRIMARY BOOT hdg1 LINUX 250 MB
PRIMARY hdg2 DOS 256 MB
PRIMARY hdg3 DOS 256 MB
LOGICAL hdg5 SWAP 640 MB
LOGICAL hdg6 LINUX 8200 MB

Write the partition map and reboot.

3.2. Format the partitions

I decided on reiserfs for the new partitons because of its journalling and standard support in the 2.4 series. I also strongly considered ext3. The filesystem you use depends on your requirements.

Format the partitions:

# mkreiserfs /dev/hdg1 ( To become /boot )
# mkreiserfs /dev/hdg6 ( To become / )
# mkswap -c -v1 /dev/hdg5

Now we are ready to copy the data onto them.

3.3. Making a copy from hda

3.3.1. Go single user

We need to be safe and enter single user mode:


# init 1

3.3.2. Copy directories

Assume we have /, /usr, /var, /home, /usr/local. We can keep home and usr-local on there existing disks we need /, /usr and /var.

Copy:


# mkdir /mnt/boot
# mkdir /mnt/root
# mount -t reiserfs -o notail /dev/hdg1 /mnt/boot
# mount -t reiserfs /dev/hdg6 /mnt/root
# cd /boot
# cp -a -x . /mnt/boot
# cd /
# cp -a -x . /mnt/root
# cp -a -x usr/ /mnt/root
# cp -a -x var/ /mnt/root

Update /etc/fstab on hdg (i.e. /mnt/root/etc/fstab). Change disk references to from hda to hdg where required. Also specify notail for hdg1.


# vi /mnt/root/etc/fstab

3.3.3. Update LILO on hda

Edit /etc/lilo.conf (the one on hda) and add a boot for hdg1. Something like:


image=/mnt/boot/vmlinuz-2.4.13
    label="Linux-2.4.13G"
    root=/dev/hdg1
    append="root=/dev/hdg6 noapic"
    read-only

Rerun lilo with lilo -v

3.3.4. Half way.

Where half way we have LILO on hda and Linux on hdg.

Now reboot and select Linux-2.4.13G.

Examine the mounted partitions with mount to see if hdg6 is root.

4. Getting past half-way

Now we can boot Linux from hdg via hda. This way be fine for some but you can go onto making hdg the real boot disk.

4.1. Update lilo.conf on hdg

Edit /etc/lilo.conf (the one on hdg not on hda). We need to make some changes to the original. Note we also introduce disk and bios statements this connects hdg to the boot disk since we booted Linux from hdg that is now our boot disk not hda. This is very important, you must boot Linux off hdg before updating the configuration file.



# Debian Linux Boot Manager Lilo Configuration

boot=/dev/hdg
disk=/dev/hdg
   bios=0x80

install=/boot/boot.b
map=/boot/map
vga=extended
timeout=50

#------------
# menu-scheme=<text>:<highlight>:<border>:<title>
# w=White,r=Red,b=Blue,k=Black,y=yellow eg. wr=white on red
# uppercase for bright colour
#
#default is menu-scheme=wr:bw:wr:Yr
#Make this one look different so we know its LILO on hdg
#
menu-scheme=kg:Gk:kg:Yk
menu-title=" LILO - /dev/hdg "
#-----------------
prompt
default=Linux-2.4.13
append="noapic" # gets overloaded by future append statements
lba32

#-- DWK: Add noapic for BP6 stability improvements (hopefully.)

image=/boot/vmlinuz-2.4.13
    label="Linux-2.4.13"
    root=/dev/hdg1
    append="root=/dev/hdg6 noapic"
    read-only

# Still have a fallback boot on hda!
image=/boot/vmlinuz-2.4.13-ac4
    label="2.4.13ac4-hda3"
    root=/dev/hda1
    append="root=/dev/hdg6 noapic"
    read-only

image=/boot/vmlinuz-2.2.17
    label=Debian-2.2.17
    root=/dev/hdg1
    append="root=/dev/hdg6"
    read-only

image=/boot/vmlinuz-2.2.17
    label=Debian-hda3
    root=/dev/hda3
    read-only

Now rerun lilo with lilo -v

Then reboot.

4.2. Reconfigure the BIOS

Set the BIOS to boot of EXT where EXT is set to ATA66.

Reboot and you should see our new LILO.

Your done! Enjoy. If you want to go back to the original change boot from EXT to C in the BIOS settings.


LinuxTM is a Trademark of Linus Torvalds.