OpenWrt Forum Archive

Topic: how to use the new block-mount ?

The content of this topic has been archived between 19 Jun 2015 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Crazy wrote:

With option delay_root '35' works!!

is that HDD or USB stick?

usb stick without hub
note that only option target '/overlay' works, if I use option target '/' router don't boot.
Test with 1043ND v1.8, 2 MR3220 v1, MR3420 and DIR-505 A1

(Last edited by Crazy on 27 Jan 2014, 19:35)

This is probably Old News, the fix for me with TL-WR1043ND v2 was to add option delay_root  '1' to fstab.

According to: http://patchwork.openwrt.org/patch/3785/ "This option defines how long mount_root should wait (in seconds) for an external storage to show up."

Unfortunately the extra time used to wait for the USB device appears to have unintended consequences for the rest of the system startup. Specifically I am running bind, and for whatever reason it runs before my network devices are completely up when I enable 'delay_root' in fstab. The router would boot, but name resolution was broken for the network until I restarted the 'named' service.

Out of curiosity I added a service that simply waits the amount of time that I defined in fstab. I called the service 'delay_root', and enabled it like any other (`delay_root enable`). I set its Startup Sequence so that it would run right after the fstab service. Its low tech but worked for me. Perhaps the delay_root command should do something similar behind the scenes when mounting the device.

Here is my config:
cat /etc/init.d/delay_root

#!/bin/sh /etc/rc.common
START=41

# grep delay_root  /etc/config/fstab
DELAY_ROOT=1

start() {
  echo Waiting for $DELAY_ROOT seconds
  /bin/sleep $DELAY_ROOT
}

cat /etc/config/fstab

config global
        option anon_swap '0'
        option anon_mount '0'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '1'
        option check_fs '0'

config mount
        option target '/overlay'
        option uuid 'a1720a8b-8995-4e83-8518-320926904720'
        option enabled '1'

cat /proc/cpuinfo

system type             : Qualcomm Atheros QCA9558 rev 0
machine                 : TP-LINK TL-WR1043ND v2
processor               : 0
cpu model               : MIPS 74Kc V5.0
BogoMIPS                : 358.80
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp dsp2
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

BusyBox v1.19.4 (2014-05-02 11:28:58 UTC) 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
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r40652)

(Last edited by cfairman on 5 May 2014, 01:26)

Does block-mount depend on /etc/fstab file? The reason I asked is my Seagate Dockstar has the /etc/fstab linked to /tmp/fstab. However, there is no /tmp/fstab, except /etc/config/fstab file, yet free utility reports a swap file being used.

[dockstar@DockStar:/home/local/users/dockstar 3%] ~ free
             total       used       free     shared    buffers     cached
Mem:        125068     121732       3336          0        892      87356
-/+ buffers/cache:      33484      91584
Swap:       216872       7104     209768
cfairman wrote:

Perhaps the delay_root command should do something similar behind the scenes when mounting the device.

You can set the delay_root option in fstab to values greater than 1, e.g. 5 or 10 seconds.
Some USB drives need a good amount of time to get ready for use.

extroot not mounting on cold boot, but mounts after reboot

option delay_root is '30'

what it could be?

Hi everyone,

Currently testing BARRIER BREAKER (14.07-rc3, r42056) and block-mount (installed through opkg) definitely not working on my WNDR3700v4. Is the problem described in this topic supposed to be fixed in 14.07 RC3? I followed wiki's instructions and advices found here but I cannot get overlay to work although my USB key is recognized and I can mount it manually. Thx in advance fo the help.

(Last edited by Meaulnes on 31 Aug 2014, 23:48)

all this worked so nice on attitude adjustment.
with 14.07-rc3 all this is big pile of sh*t.
why change something that is working well?

after reboot usb is mounted to /mnt/sda1 not where i want.
How to solve this?

(Last edited by andjelko.conar on 10 Sep 2014, 10:29)

Is there information on using the new ubox and block commands to create a pivot NFS mount at boot time? It seems I cannot create a persistent NFS mount on boot time at all using /etc/config/fstab and the block detect command doesn't provide any useful output for NFS mounts.

Hi,  I've read all the suggestions in this thread and what seems to be the corresponding ticket at https://dev.openwrt.org/ticket/13763 and I can't for the life of me get pivot_overlay or pivot_root mounting to work for me.

