Page 2 of 2

Re: Minimyth Ram or NFS version

Posted: Thu Sep 06, 2012 1:55 pm
by rdoac
I played around somewhat yesterday, moving the NFS root directory to /tftpboot/pxeconfig, calling it nfs-minimyth instead of just minimyth etc etc.

I also had a look within the source a little. What I don't get is how the initial config file is located?

Having a look at: http://minimyth.googlecode.com/svn-hist ... it/conf.pm

Shows me that it's defaulting to trying to mount a local directory and pull the config file from that.

Looks like it determines that I am a local filesystem not TFTPBOOT, but am not sure why? I don't seem to get as far as pulling the config file and get stuck on "directory /minimyth failed to mount"

Of course it failed to mount, it doesn't exist. Is there a way to force it to get the config from /TFTP or NFS using the BOOT_URL as a command line?

Code: Select all

if ( (! $minimyth->var_get('MM_MINIMYTH_BOOT_URL')            ) ||
         (  $minimyth->var_get('MM_MINIMYTH_BOOT_URL') !~ /^file:/) )
        {
        $minimyth->package_require(q(init::dhcp_oneshot));
        if ($minimyth->package_member_require(q(init::dhcp_oneshot), q(start)))
        {
            eval
            {
                init::dhcp_oneshot->start($minimyth) || ($success = 0);
            };
            if ($@)
            {
                $minimyth->message_output('err', qq($@));
                $success = 0;
            }
        }
        # Reread configuration to take into account configuration from DHCP.
        $minimyth->var_clear();
        $minimyth->var_load({ 'file' => '/etc/conf' });
    }

    $minimyth->message_output('info', "fetching configuration file  ...");

    # Determine current boot directory location.
    if (! $self->_run($minimyth, 'MM_MINIMYTH_BOOT_URL'))
    {
        $minimyth->message_output('err', "cannot determine 'MM_MINIMYTH_BOOT_URL'.");
        return 0;
    }

    # Using local configuration files, so there should be a '/minimyth' directory.
    if ($minimyth->var_get('MM_MINIMYTH_BOOT_URL') eq 'file:/minimyth/')
    {
        for (my $countdown = 30; (! -e '/minimyth') && ($countdown > 0) ; $countdown--)
        {
            $minimyth->message_output('info', "waiting for directory /minimyth to mount ($countdown second(s) left) ...");
            sleep 1;
        }
        if (! -e '/minimyth')
        {
            $minimyth->message_output('err', "directory /minimyth failed to mount.");
            return 0;
        }
    }
 # Get MiniMyth configuration file.
    $minimyth->confro_get('/minimyth.conf', '/etc/minimyth.d/minimyth.conf');



Re: Minimyth Ram or NFS version

Posted: Thu Sep 06, 2012 1:58 pm
by rdoac
Am not sure off hand if this is the current version, am at work and found this online. Will check later.

Re: Minimyth Ram or NFS version

Posted: Thu Sep 06, 2012 8:10 pm
by JoeHenley
Hi ,
Looks like it determines that I am a local filesystem not TFTPBOOT, but am not sure why? I don't seem to get as far as pulling the config file and get stuck on "directory /minimyth failed to mount"

Of course it failed to mount, it doesn't exist. Is there a way to force it to get the config from /TFTP or NFS using the BOOT_URL as a command line?
Well, you could try option 2 in the post a few ago. ;-)

Seriously, you are making this far too difficult for yourself. I strongly recommend that you go back thru your tftpboot directory and delete everything related to minimyth (you can leave all the gentoo/ubuntu stuff if you wish). Then follow Pablo's instructions (use the outline map I sent if it helps clarify some things) to set up MM. It really will be easier.

If you continue on your present path, I fear it will get worse. Many of the scripts Pablo includes assume a specific directory structure. You'll be fighting that all the way.

Good luck!

Joe Henley

Re: Minimyth Ram or NFS version

Posted: Thu Sep 06, 2012 8:58 pm
by rdoac
Well, you could try option 2 in the post a few ago.

Seriously, you are making this far too difficult for yourself. I strongly recommend that you go back thru your tftpboot directory and delete everything related to minimyth (you can leave all the gentoo/ubuntu stuff if you wish). Then follow Pablo's instructions (use the outline map I sent if it helps clarify some things) to set up MM. It really will be easier.
I did do that. Or at least I think I did.
I played around somewhat yesterday, moving the NFS root directory to /tftpboot/pxeconfig, calling it nfs-minimyth instead of just minimyth etc etc.

Re: Minimyth Ram or NFS version

Posted: Fri Sep 07, 2012 12:06 am
by rdoac
Finally got further. My assumption was almost correct, probably because I'm testing this on machines with Linux it guessed that I wanted local storage rather than get my files from TFTP. In the end I added MM_MINIMYTH_BOOT_URL="http://oac/minimyth/" to my boot line and pointed it to a directory on my apache server. No I can go onwards..

Re: Minimyth Ram or NFS version

Posted: Fri Sep 07, 2012 2:27 am
by rdoac
OK, up and working now..