Messages in this thread | | | Date | Mon, 12 Apr 1999 01:56:42 +0200 (MET DST) | From | (Guest section DW) | Subject | Re: PROBLEM: MO mounting not working w/ 2.2.3+ |
| |
From alan@lxorguk.ukuu.org.uk Thu Apr 8 04:23:32 1999
> The present state of affairs is that you have to rewrite your 2.2.2 > partition table for 2.2.3. (By taking all entries and dividing them > by four.) Remind me to mail you a program that does this - write to > aeb@cwi.nl.
[I have now made this offer on two fora and nobody took me up on it. That is good, since it means that people have no problems handling the situation themselves.]
Learning enough about partition tables to make the code auto switch is still on my TODO list.
Hmm. Probably you know all there is to know.
But auto switch? If the partition table says that /dev/sda1 extends from sector 1 to sector 200, then how are you going to decide what sector size was meant?
I do not think auto switch is possible in the kernel. User space might try heuristics and examine the raw disk for things that look like the start of an ext2 or FAT filesystem. Extremely ugly.
A vaguely related matter:
Long ago someone had boot problems because the kernel does autodetect the type of the root filesystem, incorrectly in his case. Indeed, it is quite possible that a partition by coincidence has the magic numbers for several different filesystem types.
Several people, including me, have had problems with a disk containing random garbage. It happens (with 4.6% probability) that the kernel at boot time interprets the garbage as a partition table with an extended partition somewhere, next tries to read the first sector of that extended partition, which almost surely is past the end of the disk, gets a read error and dies (it is long ago, I forgot the details of the death, probably an infinite `resetting SCSI bus').
This means that we need two boot-time flags: 1) rootfstype= 2) skip_pt_read
where the 2nd one would tell the kernel only to look at the root device and not worry about the partition tables elsewhere. It might even mean skipping the partition table reading entirely if we had a third parameter telling where on the root device the root partition lives 3) rootpt=START,LENGTH
These days we are getting more and more cruft in genhd.c to read all kind of partition schemes. Such schemes should be handled like filesystems are in VFS: invoked, perhaps from a module, when we mention their name, not autodetected.
[You see, you want to autodetect. I hate autodetection and heuristics, schemes that are right almost all the time. Because they will fail. This partition reading is one place where it should be possible to stop kernel autodetection.]
Andries
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |