[6161] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Linux SCSI mystery (long war story)

daemon@ATHENA.MIT.EDU (Drew Eckhardt)
Wed Mar 24 02:25:32 1999

To: De Clarke <de@ucolick.org>
cc: linux-scsi@vger.rutgers.edu
In-reply-to: Your message of "Tue, 23 Mar 1999 22:05:12 PST."
             <199903240605.WAA21049@celeste.ucolick.org> 
Date: 	Wed, 24 Mar 1999 00:15:32 -0700
From: Drew Eckhardt <drew@Poohsticks.Org>

In message <199903240605.WAA21049@celeste.ucolick.org>, de@ucolick.org writes:
>I rebooted (but didn't power cycle) and Linux came
>up bright and cheery.  Everything still worked.  All
>the peripherals behaved.  So the next step was to
>install the Evergreen CPU, heat sink, fan, etc.
>Did that, it was easy, rebooted, and got as far as
>
>	LI_ <hang>

Adding the "linear" option to /etc/lilo.conf may fix this; although
that will require re-running LILO.  The simplest solution is probably
to newfs a floppy, copy your kernel to it (from your work machine), and 
run LILO with the following configuration file

    linear
    root=(your root device at home)
    boot=/dev/fd0
    image = vmlinux
	label = linux

boot your floppy and see what happens.

Assuming this works, you probably want to add linear to your lilo 
configuration (remove compact), run lilo, and see if you're back in 
business.

>So I take the SCSI disk to work and hang it on
>a working scsi bus there (Adaptect ctrlr).  I take
>a look at the partition table and it looks terminally
>weird:

All modern disk drivers are addressed as a series of blocks, numbered from 
0 to N-1.  Historically, PCs have used a head/cylinder/sector interface.  
To allow interaction between the two, various SCSI controllers have used 
different schemes; various fixed numbers of heads & sectors with 
a variable number of cylinders (most boards), what the disk reports
(old Seagate), a "best fit" (CAM/NCR on fresh drives), or what
the existing partition table suggests (CAM/NCR on drives with a 
partition table).

In the Linux SCSI drivers, I included a function pointer in the 
per-host structures which allowed user land disk partitioning 
programs to get this information and write partition tables that
DOS considered "correct" (Linux uses only the starting sector
and length entries, which are in blocks).

One side effect of this is that if you throw a disk on a controller
that doesn't adjust its mapping based on the existing partition table,
you get bogus numbers from fdisk.

>Disk /dev/sdc: 255 heads, 63 sectors, 263 cylinders
>Units = cylinders of 16065 * 512 bytes
>
>   Device Boot    Start      End   Blocks   Id  System
>
>/dev/sdc1   *         1        9    66496+  83  Linux native
>Partition 1 has different physical/logical endings:
>     phys=(31, 65, 63) logical=(8, 71, 63)
>Partition 1 does not end on cylinder boundary:
>     phys=(31, 65, 63) should be (31, 254, 63)

I'd speculate that the mapping used when your disk was partitioned
as having 66 heads, 63 sectors, and 1016 cylinders.  If you want to monkey
with the partition tables, you should manually set these values, and 
ignore any warning messages if you haven't.

>2) how come my disk partition table is so trashed?  

It's not.

>3) reading scsi.txt you would think that the NCR driver
>   is not modularized (or is NCR5380 different from
>   NCR53c8xx?)... 

NCR5380 is a very different beast from the NCR53c8xx.



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post