macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 10:08:49 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Mounting /opt from a file  (Read 2603 times)
0 Members and 1 Guest are viewing this topic.
Mike
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: November 06, 2006, 23:02:15 PM »

Hi,

I am a total newbie to Linux, and have muddled my way through installing ipkg sucessfully using the tutorial.  However, I am not able to auto-mount on startup.

I can mount to a file using command :

Code:
mount -o loop /tmp/harddisk/core.aes /opt

But I cannot get it to mount at boot.

The post-boot file I am using is as below:

Code:
#!/bin/sh
# wait for /opt to mount
mount -o loop /tmp/harddisk/core.aes /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

# Activate swap
swapon /tmp/harddisk/swap.aes

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung

Which is from the tutorial, but modified with the "Mount" code that  I know works when typed into PuTTY.

Can anyone please help me - cos at the mo I've got a WL-HDD that I can't use proprtly with either of my windows computers  Sad

Thanks in advance!!

Mike
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #1 on: November 07, 2006, 08:59:39 AM »


You need your disk to mount on /tmp/harddisk before you can find the core.aes file. I think this is the problem.

Logged
Mike
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: November 07, 2006, 10:01:04 AM »

Hi Macsat,

That would sound sensible, but how do I convince the unit to wait for /tmp/harddisk to mount?

Thanks in advance.

Mike H
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #3 on: November 07, 2006, 13:03:39 PM »


You should put your script (where you mount stuff) in post-mount instead of post-boot.

Logged
Mike
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #4 on: November 07, 2006, 13:14:16 PM »

Hi Macsat,

I'll give that a try tonight - I am assuming I just use the "Touch" command to create the file, then set it as executable.


Thanks again!

Mike.
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #5 on: November 07, 2006, 13:22:52 PM »


yes, you can do it that way. Or just move your post-boot file to post-mount :

Code:
mv post-boot post-mount

And remember to write and commit to flashfs.
Logged
Mike
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #6 on: November 10, 2006, 11:18:01 AM »

Hello,

Thanks for the help.  I now have a fully working WL-WDD running Samba, and as a wireless USB print server, with the Hdparm package spinning the hdd down.

Thanks again!

Mike
Logged
macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #7 on: November 10, 2006, 11:48:12 AM »


No Problem. Glad to hear you got it working :-)
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 3.071 seconds with 24 queries.