In <URL:news:local.armlinux> on Wed 07 Apr, Mark Seaborn wrote:
> I'm having trouble creating an ext2 filesystem on a hard disc partitioned
> with the ICS scheme.
[snip]
> However, if I do `cat /dev/hde7', it returns without printing anything.
> Catting `/dev/hde[1-5]' prints junk, as you would expect. Does this mean
> Linux isn't reading the size of hde7 correctly?
Well, I've been looking through the sources for the kernel and for fdisk,
and I've managed to solve this, although I'm not sure how reliably. Linux
was giving the size of the partition wrongly -- it falls down on the
partitions created by PartMan.
Take a look at part of adfspart_check_ICS() in adfspart.c:
> for (p = (struct ics_part *)bh->b_data; p->size; p++) {
> if ((minor & mask) == 0)
> break;
>
> if (p->size < 0 && adfspart_check_ICSLinux (dev, p->start)) {
^^^^^^^^^^^
This will never be true because `size' is defined as an unsigned long.
Change the definition of struct ics_part and it's okay.
> /*
> * We use the first sector to identify what type
> * this partition is...
> */
> if (p->size > 1)
> add_partition (hd, minor, first_sector + p->start + 1,
>p->size - 1);
In these two lines above, ``p->size'' must be changed into ``-p->size''.
> } else
> add_partition (hd, minor, first_sector + p->start, p->size);
> minor++;
> }
Once this is done, adfspart_check_ICSLinux() never returns true for me (it
never matches the string `LinuxPart'). However, the fdisk code does match
this, but seems to be doing the same thing, so I don't know what's going on
there. I can't find this string when I look at the disc with Zap.
For the moment I've set adfspart_check_ICSLinux() to return true all the
time. This seems to work: I've created an ext2 fs on the partition, copied
everything across and I can boot from it.
Do these changes sound right? I can't see how it could have worked before,
unless people used the ICS partitioning program instead of PartMan to create
Linux partitions (which would have been easier, surely?).
--
Mark Seaborn
- [EMAIL PROTECTED] - http://www.argonet.co.uk/users/mseaborn/ -
A big hello to all sentient life forms out there!
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]