LINK="#3366FF" VLINK="#A000A0">



(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to tag@lists.linuxgazette.net

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!


(?) Take a Breath!

From Wolf

Answered By Jim Dennis, Heather Stern

Answer Guy,

I just recently read that message from Rik, having trouble with some bad clusters under Windows. Anyway, I used to run a Win98 system, and I experienced the same problems, even if they might not be related to Rik's (just bad hardware or mis-partitioning, I assume). I had my HD partitioned into one primary and one extended partition, with approximately 20 gig each (HD is a Samsung 40.8 gig). Then, I used Partition Commander to make 4 out of the primary partition: One FAT32 (14 gig), and 3 FAT16 (2 gig each); and on the extended partition I put a 12 gig FAT32 and 8 gig for Linux, pre-formatted with Partition Commander. Now I know, that Linux doesn't like anything above 1024 cyl., but I always assumed, that it's translated in such a way, that only 1024 are reported (or am I wrong?). Installing Linux on that last partition was a bold failure. First, I never got it to boot from the HD, no matter if I used Loadlin or (tried) LILO, in the MBR or on the partition. When it booted after the CD install, fsck found a load of errors, and they all seemed to be beyond 32 gig. So I deleted the last partition and reformatted it as FAT32, which seemed to succeed without errors; even with bad clusters checking on. Letting a disk utility have it's way with it later, revealed again a bunch of bad clusters, and again. above the 32 gig limit. Not sure, if that's an OS or a hard error? Right now, I'm going to low-level format and re-partition the drive, then assign Linux all the space (this version doesn't like partitions picked from the middle of the drive). Hopefully it boots. Or the HD craps out altogether, there's still warranty on it... Had anyone reporting similar stuff with a big HD like mine is? Windoze is good for all kind of surprising crap, but I need it for development...

Thx,

Wolf

(!) [JimD] Wolf, I promise, no one was going to interrupt you. [This whole messages was all in one line of text!] Perhaps a few paragraph breaks would have also helped.
(!) [Heather] Heh. The advantage of email is that folks can use paragraphs, commas and periods - but still get their whole say before anyone gets to interrupt.
To give the short form of the answer -- it's not an OS error at all. Bootloaders come before the OS, whether DOS or Linux. It's a dependency on firmware features - the BIOS on your system either does, or doesn't, have 1024 cylinder problems. If your BIOS doesn't have the boundary, the bootloader still has to make different calls to ask about later areas of the disk, because this is a newer feature, and is tacked on to the BIOS design.
I can just about guarantee that the final 8 Gb on a 40 Gb drive would be above that boundary!
LILO has an old keyword to beat this boundary (linear) and a new way (LBA) but this drive is so large you may need an even more special call (LBA32). Linear basically asks for cylinder/head/sector stuff. The LBA flavors tell LILO to make the new BIOS calls.
You mentioned the drive but not the motherboard - assuming it's modern enough, I'd try the LBA32 keyword in /etc/lilo.conf. (On a line alone.) If that doesn't work I'd probably use Loadlin, throw an icon for its correct command line on my desktop (looking like Tux of course) and forget worrying about it. Just remember to copy your kernel to the right place on your FAT drive that loadlin expects, whenever you decide to update your kernel.
Unfortunately, that you're seeing the drive poorly when the 8 Gb are FAT partitioned or ext2 partitioned, implies that I may be wrong about how modern it is. Or, the drive has memorized something poor about how to present itself to us. (Yes, drives have had their own brains for a while, that means they get to be artificially stupid sometimes too.) So, I'd check if your motherboard manufacturer has a BIOS revision, because it may help some. And during low level format I'd be really extra picky about looking through the options, in case something leaps out as meaning "My motherboard is so stupid I can't even see all 40 Gb. Just give me 32 of it. Thanks." Or as we'd say, ack! No thanks!
(!) [JimD] I'm responding to your message to dispel the misconception that you've repeated here.
Linux has no problem at all with anything past the 1024th cylinder. The Linux kernel can handle any commodity drive.
(!) [Heather] vmlinuz doesn't care, no more than Windows should care how big its C: is - by the time you're this far, you're in protected mode, and not using the BIOS directly anymore. It's fdisk that gets all the headaches.
(!) [JimD] However, the bootloader (LILO) has traditionally been constrained by the level of support offered by your system BIOS (or the lack thereof). Once you get the Linux kernel "bootstrapped" (loaded into memory and running) then it can easily handle just about any arrangement of partitions. LILO has to ask the BIOS to locate and load the specific device and blocks in which the kernel (and any initial RAM disk) are stored. So the BIOS must support calls to access these devices. If the BIOS only supports calls to handle the first 1024 cylinders of a device (a common constraint several years ago) then we have to locate the kernel (and our RAM disk) within those 1024 cylinders. Alternatively we can use a different bootloader (syslinux off of a floppy, or Zipdisk, etc; grub, LOADLIN.EXE, etc).
Now over the years that have been several different workarounds to this problem. First we note that SCSI drives have normally not been afflicted with these limitations (since they don't emulate the old WD-1003 controller interface; they have their own BIOS extensions which provide the necessary support through the "INT 13" calls). Also we note that this problem is specific to the PC (so it's never been a problem on Macs, SPARCs or the many other platforms that Linux supports).
Also most IDE drives, though they mostly emulate the ST-506 interface, mostly as implemented by Western Digital's old 1003 chipset; they will perform their own "autotranslation" internally translating "virtual head" addresses into larger cylinder numbers. Later these drives dropped all pretense of using cylinder/head/sector (CHS) co-ordinates and used a technique called LBA (linear block addressing). That basically means that any block request it gets (which comes in the form of a cylinder/head/sector triplet) is translated into a single number (multiple the three numbers in the triplet together) and that is fetch according to the drive's own indexing and mapping. BIOS' then started supporting LBA which overcame the 8Gb limit.
Meanwhile the latest versions of LILO support the necessary BIOS call extensions to boot from any cylinder on any IDE drive; so long at the PC BIOS in question also supports the extension.
I've described alternatives to LILO MANY times in our column. Since this is almost always an issue of installing Linux unto a system that already has a copy of MS-DOS (or any of it's ilk, Win '9x, OS/2, etc) then it's usually easiest to configure you system to boot into MS-DOS and to run a program called LOADLIN.EXE to load your Linux kernel. Because MS-DOS is being booted from "the first" partition on the first or second drive (the only supported configuration) and because it has access to the "rest" of the drive (with it's device drivers, and various Microsoft supplied extensions) then LOADLIN can load any kernel that MS-DOS can "see."
Anyway, this issue is old and obsolete. Please reconsider before you repeat this misconception any further. This is not a "Linux" problem. It is a PC problem which has been faced (and addressed) by many Linux users *because Linux doesn't impose arbitrary constraints on how you configure your filesystems*. Linux doesn't make you install it in the first drive or the first partition, etc. Unfortunately with the freedom has common the confusing choices that have caused so many questions among Linux users.
(!) [Heather] Having choices available, means actually having to make choices. It's a tough job sometimes but I vastly prefer it to the alternative.
This is the part where I rant about how if we improve the documentation enough at least these can be informed choices.
(!) [JimD] LILO and the related questions are confusing to converts from MS-DOS and Windows, and they are just as confusing for old hand UNIX users coming from RISC platforms, and for converts from the old SCO and other PC UNIX platforms.
(!) [Heather] Yup. There are other bootloaders around too, which are easier for some but each has their own new flavors of problem. And not all of them can get over this 1024 thing, which is to say, they actually expect the BIOS to be helpful. Can't always trust that. Welcome to the PC.


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 65 of Linux Gazette April 2001
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29 [ Index of Past Answers ]