Grub and the VSTa filesystem

From: Thomas J. Erdos <erdost_at_nospam.org>
Date: Sat Jul 31 1999 - 12:00:09 PDT

Hello VSTa comunity,

a few days ago I announced, that I added VSTa filesystem support to the
GRUB bootlloader. John Meacham replied to my announce that some work has
been done on the last known GRUB bootloader. So I downloaded the latest
version and tried to fix it. While I was working on the newer version, I
found that the bootloader I uploaded to the VSTa ftp site, doesn't work
correctly.
The only problem with it is that, one cannot install the second stage of
the bootloader onto a vstafs partition. I simply forgot to add two lines
into the vstafs_read subroutine. So I tried with the newer version, but
that didn't work either because the installation procedure of GRUB
assumes that the second stage file on the harddrive begins at offset 0
of a sector. This is however not the case for vstafs. The begin of the
file is somewhere at the end of the first block. Here an exempt from the
headerfile:

struct fs_file {
        daddr_t fs_prev; /* Previous version of this file 0 */
        ulong fs_rev; /* Revision # 4 */
        ulong fs_len; /* File length in bytes 8 */
        ushort fs_type; /* Type of file 12 */
        ushort fs_nlink; /* # dir entries pointing to this 14 */
        struct prot /* Protection on this file 16 */
                fs_prot;
        uint fs_owner; /* ...creator's UID 32 */
        uint fs_nblk; /* # extents 36 */
        struct alloc /* ...<start,off> tuples of extents 40
*/
                fs_blks[MAXEXT];
        time_t fs_ctime, /* Create/mod timestamps 296 */
                fs_mtime;
        char fs_pad[16]; /* Pad to 32-byte boundary */
                                /* ...this keeps fs_dirent's aligned
304 */
        char fs_data[0]; /* Data starts here 320 */
};

The solution would be to move "char fs_data[0]" to the begin of the next
block, whereever it is, in the current extent or in the next extent, or
the first entry in the fs_file could be jump instruction to the start
of the data, or modify the bootloader. The last option is not simple at
all. I have to discuss it with the current developer of GRUB.

So right now it is still possible to boot the whole VSTa system from a
vstafs partition, that means the root filesystem is vstafs, the kernel
and the modules are loaded from the vstafs partition. The bootloader
still needs to be installed to ffs, ext2fs or fat. Sorry.

Thomas J. Erdos
Received on Sat Jul 31 15:44:28 1999

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:56 PDT