SEARCH
ASUS Member ID
Password
Forgot password?
Join member

ASUS Support Home Location : Forum > Multimedia > O!Play HDP-R1  
  Forum  
  Topic : [Sharing]Auto mount a share at boot time New Topic
Wzl
Member
Posts : 9
Level :
Tech Points : 2
From: CAN
Posted:1/23/2010 6:51:00 AM # 21
Mine never did either.  After a power cycle, I just telnet in, and run it once, and it seems to keep the setting.

On another note, anyone able to use the new delete file feature in 1.18 using NFS?  Apparently there is an issue using ramfs as mount points.  If you mount to a usb key, that works, but not ideal.

  Reply Reply Quote & Reply Quote & Reply
akbor
VIP Member
Posts : 5
Level :
Tech Points : 0
From: DEU
Posted:1/24/2010 7:35:00 AM # 22
Hi,

with the FW 1.18PAL mount from the /usr/local/ets/rcS script fails without an additional wait time of at least 5 seconds. The network configuration seems to be not yet set during rcS is executed. My mount options are a litte bit different from the Joes proposal in the first post but it seems to work perfectly and the mount command is executed very fast!

mkdir -p /tmp/ramfs/volumes/my_router
sleep 5
mount -t nfs -o rsize=32768,wsize=32768,ro,soft,udp,nolock 192.168.1.1:/tmp/harddisk /tmp/ramfs/volumes/my_router

  Reply Reply Quote & Reply Quote & Reply
akbor
VIP Member
Posts : 5
Level :
Tech Points : 0
From: DEU
Posted:1/25/2010 6:00:00 AM # 23
Sorry, I've an other problem with my (working! mounted under Storage Device) NFS share:

I cannot copy any files to or from the NFS share by using the O!Play box. In the File Copy menu my mounted share is shown as empty, so I cannot select a file for copy, or chose a sub-directory from the share as the copy target. I'm currently using the FW 1.18PAL.

Can anyone help me to solve this problem? Thank you in advance!

  Reply Reply Quote & Reply Quote & Reply
Joe
Member
Posts : 23
Level :
Tech Points : 48
From: United States
Posted:1/25/2010 7:41:00 PM # 24

Quote:
Author: akbor Posted: 1/24/2010 7:35:00 AM

Hi,

with the FW 1.18PAL mount from the /usr/local/ets/rcS script fails without an additional wait time of at least 5 seconds. The network configuration seems to be not yet set during rcS is executed. My mount options are a litte bit different from the Joes proposal in the first post but it seems to work perfectly and the mount command is executed very fast!

mkdir -p /tmp/ramfs/volumes/my_router
sleep 5
mount -t nfs -o rsize=32768,wsize=32768,ro,soft,udp,nolock 192.168.1.1:/tmp/harddisk /tmp/ramfs/volumes/my_router


Yes agreed - without the sleep command my Asus won't NFS mount during boot either. I'll update the first post.

Thanks,
Joe

  Reply Reply Quote & Reply Quote & Reply
akbor
VIP Member
Posts : 5
Level :
Tech Points : 0
From: DEU
Posted:1/26/2010 6:22:00 AM # 25
Hi Joe,

maybe do you know something about my copying issue in my post above?

Thx


  Reply Reply Quote & Reply Quote & Reply
AdasOsorus
Member
Posts : 8
Level :
Tech Points : 0
From: Canada
Posted:2/1/2010 11:42:00 PM # 26
Thank (Joe and jpgeek) you very much for your guide... NFS working perfectly in version 1.18N (Linux server); SAMBA has some issue with login/pass.

Before I modify your scripts, I got some problem to have the NFS-Mount working correctly at the boot sequence (I have to go inside "setup menu" just after boot to have NFS drive mounted ?&*%&%&)


I want to share my modifications...