I'm using the latest build: OpenWrt Chaos Calmer r42659 on a netgear wndr-3700v4 usb storage support is installed and if I specify a target mount point in /etc/config/fstab to something that isn't '/' or '/overlay' the drive gets mounted ok.

# /etc/config/fstab
config 'global'
    option    anon_swap    '0'
    option    anon_mount    '0'
    option    auto_swap    '1'
    option    auto_mount    '1'
    option    delay_root    '30'
    option    check_fs    '0'

config 'mount'
    option    target    '/'
    option    uuid    'b474dd0a-8d61-45d9-a0f5-7309615d47d6'
    option  enabled    '1'

I'm new to developing with openwrt and C but not to programming in general.  Unfortuanately I don't have a the hardware handy to do serial port debugging but I managed to download and cross compile the fstools package containing the block.c sources.

To debug things, I added a bunch of syslog() calls throughout the file, compiled and uploaded to the router.

I've been getting suspicious messages such as:

[ 1216.440000] end_request: I/O error, dev mtdblock0, sector 48
[ 1216.440000] Buffer I/O error on device mtdblock0, logical block 6

In syslog so I wondered if the block binary was segfaulting or something.  The debug code I added proves this is not the case as the program exits normally.

I think I have two problems here - first the main_extroot() method is never caled on a normal boot as its messages don't show up in syslog.  It looks like logread gives me everthing since the system was booted.  Second if I ssh to the router and do

export PREINIT=1

, then run:

block extroot

the program fails with: 

user.err syslog: extroot: unable to locate rootfs mtdblock

Looking at block.c, I can see this being generated because a call to find_block_mtd() is failing.  The debug code I added shows the function was called like this:

find_block_mtd(rootfs,,32)

The code shows this function does a hardcoded lookup for the first value on

/proc/mtd

but it never matches 'rootfs'- in my file I have:

dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 01700000 00020000 "ubi"
mtd9: 01900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"
mtd11: 06000000 00020000 "reserved"

The router uses a ubifs partition for /overlay and my mount table looks like this:

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime

I'm continuing to investigate this but if anyone has any suggestions of things to try I'd be really interested - thanks

(Last edited by geoffw on 27 Sep 2014, 04:43)

none of the boot scripts seem to reference

block extroot

, instead mount_root seems to be the entry point into the system and it calls the equivalent of "block extroot" via an extern defined in libfstools.h - at least thats what I make of it from my beginners understanding of C.

It looks like fixing block.c is the way to go for this one - I'll report back if I get something working

(Last edited by geoffw on 27 Sep 2014, 08:00)

I seem to have fixed it  - at least if your ubifs is mounted from /dev/ubiblock0_0 and you want to use pivot_root  big_smile

I added my new block executable to the router's overlay partition and added:

export PREINIT=1
mount_root

to/etc/rc.local.  Nothing gets triggered if I don't do this.

root@router:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom/rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime)
overlayfs:/overlay on /rom type overlayfs (ro,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on / type ext4 (rw,relatime,data=ordered)

root@router:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    1.8T     78.0M      1.7T   0% /
/dev/root                 2.0M      2.0M         0 100% /rom/rom
tmpfs                    61.5M     80.0K     61.4M   0% /tmp
/dev/ubi0_1              14.2M      2.2M     11.3M  16% /overlay
overlayfs:/overlay       14.2M      2.2M     11.3M  16% /rom
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1                 1.8T     78.0M      1.7T   0% /

I added a new function to block.c to try mounting as ubifs if the mtdblock device for rootfs doesn't exist.  I'm not sure I've fixed things in a reliable way (I hard coded /dev/ubiblock0_0 as I wasn't sure how to look it up) but it works for me at least.

Patch is here: https://gist.github.com/GeoffWilliams/e … 8a9f084ae5

I'm a bit confused about how to submit patches/communicate with the developers for this part of the project.  The git repository I checked out from is at git://nbd.name/fstools.git.  I had a look at the contribution guidelines at https://dev.openwrt.org/wiki/SubmittingPatches and it mentions the quilt tool but this looks like it applies a patch to upstream rather then fixing the problem at source?

In any case, I think this code needs to be looked at by someone more knowledgeable before merging it - could an openwrt developer look at this please?

