OpenWrt Forum Archive

Topic: Mount Points - dont work!... help

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

from one day ago i back to openwrt, i has some problems again but some i solve it..

1. now the say what it is.. the sd card is mounted by his mod on /overlay!
working fine here.
but in the web-man "System->Mount Points"

http://img827.imageshack.us/img827/751/51203041.png


2. AutoMount SWAP File dont works!

the swapon command works fine if i type in shell

======
root@OpenWrt:~# free
              total         used         free       shared      buffers
  Mem:        14324        12972         1352            0         1624
Swap:            0            0            0
Total:        14324        12972         1352
root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1728      1728         0 100% /rom
tmpfs                     7160       128      7032   2% /tmp
/dev/mtdblock/4         257404     75180    169170  31% /overlay
mini_fo:/overlay          1728      1728         0 100% /
/dev/sdcard/part1       257404     75180    169170  31% /overlay
root@OpenWrt:~# swapon /overlay/swap
root@OpenWrt:~# free
              total         used         free       shared      buffers
  Mem:        14324        12556         1768            0         1356
Swap:        63992            0        63992
Total:        78316        12556        65760
root@OpenWrt:~#
======
how it do it ?
1- dd if=/dev/zero of=/overlay/swap bs=1k count=*SIZE OF FILE*
2- mkswap /overlay/swap
3- swapon  /overlay/swap

i have others partions on SD Card but again dont work mount for it..
======
root@OpenWrt:~# cd /dev/sdcard/
root@OpenWrt:/dev/sdcard# ls -al
drwxr-xr-x    1 root     root            0 Jan  1  1970 .
drwxr-xr-x    1 root     root            0 Jan  1  1970 ..
brw-------    1 root     root     254,   0 Jan  1  1970 disc
brw-------    1 root     root     254,   1 Jan  1  1970 part1
brw-------    1 root     root     254,   2 Jan  1  1970 part2
brw-------    1 root     root     254,   3 Jan  1  1970 part3
======

Here is the dmesg http://pastebin.com/mZd5Xxug

1: Your solution should work, but the preffered solution is to mount it to some mountpoint (lets call it /mnt/extroot) and mark it as the rootfilesystem in /etc/fstab. The wiki entry for extroot explains it.
2: Looks good to me.

i dont want only to replace /overlay because gives me an error with installation of more packages ... no free space on some drive/folder

now trying to whole_rootfs [ http://wiki.openwrt.org/doc/howto/extroot ]
sdcard by default is mounted on /sdcard

LOGz will say more ::

login as: root
root@192.168.1.1's password:


BusyBox v1.15.3 (2011-10-28 22:43:32 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03.1-RC6, r28680) --------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua
  * 1/3 shot Bailey's  on the bottom, then Bailey's,
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@core:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1728      1728         0 100% /rom
tmpfs                     7160       124      7036   2% /tmp
/dev/mtdblock/4           1536       488      1048  32% /overlay
mini_fo:/overlay          1728      1728         0 100% /
/dev/sdcard/part1       958488     25480    884320   3% /sdcard
root@core:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock/4 on /overlay type jffs2 (rw)
mini_fo:/overlay on / type mini_fo (rw)
/dev/sdcard/part1 on /sdcard type ext3 (rw)
root@core:~# dd if=/dev/zero of=/sdcard/swap bs=1k count=32767
32767+0 records in
32767+0 records out
root@core:~# mkswap /sdcard/swap
Setting up swapspace version 1, size = 33549312 bytes
UUID=e01331f1-45ec-454b-ab8b-b8ee00046c01
root@core:~# free
              total         used         free       shared      buffers
  Mem:        14324        12960         1364            0          876
 Swap:            0            0            0
Total:        14324        12960         1364
root@core:~# swapon /sdcard/swap
root@core:~# free
              total         used         free       shared      buffers
  Mem:        14324        12844         1480            0          896
 Swap:        32756            0        32756
Total:        47080        12844        34236
root@core:~# reboot
root@core:~#

i put in /etc/config/fstab
config mount
option target /
option device /sdcard
option fstype ext3
option options rw,sync
option enabled 1
option enabled_fsck 0

the file system in "mount points" show me the /sdcard is filesystem of /dev/sdcard/part1

root@core:~# mkfs.ext3 /dev/sdcard/part1
mke2fs 1.41.11 (14-Mar-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
60928 inodes, 243456 blocks
12172 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=251658240
8 block groups
32768 blocks per group, 32768 fragments per group
7616 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

mkdir /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /sdcard -xvf -
umount /tmp/cproot

(Last edited by d-Byte on 22 Nov 2011, 16:09)

d-Byte wrote:

option device /sdcard

You probably want this to be /dev/sdcard/part1.
About your swap issue: http://wiki.openwrt.org/doc/uci/fstab
It's probably easiest and safest to use a swap partition instead of a file. Otherwise you would need to make sure the filesystem is mounted before the swapfile will be accessed.

The discussion might have continued from here.