1)
last line of : /usr/local/etc/rcS
( . /usr/local/etc/my_mounts > /tmp/rcS.log 2>&1 ) &
2) /usr/local/etc/my_mounts
#
set -x
#
LOGFILE="/tmp/my_mounts.log"
touch $LOGFILE
rm $LOGFILE
#
MEDIA_SERVER="192.168.1.10:/home/0_MultimediaFiles"
TARGET_DIR="/tmp/ramfs/volumes"
#
umount $TARGET_DIR/Videos 2>&1
umount $TARGET_DIR/Photographies 2>&1
umount $TARGET_DIR/Musique 2>&1
#
sleep 2
#
mkdir -p $TARGET_DIR/Videos 1>>$LOGFILE 2>&1
mkdir -p $TARGET_DIR/Photographies 1>>$LOGFILE 2>&1
mkdir -p $TARGET_DIR/Musique 1>>$LOGFILE 2>&1
#
sleep 20
#
mount -t nfs -o nolock $MEDIA_SERVER/Videos $TARGET_DIR/Videos
mount -t nfs -o nolock $MEDIA_SERVER/Photographies $TARGET_DIR/Photographies
mount -t nfs -o nolock $MEDIA_SERVER/Musique $TARGET_DIR/Musique
#
set +x

I put certainly too much "sleep" inside the script, but it finally work with theses. I hope it will help other people.

Thank you again, Eric


Quote:
Author: Joe Posted: 11/2/2009 1:58:00 AM

I've found a method to have an NFS (or CIFS) share show up as a storage device on the Asus OPlay. The mount occurs during the boot process, so it's done automatically. Once the share is mounted it doesn't affect the usb port storage functionality.

*** I don't recommend you make any changes to your OPlay and am not responsible for any damage done to your devices. ***

IMPORTANT NOTES:
- Currently tested using firmware 1.13N

- NFS works perfectly streaming HD video over wireless-g, whereas CIFS over wireless is choppy and not watchable - would be interesting to know why?

- See no reason you can not have multiple NFS mounts.
(...)

################################
Setup NFS export on Linux Server
################################
edit /etc/exports to share mount point

enable nfs in chkconfig so to start at boot

start nfs: /etc/init.d/nfs start

(...)
#########################################
Manually Setup Asus OPlay to NFS mount Linux share
#########################################
(...)

Thanks,
JoeK


  Reply Reply Quote & Reply Quote & Reply
Heghlu'meH QaQ jajvam!
Cohoe
Member
Posts : 1
Level :
Tech Points : 0
From: Canada
Posted:2/2/2010 9:34:00 AM # 27

Hello,

 

I followed the direction above for auto mounting, and it worked a few times and then stopped working. I eventually determined that there was a network error on bootup, since when I ran the rc.local script from the shell it worked perfectly.

I determined that the network interface was not always brought up on bootup, weather it was DHCP or a static IP. To fix this (manually) I had to go into the Settings menu and only then would the network interface come up.

To fix this in the script, I just added /sbin/ifconfig eth0 192.168.1.5 into my rcS or rc.local file and from then on the network was brought up at boot and the shares were mounted.

I hope this helps and saves some time for others. I'm not sure why the network didn't come up, if it was something I had accidentally changed in the config files or a bug. I tried with several different firmware versions as well.

 

  Reply Reply Quote & Reply Quote & Reply
AdasOsorus
Member
Posts : 8
Level :
Tech Points : 0
From: Canada
Posted:2/3/2010 12:56:00 AM # 28
Cohoe, good idea...

Look what I did for DHCP version:

Create a script:  /usr/local/etc/network.sh
(run before mounting any network drives [inside rcS])

Edited [2010-02-02] ok look at the next comment... It work

ifconfig eth0 up &
sleep 2
#
/sbin/udhcpc -p /var/lock/udhcpc_eth0.pid -t 15 -b -i eth0

TODO: . To avoid running this script in the case of good network initialization, I will have to check the results of the original "ifconfig".
Check inside theses:
   /var/lock/dhcp.eth0
or
   /var/lock/dhcp.ok
or
   /var/lock/subsys/network/
