Re: Tentative patch: modularized disk partition systems in 2.3.99-pre2-5

From: Adam J. Richter (adam@yggdrasil.com)
Date: Sun Mar 19 2000 - 17:07:44 EST

  • Next message: Brian Pruss: "Re: Light-On pnic hang?"

    Russel King <rmk@arm.linux.org.uk>:
    >And who's to say that the first four bytes of the first sector of a hard drive
    >have any significance in any case? Some partition tables are stored in sector
    >6, others in the first sector, etc.

            My idea was based on information on page 179 of _Advanced
    MSDOS Programming_, second edition, by Ray Duncan, which stated
    that valid MSDOS boot sectors always started with one of these
    two patterns (in hexademical):

                    E9 __ __ (real mode relative jump, 16 bits)
                    EB __ 90 (real mode relative jump, 8 bits + nop)

            Checking four systems here, I see that their disks
    start with:

                    FA EB 6C 00 (3 machines have this sequence)
                    EB 69 49 4C (1 machine has this sequence).

            I am not sure what the FA opcode prefix does, but that
    system's BIOS still attempts to boot it, so the BIOS apparently
    still recognizes it.

            Anyhow, using a scheme like this, it would be possible to
    add something /etc/modules.conf (or /usr/share/modules/modules.conf.base):

            alias partition-faeb???? msdos_part
            alias partition-e[9b]?????? msdos_part

            However, I am much more interested in a facility mentioned by
    "Guest Section DW" (dwguest@win.tue.nl) where userland programs can
    define the partitioning to the kernel directly. This would be much
    better, since the code would not consume unswappable kernel space,
    it would not have to be released with every new kernel, the would
    not be copies for each kernel version in /lib/modules, it would be
    more flexible, and it could more easily share code with fdisk-like
    programs. Unfortunately, I am having trouble finding this facility,
    since it looks like the only routines that call add_gd_partition are
    those partitioning modules. Anyhow, if this facility really exists,
    I would appreciate a pointer to it, because I would love to move
    partition table reading entirely to userland.

    Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
    adam@yggdrasil.com \ / San Jose, California 95129-1034
    +1 408 261-6630 | g g d r a s i l United States of America
    fax +1 408 261-6631 "Free Software For The Rest Of Us."

    -
    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/



    This archive was generated by hypermail 2b29 : Sun Mar 19 2000 - 18:19:52 EST