Subject: 8Gb disc on IDEFS

From: Ashley Ward <[email-masked]>
Date: Tue, 13 Apr 1999 19:58:12 +0100

Hi...

I've managed to successfully install ARM Linux on a RPC 700 with a 812Mb
disc.

Now I seem to have multiplied the challenge and I'm trying it on a friends
StrongARM RPC, on which we have just installed a 8Gb disc with a new IDEFS
interface from APDL. It's an ideA interface, firmware version 3.25, "IDE
V6".

PartMan 1.11 brings up a dialogue box asking for the number of cylinders on
the disc. Unfortunately the dialogue will only allow 4 digits to be
entered, and I need to enter the five digit number 16383.

So, after reading the list archives, I've found the alpha version of
PartMan (1.13a13). This does a bit better, but I'm still stuck.

I can create two partitions using the ideA IDEFormat program (version
3.51), one 2Gb large for ARM Linux + swap, the other 6Gb large for RISC
OS. Now I start the alpha PartMan and enter IDEFS, :4 and :5 appear. If I
select :4, I get two FileCore partitions listed. Unfortunately it seems to
be impossible to change one of these partitions to Linux - if I delete one,
it disappears (I was expecting it to change to the "Free" type). The "Edit
^E" and "Initialise..." options are greyed out, as is the "New" option.

Selecting :5 instead and Partition type Filecore/Linux gives one Filecore
partition, and another partition, which is of the "Reserved" type and one
sector long. Selecting Partition type ICS IDEFS instead gives the following
nonsense display:

Partition Start     End       Size    Type
-	  0	    970170187 61997MB Free
1         970170188 405816893 37002MB Filecore

(the start of the long start and end figures have been truncated by the
GUI).

OK - so I can delete one of the partitions using IDEFormat. Now when I
enter IDEFS, only :4 appears. Setting Partition type to ICS IDEFS and
choosing :4 just lists the one FileCore partition. Setting Partition type
to Filecore/Linux and choosing :4 gives the FileCore partition and another,
which is of the "Reserved" type, and 1 sector long. But there seems to be
no way of accessing the free space after the FileCore partition.

So! How can I create the Linux Native and Linux Swap partitions on an 8Gb
(Seagate, ST38641A Medalist) drive with an APDL ideA (I think, formerly
ICS?) interface?

Sorry for all the confusing detail - thanks very much for any help.

Ash.

-- 
         Ashley Ward - Graduate Teaching Assistant - PhD year 1
    [email-masked] - http://www.dcs.warwick.ac.uk/~ashley/
Room 102, Department of Computer Science, University of Warwick, Coventry
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Mark Seaborn <[email-masked]>
Date: Wed, 14 Apr 1999 17:48:42 +0100 (BST)

In <URL:news:local.armlinux> on Tue 13 Apr, Ashley Ward wrote:

[snip]
> be impossible to change one of these partitions to Linux - if I delete
> one, it disappears (I was expecting it to change to the "Free" type). The
> "Edit ^E" and "Initialise..." options are greyed out, as is the "New"
> option.

You don't want to create the Linux partitions with IDEFormat.  Leave some
empty space after the Filecore partitions instead (when you create them
with IDEFormat), and create the Linux partitions after it on the disc with
PartMan (select :4 in PartMan, because partition tables on other partitions,
rather than on the disc itself, will be ignored).

If you try the install discs now, they'll probably fall down when it gets to
creating a filesystem on the partition.  There's a bug in the kernel that
stops it from recognising the partitions correctly, so edit the file
arch/arm/drivers/block/adfspart.c in Linux, changing the function
adfspart_check_ICS() to:

static int adfspart_check_ICS (struct gendisk *hd, kdev_t dev, unsigned long first_sector,
			       unsigned int minor)
{
	struct buffer_head *bh;
	unsigned long sum;
	unsigned int i, mask = (1 << hd->minor_shift) - 1;
	struct ics_part { unsigned long start; long size; } *p;

	/*
	 * Try ICS style partitions - sector 0 contains partition info.
	 */
	if (!(bh = bread (dev, 0, 1024)))
	    	return -1;

	/*
	 * check for a valid checksum
	 */
	for (i = 0, sum = 0x50617274; i < 508; i++)
		sum += bh->b_data[i];

	if (sum != *(unsigned long *)(&bh->b_data[508])) {
	    	brelse (bh);
		return 0; /* not ICS partition table */
	}

	printk (" [ICS]");

	for (p = (struct ics_part *)bh->b_data; p->size; p++) {
		if ((minor & mask) == 0)
			break;

		if (p->size < 0) {
			if(adfspart_check_ICSLinux (dev, p->start))
				printk(" Linux partition:");
				else printk(" Linux partition (probably):");
			add_partition (hd, minor, first_sector + p->start + 1, -p->size - 1);
		} else
			add_partition (hd, minor, first_sector + p->start, p->size);
		minor++;
	}
	brelse (bh);

	return 1;
}

And recompile the kernel.  Since you've got a working ARM Linux box already,
this shouldn't be much of a problem.  If it is, I'll send you a patched
kernel.

Try running install now.  Does it work, and what does the kernel print for
the `Partition check' when it books?

-- 
         Mark Seaborn
  - [email-masked] - http://www.argonet.co.uk/users/mseaborn/ -
 
         ``I owe a lot to my parents, especially my mother and
                  my father'' -- Greg Norman