[sclug] Re: booting / large hard drive nightmare

Graham Swallow lists at Information-Cascade.co.uk
Mon Oct 18 16:21:04 UTC 2004


The answer might be REALLY simple,
setting the geometry in LILO as a kernel parameter

	hdb=1024,16,32 <-- but with the correct numbers!

You need to examine your existing system, so see what the case is:

James Wyper wrote:
> manager isn't loaded, but then be unable to see most of hdb5 and any of
> hdb6 (i.e. beyond 33GB) (so a lot of the processes that should be
> spawned from init aren't).  When I first installed Mandrake the
> partitioning process reported a 33GB drive not an 80GB one, until I
> loaded the disk manager first.

	That sounds like not detecting the disk geometry properly.
	This is archeology, *maybe* IDE is different from EIDE-ATA,
	and in THAT case the kernel uses the C/H/S from the bios,
	(I thought it asked the disk, not the controller).

	(1) Without OnTrack 'press-del-for-setup' to get bios.

		What is the reported Cylinder/Heads/Sectors

	(2) Without Ontrack, the geometry appears in the kernel boot,
	Press ScrollLock (or is it Pause - I forget) then Shift-PgUp
	Or after boot run 'dmesg | less'

...
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 00:00.1
SIS5513: chipset revision 208
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS530 ATA 66 controller
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
hda: Maxtor 92040U6, ATA DISK drive
blk: queue c034f440, I/O limit 4095Mb (mask 0xffffffff)
hdc: Maxtor 92041U4, ATA DISK drive
hdd: BCD E520C, ATAPI CD/DVD-ROM drive
blk: queue c034f8ac, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 39882528 sectors (20420 MB) w/2048KiB Cache, CHS=2482/255/63, UDMA(66)
hdc: attached ide-disk driver.
hdc: host protected area => 1
hdc: 40020624 sectors (20491 MB) w/512KiB Cache, CHS=39703/16/63, UDMA(33)
hdd: attached ide-cdrom driver.
hdd: ATAPI 40X CD-ROM drive, 128kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 >
 hdc: hdc1 hdc2 hdc3 < hdc5 >
...

		FOR ME that shows that hda says it has 255 heads,
		hdc has 16 heads. Both say 63 sectors-per-track.
		Thats historical residue, from the maximum number of
		bits held by the BIOS. The disk varies in geometry,
		but has a nice story to tell the BIOS. Some bios's
		have limits of 1024/16/32, but over time it all changed.
		The actual number of platters is different.

	(3) cat /proc/partitions (Without OnTrack)

major minor  #blocks  name     rio rmerge rsect ruse wio wmerge wsect wuse runni

  22     0   20010312 hdc 4995 16054 106285 99420 1563 1938 27834 9850 -3 176963
  22     1    4194760 hdc1 11 0 11 20 0 0 0 0 0 20 20
  22     2   10486224 hdc2 863 9469 20664 27850 25 12 74 150 0 15860 28000
  22     3          1 hdc3 0 0 0 0 0 0 0 0 0 0 0
  22     5    5329264 hdc5 4119 6579 85594 71520 1538 1926 27760 9700 0 45290 81
   3     0   19941264 hda 1878 14420 32587 18650 37 126 326 30 -3 1785940 428983
   3     1    2096482 hda1 11 0 11 20 0 0 0 0 0 20 20
   3     2      10584 hda2 0 0 0 0 0 0 0 0 0 0 0
   3     3    4021256 hda3 0 0 0 0 0 0 0 0 0 0 0
   3     4          1 hda4 0 0 0 0 0 0 0 0 0 0 0
   3     5    2096482 hda5 15 56 142 40 4 0 8 0 0 40 40
   3     6    2096451 hda6 1641 13643 30568 14020 29 126 310 30 0 8830 14050
   3     7    9598806 hda7 207 709 1834 4510 4 0 8 0 0 1520 4510

		You only want the first #blocks.
		The rest is for monitoring access counts.

	(4) cat /proc/ide/ide1/hdc/geometry

physical     39703/16/63
logical      39703/16/63

	(5) And again WITH OnTrack

		Are they different?

		My theory, is that OnTrack have a low-level (NDA) trick
		that makes your IBM bios write the C/H/S differently
		into the MB circuitry (BIOS), as well as the fdisk
		sectors, and somehow Linux doesnt get past them to
		'the truth' (A feature, really, if you look wider).

		EG it might be a 16-bit CMOS register with 32 bit value

	(6) IF THATS THE DIFFERENCE, Set the geometry at boot:

		LILO> linux hdb=1024,16,32

	(6b) In /etc/lilo.conf

		append="hdb=1024,16,32"

	See /usr/src/linux/Documentation/ide.txt

	(7)	fdisk -l /dev/hdc (not a suggested layout)

Disk /dev/hdc: 16 heads, 63 sectors, 39703 cylinders
Units = cylinders of 1008 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1      8323   4194760+   c  Win95 FAT32 (LBA)
/dev/hdc2          8324     29129  10486224   83  Linux
/dev/hdc3         29130     39703   5329296    5  Extended
/dev/hdc5         29130     39703   5329264+  83  Linux


> I have also tried a recent ATA100 PCI card and that didn't work either.
>   It's because I've exhausted these possibilities that I'm turning to
> workarounds.

	This is because Linux is correctly driving the IDE hardware
	you have, and the EIDE hardware is much the same.

	That card is likely to show a big improvement in speed though,
	as would a good (expensive - twice as many wires) cable.

	It MIGHT be that the PCI card uses EIDE drive enquiry, not BIOS,
	but now conflicts with how the drive was already fdisk/formatted.

ALSO:

	whilst in IDE RTFM mode, lookup:

	ext3:
		you must have ext3 in kernel or module
		tune2fs -j /dev/hda7
		vi /etc/fstab

	hdparm:

		timeout=240 # 240/12 = 20 Minutes (5 sec)
		timeout=241 #   1*30 = 30 Minutes

		hdparm -c 3 -d 1 -S $timeout -u 1 -W 1 /dev/hda
		hdparm -c 3 -d 1 -S $timeout -u 1 -W 1 /dev/hdc



> gd@ said:
>
> Hmm. Remind me to check the access permissions on my brain --- your message 
> was much too similar to mine than is strictly comfortable!
>

	This might have been a part of the telepathy module in earlier
	kernel releases, and documentation modules. Over time the
	infused data merges deeper, as if: chmod g+w memory

ALSO:

	I use 100MB because a ZIP disk is 95MB, and because it opens
	up boot options (lots of initrd's, boot_root's, common configs)
	I put /etc/lilo.conf onto that partition (symb link), so that
	multi-boot machines share what they share.

--
   Graham
   0118 975 6229
   http://www.Information-Cascade.co.uk
   gps (at) Information-Cascade (dot) co.uk


More information about the Sclug mailing list