2011-06-21 09:01:17     fstab on the board

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-21 09:01:17     fstab on the board

Wojtek Skulski (UNITED STATES)

Message: 101519   

 

After creating an on-board flash filesystem, it would be good to mount it. It is also useful to automatically mount SAMBA directories. Such things are usually managed by the fstab. However, the on-board /etc does not contain any fstab. What would be a good place to automatically mount the directories such as flash and/or SAMBA?

 

Is it possible to use a regular fstab on board? It would be convenient.

QuoteReplyEditDelete

 

 

2011-06-21 10:25:58     Re: fstab on the board

Mike Frysinger (UNITED STATES)

Message: 101521   

 

pretty sure if you just created an fstab yourself, things would work fine

 

QuoteReplyEditDelete

 

 

2011-06-21 10:49:27     Re: fstab on the board

Wojtek Skulski (UNITED STATES)

Message: 101522   

 

Mike:

 

I tried. I created the following fstab on board:

 

root:/> cat /etc/fstab

# /etc/fstab: static file system information.

#

# <file system> <mnt point>   <type>  <options>  <dump>  <pass>

 

/dev/mtdblock3 /flash jffs2 defaults 0 0

root:/>

 

It was not executed. After boot the /flash was empty. Then I mounted by hand and I can see a file which I put there yesterday:

 

root:/> ls /flash      <--- empty

root:/> mount -t jffs2 /dev/mtdblock3 /flash

root:/> ls /flash   <--- not empty after mount

index.html

 

 

So I am guessing the fstab needs to get executed by some sort of script. Not sure where to put the command to execute the fstab. Please advise.

 

Naturally, I can simply add the mount command to the startup script. But fstab is more politacally correct, is it not?

QuoteReplyEditDelete

 

 

2011-06-21 11:42:19     Re: fstab on the board

Mike Frysinger (UNITED STATES)

Message: 101523   

 

you're mixing issues now.  fstab is a handy file that `mount` reads and nothing else.  if you want partitions automounted at boot, you need to add the appropriate mount calls to your boot scripts.  like `mount -a` at the end of /etc/rc.

Attachments

    Outcomes