There is a bad bug in the ext2 file system, namely the fact
that the magic number is not stored in the same relative
position as minix uses.
Ted:
This is not really a bug in the ext2 filesystem --- *all* of the
filesystems store their magic numbers at different offsets.
Yes, but minix was first, that is why I call it a bug in xiafs and ext[2].
A clean solution to all of this would be to have the genhd code store
the partition type code in the partition table along with all of the
rest of the partition table's vital statistics, and then have the root
filesystem autodetection code use that type code as a hint to see which
filesystem it should try to mount first.
No, not clean at all. I agree for other reasons that it would be
useful to store the partition type code, in fact the entire partition
table entry, in the struct hd_struct - various programs doing
something `dangerous' like wiping out a file system (mkswap, mke2fs)
might wish to check the partition ID and ask for confirmation if
the ID is not 0x82 resp. 0x83 and no --force flag was given and stdin
is a terminal. { Please no discussion on this topic. We had it already. }
Tradition so far is that 0x83 is Linux (any file system),
0x82 is Linux swap, 0x81 is Minix or old Linux, 0x41 is old Linux
on a disk that also has DRDOS. Such partition IDs do not distinguish
between xiafs and ext2, between msdos, umsdos, vfat, samba etc.
In fact this whole partition ID is a very messy business; nobody
knows what the ID is supposed to mean. OS/2 needs ID 7 before it
believes that it can access an IFS - that is why ext2 has to present
a 7 when read by OS/2.
No, it is unfortunate that it is needed, but the only clean solution
is just to tell the kernel what the type of the rootfs is.
And it is no big deal - just one line in lilo.conf.
Andries