Not for linux-kernel [Re: Confirmation requested]

Kristofer T. Karas (ktk@ktk.bidmc.harvard.edu)
Wed, 8 Jan 1997 16:18:34 -0500


Date: Tue, 7 Jan 1997 11:42:02 -0500
From: waynej@kos.net (Wayne Johnston)

After trying in vain to get Linux running on my PC I have been
advised that it can't be done

Hah. It's easy.

By the way, this has *nothing* to do with the linux kernel, so does
not belong in a kernel-development mailing list. Please post this,
and all similar questions/followups, to the appropriate newsgroup
(e.g. comp.os.linux.setup).

However, since we're already here, I'll answer:

The BIOS (and partition table of the hard drive) only permit 1024 or
fewer cylinders. The Samsung driver intercepts the BIOS calls, making
your 1086 cylinder drive appear to have 543 instead (which it does by
doubling the number of heads or sectors, don't remember which). This
is the same thing a modern BIOS does, but is handled as a DOS driver,
so only runs under DOS; therefore, using linux's fdisk puts values
into the partition table that are based on the real geometry, making
DOS thereafter unusable. In a nutshell, you cannot use the Samsung
driver, or anything which uses a similar scheme. However, there is
another way...

DOS and LILO both use the BIOS, so need to access information below
cylinder 1024. Your disk has 1086 cylinders. Linux is smart enough
to use cylinders above 1024, as it uses LBA addressing. The solution,
then, is to arrange your hard drive such that DOS and LILO accessed
areas are below cylinder 1024, and linux-only areas are free to extend
above it. Because your bootable kernel must reside in a filesystem
whose upper cylinder number is below 1024, you have three choices:
(A) make both your primary and rescue filesystem reside below
cylinder 1024 (which means your swap partition will be 62
cylinders/30 megs in size),
(B) use a small partition down low just to hold /boot and your
kernels (2 or 3 megs), or
(C) Put your small rescue partition down low, and store your main
kernel in it as well as the rescue kernel.

So, for (A), arrange your disk with: DOS cyls 1-427 (210 megs), Linux
main 428-854 (210 megs), Linux rescue 855-1022 (82 megs), and swap
1023-1086 (30 megs). DOS FDisk will report the swap as being from
1023 to 1024 (one cylinder) but this is OK.

For (C), do as in (A) but put DOS first, followed by rescue, followed
by swap, followed by main. Shrink swap, and grow main, to suit taste.
Mount your rescue partition read-only in the /etc/fstab of your main
partition; then, point LILO at the kernel and map file in /rescue
rather than the one in / or /boot.

In all cases, you're going to need to re-install your DOS partition,
as the geometry DOS sees will change. Backup whatever you have.
Obviously, do not re-install the samsung driver.

-- KTK