The old code was failing for me because of the check for

find_block_mtd("rootfs", fs, sizeof(fs));

which looks up the mtdblock device in /proc/mtd.  On my ubifs based router this caused the program to exit so I wrote and called a new function find_block_ubi() if the first lookup fails.  I couldn't see an easy way of matching ubifs devices to names like we have with /proc/mtd so I just hardcoded something to get myself up and running.  Happy to discuss futher/refine if anyone has pointers for me (new topic?).

If anyone wants a copy of my cross-compiled block binary PM me.

- cheers!

(Last edited by geoffw on 27 Sep 2014, 13:43)

I'm really stuck getting extroot to work on a TPLINK 1043ND and a TP-LINK WDR4300.
They both worked fine with extroot on BB RC3 - so I upgraded today to final version of BB and I can't get extroot back to working. I tried serveral configurations, set the option delay_root to several values (1,2,3,4,5,10,15,20,30,50,120,etc).

The fstab itself works, when I mount the /dev/sda1 to /mnt/sda1; but when I try to target it to /overlay it doesnt work - /dev/mtdblock3 keeps getting mounted.

Current Configuration is:

config global
    option delay_root '6'

config global 'automount'
    option from_fstab '1'
    option anon_mount '0'

config global 'autoswap'
    option from_fstab '1'
    option anon_swap '0'

config mount
    option target '/overlay'
    option fstype 'ext4'
    option device '/dev/sda1'
    option options 'rw,sync'
    option is_rootfs '1'
    option uuid '###'
    option enabled '1'
    option enabled_fsck '1'

config swap
    option uuid '###'
    option enabled '1'

Please note that I tried serveral configurations (even a blank one with block detect) and that this configuration worked fine on RC3. I really dont have a clue what was changed in the final version, but there must have went something wrong.
Another big problem is, that there is nearly no way to debug extroot mounting. I don't see any logs that would help. Dmesg output doesn't help me either:

