Sign up here and you can log into the forum!

MSHEETDIR migration guide

Everything (else) to do with Movie Sheets and homebrew firmware on the WDTV(s), including how the %*#^ do I get them working?

Re: MSHEETDIR migration guide   

Postby bchtpc » Fri Jan 13, 2012 8:44 am

KAD, thanks very much for your response.

Well, I'm not sure where to turn next as I think I must be missing something fundamental.

I removed the hub from port 1 and plugged the thumb drive directly into port 1 with no change in result.

I tried a different thumb drive with no change in result.

I re-formatted the thumb drive as fat32 with no change.

I think early mount is actually working because when I turn it off, I see nothing in /tmp/mnt. When I turn early mount on, I see /tmp/mnt/3CE4-ADBC so at least the drive is appearing. What I don't get is why I can't see the MSHEETDIR folder there. Do I have to do something else to make it appear?

I have verified that the /media folder is at /tmp/media/usb/USB1/3CE4-ADBC both via Dolphin and windows explorer. In windows explorer, I verified that the folder was empty then used cp /msheets/* /tmp/media/usb/USB1/FCF9-C644/MSHEETDIR (via Telnet) to copy the files, then watched the files appear in the folder, eventually returning to a # prompt. I also used dolphin to confirm that the files are now in MSHEETDIR.

I then used WEC to set MSHEETDIR to /tmp/mnt/3CE4-ADBC/MSHEETDIR, then hit save. Before restart, I verified that I can't see MSHEETDIR in /tmp/mnt/3CE4-ADBC but I wouldn't expect to yet.

Reboot WDTV with Web Frontend.

The /msheets folder is still fully populated so I don't think this worked but I'm doing this remotely so I can't verify for sure.

I still can't see the MSHEETDIR folder in /tmp/mnt/3CE4-ADBC. Should I be able to?

Do I need to try a third thumb drive?
Is there an accepted standard for formatting the thumb drive? I assume that if I can copy to it with cp in Telnet, it's working as expected.

Not there yet.

KAD wrote:the script that executes MSHEETDIR runs very early in the boot process and from the investigation you did

it is not available when the script runs
you said you enabled early mount - which is what is required
but for wharever reason it's not happening

early mount is always done under /tmp/mnt/<UUID>/....

until you can get the drive to show up in /tmp/mnt/... MSHEETDIR will not work
at least now you know what to trouble shoot

here's what I would try
plug the thumbdrive in directly to the WD
and the hub can use the other port allowing access to your hdd

KAD
bchtpc
n00b
 
Posts: 15
Joined: Wed Jan 11, 2012 1:19 pm

Re: MSHEETDIR migration guide   

Postby KAD » Fri Jan 13, 2012 9:04 am

are you still getting this in /tmp/messages.txt

2) I investigated with grep -i sheet /tmp/messages.txt and noted that:

Dec 31 16:02:05 WDTVLIVEPLUS user.notice S67msheet: MSHEETDIR ( /tmp/mnt/FCF9-C644/MSHEETDIR ) DOES NOT EXIST!
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4005
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: MSHEETDIR migration guide   

Postby bchtpc » Fri Jan 13, 2012 9:29 am

Yes, I am still getting that but of course it now contains 3CE4-ADBC due to the change in thumb drive.

KAD wrote:are you still getting this in /tmp/messages.txt

2) I investigated with grep -i sheet /tmp/messages.txt and noted that:

Dec 31 16:02:05 WDTVLIVEPLUS user.notice S67msheet: MSHEETDIR ( /tmp/mnt/FCF9-C644/MSHEETDIR ) DOES NOT EXIST!
bchtpc
n00b
 
Posts: 15
Joined: Wed Jan 11, 2012 1:19 pm

Re: MSHEETDIR migration guide   

Postby KAD » Fri Jan 13, 2012 9:31 am

post the output of
Code: Select all
grep SHEET /conf/config
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4005
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: MSHEETDIR migration guide   

Postby bchtpc » Fri Jan 13, 2012 9:34 am

KAD wrote:post the output of
Code: Select all
grep SHEET /conf/config

# grep SHEET /conf/config
GENMSHEET='OFF'
LISTMSHEET='ON'
VIDMSHEET='ON'
LINKSHEETS='ON'
MSHEETMODE='sheet'
MSHEETDIR='/tmp/mnt/3CE4-ADBC/MSHEETDIR'
DEFAULTSHEET=''
bchtpc
n00b
 
Posts: 15
Joined: Wed Jan 11, 2012 1:19 pm

Re: MSHEETDIR migration guide   

Postby KAD » Fri Jan 13, 2012 10:08 am

well that actually looks ok

you should be able to browse to '/tmp/mnt/3CE4-ADBC/MSHEETDIR'
with the file manager
some super simple - make sure the folder name is correct, not .MSHEETDIR or anything else

also MSHEETDIR should not be a mounted directory (as in over the network)
if done over a network NETAPP must be used for it to work

other though is take a look at /etc/init.d/S67msheet
that's the script that is handles this on boot

if it was me, my next step would be try to do the process manually
you seem comfortable with the cmd line, you can probably easily see how to do this manually by looking at S67msheet

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4005
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: MSHEETDIR migration guide   

Postby bchtpc » Fri Jan 13, 2012 10:31 am

OK, I guess it's time to learn another language anyway. Is there any way to run the code line by line in diagnostic mode so I can inspect values etc or is cmd line the only option? If cmd line it is then I assume I run it line by line in Telnet.

I also assume the failure is being noted during:
if [ -n "$MSHEETDIR" -a -e "$MSHEETDIR" ] ; then
logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) in use."
mount -o bind "$MSHEETDIR" /msheets
echo -n "$MSHEETDIR" > /tmp/MSHEETDIR
elif [ -n "$MSHEETDIR" -a ! -e "$MSHEETDIR" ] ; then
logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) DOES NOT EXIST!"
... because that's where the DOES NOT EXIST message is appearing.
I can guess at what is being attempted but I don't know what all of the -n -s -t etc mean. Time to do some more research.

Before I start though, shouldn't I actually be looking at the early mount process more closely instead of S67msheet because I have verified that I can't see MSHEETDIR folder in /tmp/mnt/3CE4-ADBC...? As you say, the process won't work if early mount didn't succeed. I guess I don't know enough about early mount to say whether it can partially fail or whether seeing /tmp/mnt/3CE4-ADBC means it was completely successful. If so, why can't I see /tmp/mnt/3CE4-ADBC/MSHEETDIR?

Does it matter what process I use to create MSHEETDIR folder? I used windows explorer. Do I need to CHMOD the folder in /media or something so early mount can mount it?

It would seem to me that both of the previous questions are answered by the fact that it worked fine with MSHEETDIR located on the HD on Port 2. Maybe tonight I will try the thumbdrive in Port 2 instead.

Thanks again for the fantastic support.



KAD wrote:well that actually looks ok

you should be able to browse to '/tmp/mnt/3CE4-ADBC/MSHEETDIR'
with the file manager
some super simple - make sure the folder name is correct, not .MSHEETDIR or anything else

also MSHEETDIR should not be a mounted directory (as in over the network)
if done over a network NETAPP must be used for it to work

other though is take a look at /etc/init.d/S67msheet
that's the script that is handles this on boot

if it was me, my next step would be try to do the process manually
you seem comfortable with the cmd line, you can probably easily see how to do this manually by looking at S67msheet

KAD
bchtpc
n00b
 
Posts: 15
Joined: Wed Jan 11, 2012 1:19 pm

Re: MSHEETDIR migration guide   

Postby KAD » Fri Jan 13, 2012 11:03 am

you're correct that's the part of the script that is logging the message

Code: Select all
if [ -n "$MSHEETDIR" -a -e "$MSHEETDIR" ] ; then
logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) in use."
mount -o bind "$MSHEETDIR" /msheets
echo -n "$MSHEETDIR" > /tmp/MSHEETDIR
if it exist do

Code: Select all
elif [ -n "$MSHEETDIR" -a ! -e "$MSHEETDIR" ] ; then
logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) DOES NOT EXIST!"
if it does not exist do

but the part about running manually that I was interested in is actually farther down (sorry, I can't access it from this computer to pull the line myself)

it's something like mount -t ....path ....path none /osd
the script will use the variable like $MSHEETDIR as one of the paths
and to run it manually in telnet
just replace the variables with the absolute path to your MSHEETDIR

KAD

edit: maybe you're familiar with unionfs
that's all this is, current firmwares use aufs because it's a bit more flexible,
but it's the same thing, it's just unioning the MSHEETDIR with the other directory
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4005
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: MSHEETDIR migration guide   

Postby bchtpc » Fri Jan 13, 2012 11:44 am

Here is the entire thing. Can you pick out the one you want me to run.


Code: Select all
#!/bin/sh
### Copyright 2010 b-rad.cc
### http://wdlxtv.com & http://b-rad.cc & http://nextdimension.cc
### GPLv3 - full license located @ /usr/share/LICENSE
### Stipulations:
### - the full copyright notices in /osd/setup_about.xml must be left intact, as it is the publicly displayed copyright portion of this software as dictated by the GPLv3
### - this entire header must be left intact

case $1 in
    start|forcestart)
        if [ -n "`grep -i LINKSHEETS=\'ON\' /conf/config`" -o "$1" == "forcestart" ] ; then
            if [ -f /wdtvext/libext.so -a -z "`grep -i WDTVEXT=\'OFF\' /conf/config`" -a -n "`grep MovieSheet.plugin.js /conf/wdtvext-plugins`" ] ; then
                logger -s -t `basename $0` "Warning LINKSHEETS=ON, but MovieSheet WDTVExt plugin is enabled!!! You must disable MovieSheet to use linksheets."
                cat /osd/empty.xml | tee /tmp/file_info.xml /tmp/list_sheet.xml /tmp/list_wall.xml
            else
                cp /osd/file_info.2.xml /tmp/file_info.xml
                cp /osd/list_sheet.2.xml /tmp/list_sheet.xml
                cp /osd/list_wall.2.xml /tmp/list_wall.xml
                eval `grep MSHEETDIR /conf/config`
                [ -n "`egrep 'none */osd *aufs' /proc/mounts`" -a -f /tmp/MSHEETDIR ] && logger -s -t `basename $0` "/msheets already mounted! Use restart" && exit 1
                if [ -n "$MSHEETDIR" -a -e "$MSHEETDIR" ] ; then
                    logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) in use."
                    mount -o bind "$MSHEETDIR" /msheets
                    echo -n "$MSHEETDIR" > /tmp/MSHEETDIR
                elif [ -n "$MSHEETDIR" -a ! -e "$MSHEETDIR" ] ; then
                    logger -s -t `basename $0` "MSHEETDIR ( $MSHEETDIR ) DOES NOT EXIST!"
                    mount -t tmpfs none /msheets
                    echo -n "/msheets" > /tmp/MSHEETDIR
                else
                    mount -t tmpfs none /msheets
                    echo -n "/msheets" > /tmp/MSHEETDIR
                fi
                if [ -z "`egrep 'none */osd *aufs' /proc/mounts`" ] ; then
                    logger -s -t `basename $0` "base /msheets:/osd aufs mount initializing"
                    mkdir -p /tmp/.root/osd
                    mount -o bind /osd /tmp/.root/osd
                    modprobe aufs 2>/dev/null
                    mount -t aufs none -o br:/msheets=ro:/tmp/.root/osd=ro /osd
                else
                    logger -s -t `basename $0` "attaching new /msheets to /osd"
                    mount -o remount,nowarn_perm,append:/msheets=ro /osd
                fi
            fi
        fi
        ;;
    stop)
        logger -s -t `basename $0` "seperating /msheets (stopping linksheets)"
        OLDMSHEETDIR="`cat /tmp/MSHEETDIR`"
        mount -o "remount,del:/msheets" /osd
        if [ "$?" -eq "0" ] ; then
            umount -f /msheets 2>/dev/null || umount -l /msheets
            logger -s -t `basename $0` "MSHEETDIR ($OLDMSHEETDIR) detached"
            rm /tmp/MSHEETDIR
            exit 0
        else
            logger -s -t `basename $0` "MSHEETDIR ($OLDMSHEETDIR) failed detaching!?!"
            exit 1
        fi
        ;;
    restart)
        $0 stop && $0 start
        ;;
esac
exit 0
Last edited by KAD on Fri Jan 13, 2012 12:41 pm, edited 1 time in total.
Reason: code tags
bchtpc
n00b
 
Posts: 15
Joined: Wed Jan 11, 2012 1:19 pm

Re: MSHEETDIR migration guide   

Postby KAD » Fri Jan 13, 2012 1:06 pm

hum, it looks like it's been changed a bit, since last I looked at it

first we'll try the easy way, since there's a restart block
Code: Select all
config_tool -c LINKSHEETS=OFF
config_tool -s
config_tool -s
reboot
yes, we're disabling linksheets because I don't want it to interfere/give false positive etc

once rebooted
Code: Select all
config_tool -c LINKSHEETS=ON
/etc/init.d/S67msheet restart

and see what output it give, and if moviesheets from MSHEETDIR are available on screen
the script should put them in /msheets and in /osd

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4005
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

PreviousNext

Return to Movie Sheet Support & Discussion

Who is online

Users browsing this forum: No registered users and 1 guest