Subject: Using !Partman on a 45GB HD

From: Mark Scholes <[email-masked]>
Date: Tue, 20 Jun 2000 19:58:23 +0100

Hi,

I'm trying to partition a 45GB harddisc on my RISC PC to have 32GB RISC OS and
13GB for ARMLinux.

I run PartMan 1.13b2 (the latest AFAIK) chose ADFS and the drive, entered the
number of cylinders in the Geometry window as the number reported was 16383,
I assume the non LBA number. This brought up what looked correct in the main
window and I created a linux 13GB linux partition and a 500MB swap partition.
I then chose Save from the menu.

Rerunning the program showed the following, even after changing the number of
cylinders:

Disc size 43979 MB Sector size 512 bytes
C/H/S 89354 / 16 / 63

Partition Start End      Size    Type
1             0 66100607 32276MB Filecore
2         40320    40321     0MB Linux Table
-         40322 90068831 43959MB Free

It looks to me as though the Linux Table in the middle of the Filecore
partition. Will this have broken the Filecore partition? Will I have to
reinitialize the HD and copy everything on to it again? Does Partman work with
LBA discs? How do I get it to work?

The ADFS partition seems OK, it hasn't given any errors yet. I can't test the
ARMLinux side as my CD is SCSI and my SCSI card is a Castle (any news on
drivers for it, I've emailed Castle, no reply as yet).

Also if I get it working is it possible to read the ARMLinux partitions from
RISC OS? Will IscaFS work with this size of HD?

Mark Scholes
-- 
PlaySound 1.74 is now available from
http://www.markscholes.freeserve.co.uk/software.html

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Tue, 20 Jun 2000 20:59:33 +0100 (BST)

Mark Scholes writes:
> number of cylinders in the Geometry window as the number reported was 16383

16383 is the maximum number of cylinders that the drive itself will report.

> 1             0 66100607 32276MB Filecore
                  ^^^^^^^^- right

> 2         40320    40321     0MB Linux Table
            ^^^^^- wrong - and is 66100607 & 65535

> partition. Will this have broken the Filecore partition?

No, not if you haven't saved it since noticing this problem.

> Does Partman work with LBA discs?

Yes.  You've actually tripped over another limitation of the Filecore
format though - the bytes allocated in the non-ADFS partition descriptor
do not allow such a large number of cylinders to be specified.  The Linux
table must be within the first 65535 cylinders therefore, which limits your
filecore size to around 31GB.

> drivers for it, I've emailed Castle, no reply as yet).

Castle are the only people who are able to write the drivers (they refuse
to allow anyone else to know how their cards work).

> RISC OS? Will IscaFS work with this size of HD?

Its a fundamental problem (see above), but one which you can work around
if you can afford to loose 1GB.  And yes, to do this you will have to
re-initialise the drive.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Wookey <[email-masked]>
Date: Wed, 21 Jun 2000 17:02:59 +0100 (BST)

On Tue 20 Jun, Russell King - ARM Linux Admin wrote:
> Mark Scholes writes:
> > I run PartMan 1.13b2 (the latest AFAIK) chose ADFS and the drive,
> > entered the number of cylinders in the Geometry window as the number
> > reported was 16383

> 16383 is the maximum number of cylinders that the drive itself will report.

Yes. I think I sent in a patch that helps with this problem (Russell?
but maybe I never got round it/quite finished it - so it's attached
here (!diff format I'm afraid -) to play with).

This uses the lba-capacity field to work out the corect geometry instead
of believing the cripplied-for-PCbioses 'cylinders' field.

Try it, or if you have probs I'll send you a modded !Partman version to try.

> > The ADFS partition seems OK, it hasn't given any errors yet. I can't
> > test the ARMLinux side as my CD is SCSI and my SCSI card is a Castle
> > (any news on drivers for it, I've emailed Castle, no reply as yet).

> to allow anyone else to know how their cards work).

They have said that they will tell me what to do and allow a binary-only
distribution of a driver, which is pretty crummy (some people just don't
have the right attitude to open source :-( ), but better than nothing at
all. I hope to get something done about this in the next couple or three
months. The same applies to Kinetic card support.

> > Also if I get it working is it possible to read the ARMLinux
> > partitions from RISC OS? Will IscaFS work with this size of HD?

IscaFs definately has a few bugs, so who knows what it'll make of a
partition 13Gb partition 31Gb into a drive :-). But it ought to work. As
I'm now nominally (i.e. I'm looking after it, and will apply
any patches I get but haven't done a stroke of work on it myself yet) the
maintainer of this code I'd be keen to hear how you get on...

Wookey
-- 
Aleph One Ltd, Bottisham, CAMBRIDGE, CB5 9BA, UK  Tel (00 44) 1223 811679
work: http://www.aleph1.co.uk/     play: http://www.chaos.org.uk/~wookey/

Diff files 'ADFS::Chewy.$.ARMlinux.utils.source.fromftp.partlib/arc.lib.blkio.c.open' and 'ADFS::Chewy.$.ARMlinux.utils.source.lib.blkio.c.open'
change ADFS::Chewy.$.ARMlinux.utils.source.fromftp.partlib/arc.lib.blkio.c.open, line 179 to 184
  line  179:       geo->log2secsize = 9;
  line  180:       geo->sector_size = 1 << 9;
  line  181:       geo->sectors   = ide_id_res.sectors;
  line  182:       geo->heads     = ide_id_res.heads;
  line  183:       geo->cylinders = ide_id_res.cyls;
  line  184:       update_disc_record = 1;
to ADFS::Chewy.$.ARMlinux.utils.source.lib.blkio.c.open, line 179 to 200
  line  179: 
  line  180:       dbg_printf ("-IDE Identify gives: chs=%d,%d,%d, current chs=%d,%d,%d",
  line  181:           ide_id_res.cyls,ide_id_res.heads, ide_id_res.sectors,
  line  182:           ide_id_res.cur_cyls,ide_id_res.cur_heads,ide_id_res.cur_sectors);
  line  183:       dbg_printf ("LBA mode %ssupported",ide_id_res.capability&0x02 ? "is " : "is not ");
  line  184:       /* For big drives get sector count to imply cylinder count */
  line  185:       if (ide_id_res.field_valid & 0x01) {
  line  186:         geo->log2secsize = 9;
  line  187:         geo->sector_size = 1 << 9;
  line  188:         geo->sectors   = ide_id_res.cur_sectors;
  line  189:         geo->heads     = ide_id_res.cur_heads;
  line  190:         geo->cylinders = ide_id_res.lba_capacity / (ide_id_res.cur_sectors * ide_id_res.cur_heads);
  line  191:       dbg_printf ("LBA capacity:%08X, implies %d cylinders",ide_id_res.lba_capacity, geo->cylinders);
  line  192:         update_disc_record = 1;
  line  193:       } else {
  line  194:         geo->log2secsize = 9;
  line  195:         geo->sector_size = 1 << 9;
  line  196:         geo->sectors   = ide_id_res.sectors;
  line  197:         geo->heads     = ide_id_res.heads;
  line  198:         geo->cylinders = ide_id_res.cyls;
  line  199:         update_disc_record = 1;
  line  200:        }

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 21 Jun 2000 21:01:44 +0100 (BST)

Wookey writes:
> have the right attitude to open source :-(

I've been hearing this story for well over 2 years now.  I'd be very
surprised to see anything from Castle Tech.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Wookey <[email-masked]>
Date: Fri, 30 Jun 2000 13:42:25 +0100 (BST)

> surprised to see anything from Castle Tech.

Well, I have now got the specs (insofar as they exist) for their SCSI
cards and the Kinetic, so that's a step forward. It'll be a while before
this reaches the top of my do-list though.

Wookey