File system development on minix - VMWare player - Minix

This is a discussion on File system development on minix - VMWare player - Minix ; hi Im trying to develop a new minix based file system. Im using VMware player on windows Xp host and minix as the guest os. havin probs in the following: 1. how do i create a new harddisk image and ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: File system development on minix - VMWare player

  1. File system development on minix - VMWare player

    hi
    Im trying to develop a new minix based file system.
    Im using VMware player on windows Xp host and minix as the guest os.
    havin probs in the following:

    1. how do i create a new harddisk image and mount it over the existing
    minix system?

    2. can i do mkfs(which is corresponding filesystem of my type) over
    the existing /usr/home directory and then use it for test purpose?


  2. Re: File system development on minix - VMWare player

    > Im trying to develop a new minix based file system.
    > Im using VMware player on windows Xp host and minix as the guest os.
    > havin probs in the following:
    >
    > 1. how do i create a new harddisk image and mount it over the existing
    > minix system?
    >
    > 2. can i do mkfs(which is corresponding filesystem of my type) over
    > the existing /usr/home directory and then use it for test purpose?


    I would recommend either adding an additional virtual disk (download
    Qemu, use qemu-img to create an empty VMDK file, then change the VMX
    file to point to it as the secondary harddisk) or repartitioning your
    current disk (easiest way to do this is re-install Minix, using the
    expert mode to create the paritions).

    In the former case your device name will be either /dev/c0d1p0 or
    /dev/c1d0p0 (depending on whether you add it to the first or second
    virtual IDE controller in the VMX file) and in the latter case it will
    be /dev/c0d0p1. Use this device name to mkfs and to mount the new fs.

    --
    With kind regards,
    Erik van der Kouwe

  3. Re: File system development on minix - VMWare player

    On Mar 22, 12:32 pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > Im trying to develop a new minix based file system.
    > > Im using VMware player on windows Xp host and minix as the guest os.
    > > havin probs in the following:

    >
    > > 1. how do i create a new harddisk image and mount it over the existing
    > > minix system?

    >
    > > 2. can i do mkfs(which is corresponding filesystem of my type) over
    > > the existing /usr/home directory and then use it for test purpose?

    >
    > I would recommend either adding an additional virtual disk (download
    > Qemu, use qemu-img to create an empty VMDK file, then change the VMX
    > file to point to it as the secondary harddisk) or repartitioning your
    > current disk (easiest way to do this is re-install Minix, using the
    > expert mode to create the paritions).
    >
    > In the former case your device name will be either /dev/c0d1p0 or
    > /dev/c1d0p0 (depending on whether you add it to the first or second
    > virtual IDE controller in the VMX file) and in the latter case it will
    > be /dev/c0d0p1. Use this device name to mkfs and to mount the new fs.
    >
    > --
    > With kind regards,
    > Erik van der Kouwe


    thnx a lot ...
    got the thing working...


    i have developed my own mkfs utility, according to my fs-structure.
    but m not able to mount, cause i'll hav to make some changes to /usr/
    src/fs/mount.c

    but the thing is that, if i change this, then i'll not be able to
    mount the root file system when i reboot.

    is there any way, that i can run two different type of mount commands
    according to my needs ??

  4. Re: File system development on minix - VMWare player

    > i have developed my own mkfs utility, according to my fs-structure.
    > but m not able to mount, cause i'll hav to make some changes to usr
    > src/fs/mount.c
    >
    > but the thing is that, if i change this, then i'll not be able to
    > mount the root file system when i reboot.
    >
    > is there any way, that i can run two different type of mount commands
    > according to my needs ??


    The Minix file system has a magic number that read_super (which is
    called from do_mount) uses to reognize it's own format. Simply pick a
    different magic number and you can detect your own FS there, so you can
    have both file system implementations running side by side.

    --
    With kind regards,
    Erik van der Kouwe

  5. Re: File system development on minix - VMWare player

    On Mar 24, 9:11 pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > i have developed my own mkfs utility, according to my fs-structure.
    > > but m not able to mount, cause i'll hav to make some changes to usr
    > > src/fs/mount.c

    >
    > > but the thing is that, if i change this, then i'll not be able to
    > > mount the root file system when i reboot.

    >
    > > is there any way, that i can run two different type of mount commands
    > > according to my needs ??

    >
    > The Minix file system has a magic number that read_super (which is
    > called from do_mount) uses to reognize it's own format. Simply pick a
    > different magic number and you can detect your own FS there, so you can
    > have both file system implementations running side by side.
    >
    > --
    > With kind regards,
    > Erik van der Kouwe


    I tried doing this, but the mount command returns as : "cant mount
    invalid argument"
    as the read_super function checks for the minix fs versions,
    otherwise it returns as invalid argument.

    when i try using the same magic number as minx v2 fs, then the error
    is
    File system panic: trying to free inode not in use.
    this may be because the layout of my inodes is different then what it
    is in minix fs.

    wanted to ask one more thing,
    after modifying some file in /usr/src/fs directory, what do i need to
    do to make the changes visible,
    the make install command is not helpful in this case.
    i also tried recompiling the whole kernel by doing make n then make
    install in the /tools directory.

    plzz help

  6. Re: File system development on minix - VMWare player

    > I tried doing this, but the mount command returns as : "cant mount
    > invalid argument"
    > as the read_super function checks for the minix fs versions,
    > otherwise it returns as invalid argument.


    This is why you would have to modify read_super (and all other
    functions that deal with file systems) to allow them to read your FS.

    > when i try using the same magic number as minx v2 fs, then the error
    > is
    > File system panic: trying to free inode not in use.
    > this may be because the layout of my inodes is different then what it
    > is in minix fs.


    Correct, you should use a different magic number and write code to
    recognize this number and treat it differently.

    > wanted to ask one more thing,
    > after modifying some file in /usr/src/fs directory, what do i need to
    > do to make the changes visible,
    > the make install command is not helpful in this case.
    > i also tried recompiling the whole kernel by doing make n then make
    > install in the /tools directory.


    AFAIK the most effective way is to "make fresh install" in
    /usr/src/tools. This will rebuild the kernel, servers (including FS),
    drivers and libraries.

    --
    With kind regards,
    Erik van der Kouwe

  7. Re: File system development on minix - VMWare player

    On Mar 24, 10:42 pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > I tried doing this, but the mount command returns as : "cant mount
    > > invalid argument"
    > > as the read_super function checks for the minix fs versions,
    > > otherwise it returns as invalid argument.

    >
    > This is why you would have to modify read_super (and all other
    > functions that deal with file systems) to allow them to read your FS.
    >
    > > when i try using the same magic number as minx v2 fs, then the error
    > > is
    > > File system panic: trying to free inode not in use.
    > > this may be because the layout of my inodes is different then what it
    > > is in minix fs.

    >
    > Correct, you should use a different magic number and write code to
    > recognize this number and treat it differently.
    >
    > > wanted to ask one more thing,
    > > after modifying some file in /usr/src/fs directory, what do i need to
    > > do to make the changes visible,
    > > the make install command is not helpful in this case.
    > > i also tried recompiling the whole kernel by doing make n then make
    > > install in the /tools directory.

    >
    > AFAIK the most effective way is to "make fresh install" in
    > /usr/src/tools. This will rebuild the kernel, servers (including FS),
    > drivers and libraries.
    >
    > --
    > With kind regards,
    > Erik van der Kouwe


    ok, now i got it,
    I hav to distinguish between my fs ans the minix fs using the magic
    number,
    i.e i can keep a check in the source files that i modify and
    accordingly pass the control to either the
    minix functions or my functions.

    tried doing make fresh install in the /usr/src/tools directory, the
    following result was displayed

    # make fresh
    install
    make: Don't know how to make
    fresh

    i dont hav any idea about this...

    any suggestions ??

    regards Mohit Gupta

  8. Re: File system development on minix - VMWare player

    > ok, now i got it,
    > I hav to distinguish between my fs ans the minix fs using the magic
    > number,
    > i.e i can keep a check in the source files that i modify and
    > accordingly pass the control to either the
    > minix functions or my functions.
    >
    > tried doing make fresh install in the /usr/src/tools directory, the
    > following result was displayed
    >
    > # make fresh
    > install
    > make: Don't know how to make
    > fresh
    >
    > i dont hav any idea about this...
    >
    > any suggestions ??


    In any proper full installation of Minix this should not cause any
    trouble, so your installation is either incomplete or corrupted (or
    maybe it is old? I am assuming Minix 3.1.2a).

    - Are you sure you chose full install when installing Minix?

    - Are you sure you did not modify /usr/src/tools/Makefile?

    In any case, the best solution is probably to reinstall Minix,
    selecting a full install. If you don't want to do this, at least copy
    the /usr/src tree from the CD or fetch it from Subversion (the
    minix3.org has instructions on this).

    Be sure to keep a copy of the files you modified and re-apply the
    changes afterwards.

    --
    With kind regards,
    Erik van der Kouwe

  9. Re: File system development on minix - VMWare player

    On Mar 24, 11:33 pm, "Erik van der Kouwe" few.vu.nl>
    wrote:
    > > ok, now i got it,
    > > I hav to distinguish between my fs ans the minix fs using the magic
    > > number,
    > > i.e i can keep a check in the source files that i modify and
    > > accordingly pass the control to either the
    > > minix functions or my functions.

    >
    > > tried doing make fresh install in the /usr/src/tools directory, the
    > > following result was displayed

    >
    > > # make fresh
    > > install
    > > make: Don't know how to make
    > > fresh

    >
    > > i dont hav any idea about this...

    >
    > > any suggestions ??

    >
    > In any proper full installation of Minix this should not cause any
    > trouble, so your installation is either incomplete or corrupted (or
    > maybe it is old? I am assuming Minix 3.1.2a).
    >
    > - Are you sure you chose full install when installing Minix?
    >
    > - Are you sure you did not modify /usr/src/tools/Makefile?
    >
    > In any case, the best solution is probably to reinstall Minix,
    > selecting a full install. If you don't want to do this, at least copy
    > the /usr/src tree from the CD or fetch it from Subversion (the
    > minix3.org has instructions on this).
    >
    > Be sure to keep a copy of the files you modified and re-apply the
    > changes afterwards.
    >
    > --
    > With kind regards,
    > Erik van der Kouwe



    tried compiling the following way:

    # cd /usr/src/fs
    # make install
    # cd /usr/src/tools
    # make hdboot
    # reboot

    it worked fine...


+ Reply to Thread