...
[    1.260000] 8021q: 802.1Q VLAN Support v1.8
[    1.280000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.280000] Freeing unused kernel memory: 272K (8034c000 - 80390000)
[    4.130000] usbcore: registered new interface driver usbfs
[    4.140000] usbcore: registered new interface driver hub
[    4.140000] usbcore: registered new device driver usb
[    4.150000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.160000] ehci-platform: EHCI generic platform driver
[    4.170000] ehci-platform ehci-platform: EHCI Host Controller
[    4.170000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.180000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.210000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.210000] hub 1-0:1.0: USB hub found
[    4.220000] hub 1-0:1.0: 1 port detected
[    4.540000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.640000] ar71xx: pll_reg 0xb8050014: 0x1a000000
[    4.640000] eth0: link up (1000Mbps/Full duplex)
[    8.070000] jffs2: notice: (333) jffs2_build_xattr_subsystem: complete building xattr subsystem, 20 of xdatum (1 unchecked, 19 orphan) and 33 of xref (0 dead, 19 orphan) found.
[    8.940000] SCSI subsystem initialized
[    8.950000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    8.960000] uhci_hcd: USB Universal Host Controller Interface driver
[    8.970000] usb-storage 1-1:1.0: USB Mass Storage device detected
[    8.980000] scsi0 : usb-storage 1-1:1.0
[    8.990000] usbcore: registered new interface driver usb-storage
[    9.990000] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Fit       1.27 PQ: 0 ANSI: 6
[   10.000000] sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[   10.010000] sd 0:0:0:0: [sda] Write Protect is off
[   10.010000] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[   10.010000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.030000]  sda: sda1 sda2
[   10.030000] sd 0:0:0:0: [sda] Attached SCSI disk
[   14.340000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:
[   14.400000] eth0: link down
[   16.880000] NET: Registered protocol family 10
[   16.900000] nf_conntrack version 0.5.0 (450 buckets, 1800 max)
[   16.910000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.930000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   16.940000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[   16.950000] Backport generated by backports.git backports-20140320-37-g5c33da0
...

It seems that the system thinks that the extroot is mounted properly ([   14.340000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:), but it isnt:

# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    4.6M      1.8M      2.8M  39% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.1M     56.0K     14.0M   0% /tmp
/dev/mtdblock3            4.6M      1.8M      2.8M  39% /overlay
overlayfs:/overlay        4.6M      1.8M      2.8M  39% /
tmpfs                   512.0K         0    512.0K   0% /dev

On another TP-Link 1043ND I got it working but I dont know how I did it. I was lost like with these two devices and all of a sudden it worked. I also tried creating the /etc/.extroot-uuid manually, but it also doesn't help.

I noticed that when extroot fails to load I get some strange folders ("extroot", "overlay") in /tmp which aren't there on a working extroot system:

#dir /tmp
TZ           dnsmasq.d  extroot  lock  overlay      resolv.conf.auto  state
dhcp.leases  etc        hosts    log   resolv.conf  run               sysinfo

Btw: The swap paritition gets mounted properly every time.

Any clue? sad

(Last edited by theliquid on 13 Oct 2014, 20:54)

after days of reading und trying, thats my results:

BusyBox v1.22.1 (2014-10-21 05:15:05 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
 -----------------------------------------------------
 CHAOS CALMER (Bleeding Edge, r43006)

Configuration:

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '1'
        option  check_fs        '0'

config 'swap'
        option  uuid    '14dcc0cf-c67d-41e9-ac5f-9f6c2979a818'
        option  enabled '1'

config 'mount'
        option  target  '/overlay'
        option  uuid    'a03ef3b1-8368-4393-96b3-c44511114e89'
        option  enabled '1'

logread:

Tue Oct 21 10:14:45 2014 kern.notice kernel: [   57.790000] sd 1:0:0:0: [sda] 31074304 512-byte logical blocks: (15.9 GB/14.8 GiB)
Tue Oct 21 10:14:45 2014 kern.notice kernel: [   57.850000] sd 1:0:0:0: [sda] Write Protect is off
Tue Oct 21 10:14:45 2014 kern.debug kernel: [   57.850000] sd 1:0:0:0: [sda] Mode Sense: 0f 0e 00 00
Tue Oct 21 10:14:45 2014 kern.notice kernel: [   57.860000] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Tue Oct 21 10:14:45 2014 kern.info kernel: [   57.920000]  sda: sda1 sda2
Tue Oct 21 10:14:45 2014 kern.notice kernel: [   57.930000] sd 1:0:0:0: [sda] Attached SCSI removable disk
Tue Oct 21 10:14:45 2014 kern.info kernel: [   58.330000] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: 
Tue Oct 21 10:14:47 2014 kern.info kernel: [   60.070000] Adding 1048572k swap on /dev/sda1.  Priority:-1 extents:1 across:1048572k 
Tue Oct 21 10:14:47 2014 user.err syslog: /dev/sda2 is already mounted

and this ist the result:

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   13.5G     46.3M     12.7G   0% /
/dev/root                 2.0M      2.0M         0 100% /rom/rom
tmpfs                    14.1M     60.0K     14.0M   0% /tmp
/dev/mtdblock3          960.0K    708.0K    252.0K  74% /overlay
overlayfs:/overlay      960.0K    708.0K    252.0K  74% /rom
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda2                13.5G     46.3M     12.7G   0% /

especialy:
/dev/root                 2.0M      2.0M         0 100% /rom/rom
/dev/mtdblock3          960.0K    708.0K    252.0K  74% /overlay
overlayfs:/overlay      960.0K    708.0K    252.0K  74% /rom

whats wrong?

matze1999

(Last edited by matze1999 on 21 Oct 2014, 13:28)

@theliquid

I'm really stuck getting extroot to work on a TPLINK 1043ND and a TP-LINK WDR4300.

Iam working here with an WDR4300:

root@OpenWrt:~# cat /etc/config/fstab

config global
        option anon_swap '0'
        option anon_mount '0'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '5'
        option check_fs '0'

config mount
        option uuid '7fe94dfe-0ba8-44a7-ac1e-a65391d951aa'
        option enabled '1'
        option device '/dev/sda1'
        option fstype 'ext4'
        option is_rootfs '1'
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    3.5G    520.1M      2.8G  15% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    61.7M    576.0K     61.1M   1% /tmp
/dev/sda1                 3.5G    520.1M      2.8G  15% /overlay
overlayfs:/overlay        3.5G    520.1M      2.8G  15% /
tmpfs                   512.0K     52.0K    460.0K  10% /dev

Hello,

Unfortunately I have not much to add to the TL 1043nd problem, only that my hardware version is 1.1
It's my 4th day trying to install extroot, config:

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '3'
        option  check_fs        '0'

config 'mount'
        option  target  '/overlay'
        option  device  '/dev/sda1'
        option  fstype  'ext4'
        option  enabled '1'
        option  is_rootfs '1'

config 'mount'
        option  target  '/mnt/sda2'
        option  uuid    '32f7e9b7-5fdc-4f78-8969-2ac90f32e601'
        option  enabled '1'

Tried several variations, with device, UUID, is_rootfs etc, no luck.

Does anyone advise to get a nightly build or something?

BARRIER BREAKER (Barrier Breaker, r42961)
Tp link 1043 nd v2.

I have also the problem with auto mount fail to work.

I attach a usb 2.5 ext4 formatted drive and openwrt recognizes as sda1.


Sat Dec 13 10:28:16 2014 kern.info kernel: usb 1-1: new high-speed USB device number 4 using ehci-platform
Sat Dec 13 10:28:17 2014 kern.info kernel: usb-storage 1-1:1.0: USB Mass Storage device detected
Sat Dec 13 10:28:17 2014 kern.info kernel: scsi2 : usb-storage 1-1:1.0
Sat Dec 13 10:28:18 2014 kern.notice kernel: scsi 2:0:0:0: Direct-Access     TOSHIBA  MK1031GAS             PQ: 0 ANSI: 2 CCS
Sat Dec 13 10:28:18 2014 kern.notice kernel: sd 2:0:0:0: [sda] 195371568 512-byte logical blocks: (100 GB/93.1 GiB)
Sat Dec 13 10:28:18 2014 kern.notice kernel: sd 2:0:0:0: [sda] Write Protect is off
Sat Dec 13 10:28:18 2014 kern.debug kernel: sd 2:0:0:0: [sda] Mode Sense: 28 00 00 00
Sat Dec 13 10:28:18 2014 kern.err kernel: sd 2:0:0:0: [sda] No Caching mode page found
Sat Dec 13 10:28:18 2014 kern.err kernel: sd 2:0:0:0: [sda] Assuming drive cache: write through
Sat Dec 13 10:28:18 2014 kern.info kernel:  sda: sda1
Sat Dec 13 10:28:18 2014 kern.notice kernel: sd 2:0:0:0: [sda] Attached SCSI disk


When i run block-detect it gives me only a swap configuration

root@OpenWrt:~# block detect
config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'swap'
        option  uuid    '28dd2ecd-7681-4ebd-a75c-55b7b7558263'
        option  enabled '0'

trying to manual edit the mount config doesnt help and i can enable the mount.
this is the error from system log

Sat Dec 13 10:59:24 2014 user.err syslog: /dev/mtdblock3 is already mounted

has anyone a clue about this?
thanks


Disk /dev/sda: 93.2 GiB, 100030242816 bytes, 195371568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xeb33eb33

Device    Boot Start       End   Blocks  Id System
/dev/sda1       2048 195371567 97684760  83 Linux

(Last edited by kartheo on 13 Dec 2014, 09:58)

Did you try to mount it manually?

opkg update
opkg install kmod-usb-storage block-mount kmod-fs-ext4 kmod-usb2 kmod-usb-core

I have a 1st gen 1043ND. I can not get extroot working at all. I have read every post in this thread and I've tried everything.

Important details, this was all done on device

1) I zero'd the disk with dd if=/dev/zero of=/dev/sda
2) I setup a new GPT partition type
3) I made a partition sda1 the size of the disk (750GB)
4) I made a ext4 file system on it
5) It mounts fine as /dev/sda1 under /mnt/sda1
6) /etc/init.d/fstab enable is done
7) I tried delay_root up to 60 seconds without joy
8) I added 4e5e2bb7-c161-43fc-b4e1-560fdec739a2 to /etc/.extroot-uuid

