: How about just changing the 0 into a 1? That will still make mke2fs
: refuse to touch the partition, but it should allow LILO to write to the
: first sector (first 1k block, actually, but that's still better than
: writing a filesystem on the extended partition).
It would have to be a 2, since this counts sectors, not blocks.
Make it
if (hd->part[minor].nr_sects > 2)
hd->part[minor].nr_sects = 2;
: Or does somebody object to this particular approach?
Well, of course the objection is that it is not precisely right -
indeed, 1 would be precisely right, but if I am not mistaken
the kernel does not want to read or write a partial block.
But this is much better than nothing, and seems to be the best
we can come up with right now.
I might send you a patch today - there is another small thing
that can be improved in genhd.c.
Andries