minimyth.script not running?

Help with booting MiniMyth

Moderator: Pablo

Post Reply
rbroberts
Contributor
Posts: 61
Joined: Wed Nov 21, 2007 6:27 pm
Location: Brooklyn, NY
Contact:

minimyth.script not running?

Post by rbroberts » Fri Jan 04, 2008 2:54 am

I'm trying to add a directory to mount on the front end and have added this to my minimyth.script

Code: Select all

mm_url_mount nfs://archos.rlent.pnet/data/mythtv/posters /data/mythv/posters
if [ $? -ne 0 ]; then
    mm_url_mount nfs://192.168.3.3/data/mythtv/posters /data/mythtv/posters
fi
But once the minimyth box comes up, the file system is not mounted nor is the directory created. I can then manually mount it without any problem.

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Fri Jan 04, 2008 3:34 am

Is that the whole minimyth.script?

If so, then you need to include

Code: Select all

. /etc/rc.d/functions
so that you have access to the mm_url_mount function.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

rbroberts
Contributor
Posts: 61
Joined: Wed Nov 21, 2007 6:27 pm
Location: Brooklyn, NY
Contact:

Post by rbroberts » Fri Jan 04, 2008 4:10 am

No, that's not the whole script, that's what I appended to the end of the stock script. The whole script is

Code: Select all

root@mythtv:~ # cat /initrd/rootfs-ro/srv/www/minimyth/conf/minimyth.script
################################################################################
# minimyth.script
#
# The optional MiniMyth configuration script.
#
# For information on this file, see either
# <http>
# or
# <http>,
# where '{frontend}' is the IPv4 address or hostname of your MiniMyth frontend.
#
# A the time this script is run, very little configuration has beeen completed.
# While kernel modules loaded by udev have been loaded, kernel modules loaded by
# other methods are not. In addition, very few services have been started.
# Finally, name resolution (i.e. DNS) has not been configured. As a result, you
# need to be careful about what you assume is available. In particular, you
# must use IP addresses rather than DNS names when refering to servers.
################################################################################

# Include the MiniMyth configuration variables and functions.
. /etc/rc.d/functions

# NFS mount a swap partition.
# This can be useful for MiniMyth frontends that have too little memory to
# run without swap (i.e. MiniMyth frontends that have less than 512MB of
# memory).
# For this to work, you need to prepare the swap file on the server. This is
# done using the command:
#   'cd {swap-dir} ; dd if=/dev/zero of=<swap> bs=1k count=<swap-size}'
# where <swap> is the directory that will be exported and mounted on
# the frontend as the directory containing the swap file, <swap> is the
# name of the swap file, and <swap> is the size of the swap file in
# kilobytes. Remember to use different swap files for each MiniMyth frontend.
#SWAP_URL='<swap>'
#SWAP_FILE='<swap>'
#SWAP_DEVICE=`losetup -f`
#mm_url_mount ${SWAP_URL} "/mnt/swap"
#/sbin/losetup ${SWAP_DEVICE} "/mnt/swap/${SWAP_FILE}"
#/sbin/mkswap ${SWAP_DEVICE}
#/sbin/swapon ${SWAP_DEVICE}

mm_url_mount nfs://archos.rlent.pnet/data/mythtv/posters /mnt/posters
if [ $? -ne 0 ]; then
    mm_url_mount nfs://192.168.3.3/data/mythtv/posters /mnt/posters
fi

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Fri Jan 04, 2008 4:30 am

I just tested by creating a dummy minimyth.script file that echos to a file and enabling MiniMyth to fetch it with MM_MINIMYTH_FETCH_MINIMYTH_SCRIPT='yes'. It worked fine for me.

Does the minimyth.script file show up in /etc/minimyth.d/ on the frontend?
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

rbroberts
Contributor
Posts: 61
Joined: Wed Nov 21, 2007 6:27 pm
Location: Brooklyn, NY
Contact:

Post by rbroberts » Fri Jan 04, 2008 4:46 am

No, it doesn't get put in /etc/minimyth.d. Only minimyth.conf end up there.

Hmmm, I'm a little confused about when it runs and how it gets moved over now. It is in the rootfs image and the comments indicate that it runs before much is configured, so I assumed it was running from the initrd tree.

So, does this mean I must use MM_MINIMYTH_FETCH_MINIMYTH_SCRIPT and fetch the script?

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Fri Jan 04, 2008 4:55 am

rbroberts wrote:No, it doesn't get put in /etc/minimyth.d. Only minimyth.conf end up there.

Hmmm, I'm a little confused about when it runs and how it gets moved over now. It is in the rootfs image and the comments indicate that it runs before much is configured, so I assumed it was running from the initrd tree.

So, does this mean I must use MM_MINIMYTH_FETCH_MINIMYTH_SCRIPT and fetch the script?
Yes, to fetch any file other than minimyth.conf you need to use its corresponding variable in minimyth.conf. This was done some time ago because it was taking a relatively long time to look for and fail to find files not being used (TFTP sucks).
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

rbroberts
Contributor
Posts: 61
Joined: Wed Nov 21, 2007 6:27 pm
Location: Brooklyn, NY
Contact:

Post by rbroberts » Fri Jan 04, 2008 4:57 am

Okay, I'm fetching it now and it works fine.

What I was confused about is that on the myth frontend host, there is a file in /initrd/rootfs-ro/srv/www/minimyth/conf/minimyth.script that I somehow thought would be run.

Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo » Fri Jan 04, 2008 5:40 am

rbroberts wrote:Okay, I'm fetching it now and it works fine.

What I was confused about is that on the myth frontend host, there is a file in /initrd/rootfs-ro/srv/www/minimyth/conf/minimyth.script that I somehow thought would be run.
That file is an example file that is part of the documentation. MiniMyth has a complete set of documentation as part of the root file system.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.

Post Reply