Anyone here has a console inside the Oplay the to confirm me what it have inside the previous file when network fail to load (I can't read them because I connect to the Oplay via network!)


  Reply Reply Quote & Reply Quote & Reply
Heghlu'meH QaQ jajvam!
AdasOsorus
Member
Posts : 8
Level :
Tech Points : 0
From: Canada
Posted:2/3/2010 10:45:00 AM # 29
Good news, I was able to remove almost ALL sleep inside scripts (just two left of 1sec).
--- Version 1.18N

Last line of: /usr/local/etc/rcS

( . /usr/local/etc/network.sh > /tmp/rcS.log ) &
File: /usr/local/etc/network.sh
[edited 2010-02-03] optimize starting time, change are in RED text
#!/bin/sh
#
set -x
#
DHCPC_PIDFILE="/var/lock/udhcpc_eth0.pid"
#
#
...... IP Config Start ......
#
if ! [ -f "$DHCPC_PIDFILE" ]; then
  /sbin/ifconfig eth0 down
  /sbin/ifconfig eth0 up
  killall udhcpc
  #
  /sbin/udhcpc -p $
DHCPCPID_FILE -t 15 -b -i eth0 -s /etc/udhcpc.script
  /sbin/udhcpc -p $DHCPC_PIDFILE -t 15 -b -i eth0 -s /etc/udhcpc.script

else
  IP_NOW=`/sbin/ifconfig eth0 | awk '/255.255/ {print substr($2,index($2,":")+1,15)}'`
  echo "DHCP already started... IP = $IP_NOW"
fi
#
# ...... IP Config end ......
#
/usr/local/etc/my_mounts
#
set +x

Note: if you want to remove DHCP and place in fixe IP, change like this
# ...... IP Config Start ......
#
/sbin/ifconfig eth0 down
killall udhcpc
#
/sbin/ifconfig eth0 up XXX.XXX.XXX.XXX
sleep 1

#
# ...... IP Config end ......

Where XXX.XXX.XXX.XXX is your desired IP address.

File: /usr/local/etc/my_mounts
#!/bin/sh
#
#
set -x
#
LOGFILE="/tmp/my_mounts.log"
touch $LOGFILE
rm $LOGFILE
#
MEDIA_SERVER="192.168.1.10:/home/0_MultimediaFiles"
TARGET_DIR="/tmp/ramfs/volumes"
#
umount $TARGET_DIR/Videos 2>&1
umount $TARGET_DIR/Photographies 2>&1
umount $TARGET_DIR/Musique 2>&1
#
sleep 1
#
mkdir -p $TARGET_DIR/Videos >> $LOGFILE 2>&1
mkdir -p $TARGET_DIR/Photographies >> $LOGFILE 2>&1
mkdir -p $TARGET_DIR/Musique >> $LOGFILE 2>&1
#
mount -t nfs -o nolock $MEDIA_SERVER/Videos $TARGET_DIR/Videos
mount -t nfs -o nolock $MEDIA_SERVER/Photographies $TARGET_DIR/Photographies
mount -t nfs -o nolock $MEDIA_SERVER/Musique $TARGET_DIR/Musique
#
set +x

Don't forget to let operating system execute  my_mounts  and  network.sh
chmod +x /usr/local/etc/my_mounts
chmod +x /usr/local/etc/network.sh
Eric G.

  Reply Reply Quote & Reply Quote & Reply
Heghlu'meH QaQ jajvam!
Tippett
Member
Posts : 1
Level :
Tech Points : 0
From: United States
Posted:2/8/2010 4:43:00 AM # 30
My nfs mounts are OK. But if there is no USB drive plugged in I cannot seem to select the storage menu item and get to the nfs mounted stuff. Any ideas? Thanks!

  Reply Reply Quote & Reply Quote & Reply
First  Prev  1 2 3 4 5 6 7 8 9  Next  Last
Previous Topic:: Next Topic
Feedback for our Website ModeratorModerator: New Topic Related FAQ Related FAQ Forum Home Forum Home
Forum Model :
Legal Information | Privacy Policy | Sitemap | Contact Us | ASUS Global
  ©ASUSTeK Computer Inc. All rights reserved.