root@firewall:/etc/config# cat /etc/openwrt_release 
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="14.07"
DISTRIB_REVISION="r42625"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker 14.07"
DISTRIB_TAINTS=""

root@firewall:/etc/config# block info
/dev/mtdblock2: UUID="215b9a87-be150340-43cef433-ed9e3dde" VERSION="4.0" TYPE="squashfs"
/dev/mtdblock3: TYPE="jffs2"
/dev/sda1: UUID="4e5e2bb7-c161-43fc-b4e1-560fdec739a2" NAME="EXT_JOURNAL" VERSION="1.0" TYPE="ext4"

root@firewall:/etc/config# block detect
config 'global'
    option    anon_swap    '0'
    option    anon_mount    '0'
    option    auto_swap    '1'
    option    auto_mount    '1'
    option    delay_root    '5'
    option    check_fs    '0'

config 'mount'
    option    target    '/mnt/sda1'
    option    uuid    '4e5e2bb7-c161-43fc-b4e1-560fdec739a2'
    option    enabled    '0'

I have tried all kinds of /etc/config/fstab setups

1) with is_rootfs & without that
2) with target 'overlay'
3) with target '/overlay'
4) with target '/'

With /overlay it wont boot (USB LED DOES come on, but the system never gets to the point where I can use the wireless)
With target=/ it wont boot. (USB LED never switches on- is this happening because target = / is basically a pivot_root, not an overlay, and you need a fully populated file system on /dev/sda1?)

