Subject : Cannot keep the DOS in the first partition and Linux in the
second partition although can do it the other way around
I have the following problem installing Linux. I am giving all specific
details and therefore the post may be too long and boring. However i think
they are important for anyone to suggest a solution. So please pardon me
and i hope you are patient enough to read the whole stuff.
Any help will be greatly appreciated. Thanks in advance.
I have the following system :
* Pentium 75 MHz processor
* Microstar mother board with PCI bus and EIDE controller and 2 16550 UARTS
* AMI BIOS
* 8 MB RAM
* 850 MB (1654 cylinders, 16 heads, 63 sectors) Maxtor HD with
* ATI Mach 64 Video card
* other usual stuff
I had a primary DOS partition of about 430 MB before linux installation.
I am using slackware 2.0 distribution disketts with Linux kernel 1.0.9 for
When I ran the linux fdisk and see the partition listing (only DOS
partition upto now) it gave error messages like : physical ending different
from logical ending. I checked the FAQ's, newsgroups, and HOWTO's and
found the Large-IDE-HOWTO addressing exactly the same problem. The
source of the problem should be, according to the Large-IDE-HOWTO,
the BIOS reporting a bogus no of cylinders (half of the actual) and
heads (double the actual), because it can't handle more than 1024
cylinders. However when I checked the BIOS it reported the
actual values, that is cylinders = 1654 and heads = 16. By the way the
BIOS is in the LBA mode. So to double check, I used the DOS Norton utility
to check the partition table which showed the bogus values:
cylinders = 827 and heads = 32. So i guessed (may be wrong) the BIOS gave
the bogus values to DOS fdisk even though it reported the actual values
when viewed while booting.
So i continued with the suggestion in Large-IDE-HOWTO. That is, i ran the
linux fdisk, went to expert mode and forced the no of cylinders and heads
to the bogus values (827 and 32). Checked the partition listing and no
errors reported with the DOS partition. Satisfied, i proceeded with
creating linux root partition (about 350 MB) and linux swap partion (about
10 MB). checked the partition listing to see no errors , write the
partition table and quit the linux fdisk.
ran linux setup and installed the base linux system (floppy series A).
created a boot floppy and also installed the LILO on to my
primary boot record. then as suggested, manually edited the lilo.conf
file to append the following lines at the begining.
append = "hd=1654,16,63" ( Actual disk geometry)
linear (to use the logical addresses instead of physical addresses)
(this will use the bogus BIOS geometry instead of that
supplied by kernel)
Finall ran "lilo -r /mnt".
It gave the following error message :
Device 0X0300 : Invalid partition table, 2nd entry
3D address 1/0/450 (453600)
Linear address 1/0/900 (907200)
and stopped. it did not add the dos and linux as i expected.
anyway i tried to reboot the system using LILO in the hard drive and
it hung without giving any error message. when i tried to boot with the
new boot floppy created by setup it reported the following error.
hd.c : ST-506 interface with more than 16 heads detected, probably
due to non-standard sector translation. Giving up.
(disk 0: cyl = 827, sect = 63, head = 32)
Kernel panic: VFS: Unable to mount root
and the system hung.
So I gave up and tried a different solution. First I created the Linux
partions as described exctly above as /dev/hda1 and /dev/hda2 , and later
created the DOS fdisk partition as C (/dev/hda3). Only difference now is
that my first two partitions are Linux and 3rd is DOS (earlier the first
partition is DOS and 2 and 3 are linux). Then i did everything as before
and setup base system and created floppy and installed LILO.
Now i ran the "lilo -r /mnt". no error messages and it added the linux
and dos. Now i can boot both DOS and Linux from the hard drive
successfully and use both systems. However still cannot boot Linux from
Finally to the end of the story.
I have two probelms to solve :
1. Why i can't keep the DOS in the first partition and how do i get
around this mystery??
2. Why can't boot from the floppy and how to solve it??
I have almost browsed all the FAQ's, news groups, and documets that
i know of. So any help will be of great use.
Thanks for your patience.
Dept. of Electrical Engg.
U of Toronto
phone : (416) 927-1595