With target=overlay it DOES boot and:

Filesystem                Size      Used Available Use% Mounted on
rootfs                    4.6M      3.3M      1.4M  70% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.1M     80.0K     14.0M   1% /tmp
/dev/mtdblock3          687.7G     69.0M    652.7G   0% /overlay
overlayfs:/overlay        4.6M      3.3M      1.4M  70% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1               687.7G     69.0M    652.7G   0% /overlay

The only thing that seems to have possibly yielded results is , upon login, setting PREINIT=1 and calling mount_root which worked and gave / as having 700GB. I am reluctant to do this and just put it in /etc/rc.local because I know it's not "right" and might cause me problems. I do expect to load kernel modules upon boot, and though most of them are installed in flash already, I might eventually want to call ones that are on the disk

This is driving me nuts.

(Last edited by trickstarter on 22 Mar 2015, 00:04)

Is it because it's a gpt partition? Or ext4 is loaded as a module and the root overlay attempt is before that module is loaded?

EDIT: Nope. Moved it to ext2. No difference. Made a smaller partition (4gb) No difference. Ditched GPT paritions, no change. Sigh.

EDIT2: Hm. Does the ext4 module handle the ext2 fs type? maybe it's the same problem.

(Last edited by trickstarter on 22 Mar 2015, 01:00)

CC 15.05 RC2
I have installed USB and found that if I set an EXT3 partion to use an EXT3 file system when using kmod-fs-ext4 that it did not work,  I had to use a file system of EXT4 with and EXT3 formatted drive.

I installed USB and can get a USB EXT3 formatted drive running, but not an NTFS drive with NTFS-3g. 

Is this relevant?
Can someone explain what this is telling me?
I got the following when I installed block-mount.

Installing block-mount (2015-05-24-09027fc86babc3986027a0e677aca1b6999a9e14) to root...
Downloading http://downloads.openwrt.org/chaos_calm … 4_x86.ipk.
this file has been obseleted. please call "/sbin/block mount" directly
Configuring block-mount.

the information seems contradictory. 
How do I "call" /sbin/block mount? 
It seems like if the module is obsolete. Should it be removed? 
The wiki on Block Mount appears out of date.
http://wiki.openwrt.org/doc/techref/block_mount

Traditionally, all the automounting went through fstab (configuration in /etc/fstab, control script in /etc/init.d/fstab). This has been replaced by /sbin/mount. So the message you get usually appears, if fstab is still being accessed.

Thanks for your explanation

I have /etc/config/fstab and it contains all the info about the devices the system or I have tried to mount via LuCi.  In /etc there is what appears to be a shortcut called fstab that I can not access.  (using WINSCP)

If I look at /etc/init.d/fstab I see some text indicating it has been replaced with sbin/mount. 

If I go to sbin the only files with mount in it are mount.ntfs-3g, mtd and mount_root.  (Indeed my whole issue started trying to get the ntfs.3g package running for USB)

Does this mean I am missing a package 'mount' (mount-utils or mountd)?

RC 15.05 RC2 Geode

RangerZ

Sorry, my bad. I meant /sbin/block.  So far you should be fine. I could not really follow the exact problem you are facing. Please explain more detailed what you want to achieve, what you already tried and where you failed.

The discussion might have continued from here.