OpenWrt Forum Archive

Topic: block-extroot - why do I get mount on overlay-disabled?

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

router is BT Homehub V2B - I have no flash at the moment, so want to overlay from USB so we can have permanent storage & configuration.
I'm building a trunk from a few weeks back, kernel 3.1.4
I'm building for a ramdisk, as I have no flash.

all seems well, except i always end up with the device mounted as overlay-disabled, not as overlay.
Stick is formatted as a the raw device being ext4.

I have tried just setting target to /overlay.
I have tried installing luci and configuring through the web interface, then copying the config/fstab to the build directory, and confirmed it gets into the image.

fstab is currently:

config global automount
    option from_fstab 1
    option anon_mount 1
   
config global autoswap
    option from_fstab 1
    option anon_swap 0
   
config mount
    option device    /dev/sda
    option fstype    ext4
    option options    rw,sync,noatime
    option enabled    1
    option is_rootfs 1

config swap
    option device    /dev/sda2
    option enabled    0



One thing I notice is that the USB mount is almost the last thing in the dmesg.  Is this a problem, as it's obviously processing the fstab info as it is mounting it, just on the 'failed' location?

Is there something I need to put on the stick so it's recognised as a valid overlay sitck?
What is it that decides to mount to /overlay or /tmp/overlay-disabled?
Is it possible I'm missing the overlay-fs driver - Can't see any options to enable/disable it? 

s

(Last edited by simonh on 14 Jan 2012, 12:38)

/etc/init.d/fstab overlay_enable

what does that modify?
'cos I'll need to get the config modifications into the ramdisk image that I flash smile

s

It fixes the md5sums

understood now.  so it modifies the stick itself, putting on the magic bit which makes it recognisable.
Will test as soon as I have a buildable image again; just broke everything smile.
thanks,
s

ok, tested now.  Seems nothing creates a .extroot.md5sum on my device.
overlay_enable just deletes this file (which never existed), and then asks for a reboot. 
So I assume this is meant to be created if not found on boot.

if i umount the stick, then call
/etc/init.d/fstab Start
I would hope this would attempt the mount, and it does, but still to overlay-disabled.
seems to call do_mount, which calls config_mount_by_section

From my interpretation, and my current config/ftsab (below), it looks like it needs option is_rootfs 1, but documentation says this should be unused.  (just tried with, and still no success sad )

Also, following things through, the md5checksum seems to be tested in preinit, but i'm sure usb is not up yet then?

s


config global automount
        option from_fstab 1
        option anon_mount 1

config global autoswap
        option from_fstab 1
        option anon_swap 0

config mount
        option target   /overlay
        option device   /dev/sda
        option fstype   ext4
        option options  rw,sync,noatime
        option enabled  1
        option enabled_fsck 0

config swap
        option device   /dev/sda2
        option enabled  0

latest - I think it's because the usb dwg-otg driver was a module, not in the kernel, and so usb was not available at preinit.  Just trying a complete rebuild with it in the kernel.....

still  no luck.

With dwg_otg driver in kernel, after preinit, something resets the device and kill it. 
USB device works fine if I break in at pre-init, but actual logon prompt is delayed as it tries to access the dead device.

bootlog with usb storage diagnostics below:

help!


[    3.924000] usb-storage: Status code 0; transferred 4096/4096
[    3.924000] usb-storage: -- transfer complete
[    3.924000] usb-storage: Bulk data transfer result 0x0
[    3.924000] usb-storage: Attempting to get CSW...
[    3.924000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.924000] usb-storage: Status code 0; transferred 13/13
[    3.924000] usb-storage: -- transfer complete
[    3.924000] usb-storage: Bulk status result = 0
[    3.924000] usb-storage: Bulk Status S 0x53425355 T 0xe R 0 Stat 0x0
[    3.924000] usb-storage: scsi cmd done, result=0x0
[    3.924000] usb-storage: *** thread sleeping.
[    3.924000]  sda: unknown partition table
[    3.936000] usb-storage: queuecommand_lck called
[    3.936000] usb-storage: *** thread awakened.
[    3.936000] usb-storage: Command TEST_UNIT_READY (6 bytes)
[    3.936000] usb-storage:  00 00 00 00 00 00
[    3.936000] usb-storage: Bulk Command S 0x43425355 T 0xf L 0 F 0 Trg 0 LUN 0 CL 6
[    3.936000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[    3.936000] usb-storage: Status code 0; transferred 31/31
[    3.936000] usb-storage: -- transfer complete
[    3.936000] usb-storage: Bulk command transfer result=0
[    3.936000] usb-storage: Attempting to get CSW...
[    3.936000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.936000] usb-storage: Status code 0; transferred 13/13
[    3.936000] usb-storage: -- transfer complete
[    3.936000] usb-storage: Bulk status result = 0
[    3.936000] usb-storage: Bulk Status S 0x53425355 T 0xf R 0 Stat 0x0
[    3.936000] usb-storage: scsi cmd done, result=0x0
[    3.936000] usb-storage: *** thread sleeping.
[    3.936000] usb-storage: queuecommand_lck called
[    3.936000] usb-storage: *** thread awakened.
[    3.936000] usb-storage: Command TEST_UNIT_READY (6 bytes)
[    3.936000] usb-storage:  00 00 00 00 00 00
[    3.936000] usb-storage: Bulk Command S 0x43425355 T 0x10 L 0 F 0 Trg 0 LUN 0 CL 6
[    3.936000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[    3.936000] usb-storage: Status code 0; transferred 31/31
[    3.936000] usb-storage: -- transfer complete
[    3.936000] usb-storage: Bulk command transfer result=0
[    3.936000] usb-storage: Attempting to get CSW...
[    3.936000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.936000] usb-storage: Status code 0; transferred 13/13
[    3.936000] usb-storage: -- transfer complete
[    3.936000] usb-storage: Bulk status result = 0
[    3.936000] usb-storage: Bulk Status S 0x53425355 T 0x10 R 0 Stat 0x0
[    3.936000] usb-storage: scsi cmd done, result=0x0
[    3.936000] usb-storage: *** thread sleeping.
[    3.940000] usb-storage: queuecommand_lck called
[    3.940000] usb-storage: *** thread awakened.
[    3.940000] usb-storage: Command READ_CAPACITY (10 bytes)
[    3.940000] usb-storage:  25 00 00 00 00 00 00 00 00 00
[    3.940000] usb-storage: Bulk Command S 0x43425355 T 0x11 L 8 F 128 Trg 0 LUN 0 CL 10
[    3.940000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[    3.940000] usb-storage: Status code 0; transferred 31/31
[    3.940000] usb-storage: -- transfer complete
[    3.940000] usb-storage: Bulk command transfer result=0
[    3.940000] usb-storage: usb_stor_bulk_transfer_sglist: xfer 8 bytes, 1 entries
[    3.940000] usb-storage: Status code -140; transferred 8/8
[    3.940000] usb-storage: -- short read transfer
[    3.940000] usb-storage: Bulk data transfer result 0x1
[    3.940000] usb-storage: Attempting to get CSW...
[    3.940000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.940000] usb-storage: Status code 0; transferred 13/13
[    3.940000] usb-storage: -- transfer complete
[    3.940000] usb-storage: Bulk status result = 0
[    3.940000] usb-storage: Bulk Status S 0x53425355 T 0x11 R 0 Stat 0x0
[    3.940000] usb-storage: scsi cmd done, result=0x0
[    3.940000] usb-storage: *** thread sleeping.
[    3.940000] usb-storage: queuecommand_lck called
[    3.940000] usb-storage: *** thread awakened.
[    3.940000] usb-storage: Command MODE_SENSE (6 bytes)
[    3.940000] usb-storage:  1a 00 3f 00 c0 00
[    3.940000] usb-storage: Bulk Command S 0x43425355 T 0x12 L 192 F 128 Trg 0 LUN 0 CL 6
[    3.940000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[    3.940000] usb-storage: Status code 0; transferred 31/31
[    3.940000] usb-storage: -- transfer complete
[    3.940000] usb-storage: Bulk command transfer result=0
[    3.940000] usb-storage: usb_stor_bulk_transfer_sglist: xfer 192 bytes, 1 entries
[    3.948000] usb-storage: Status code -140; transferred 12/192
[    3.948000] usb-storage: -- short read transfer
[    3.948000] usb-storage: Bulk data transfer result 0x1
[    3.948000] usb-storage: Attempting to get CSW...
[    3.948000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.948000] usb-storage: Status code 0; transferred 13/13
[    3.948000] usb-storage: -- transfer complete
[    3.948000] usb-storage: Bulk status result = 0
[    3.948000] usb-storage: Bulk Status S 0x53425355 T 0x12 R 180 Stat 0x0
[    3.948000] usb-storage: scsi cmd done, result=0x0
[    3.948000] usb-storage: *** thread sleeping.
[    3.948000] usb-storage: queuecommand_lck called
[    3.948000] usb-storage: *** thread awakened.
[    3.948000] usb-storage: Command MODE_SENSE (6 bytes)
[    3.948000] usb-storage:  1a 00 3f 00 c0 00
[    3.948000] usb-storage: Bulk Command S 0x43425355 T 0x13 L 192 F 128 Trg 0 LUN 0 CL 6
[    3.948000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[    3.948000] usb-storage: Status code 0; transferred 31/31
[    3.948000] usb-storage: -- transfer complete
[    3.948000] usb-storage: Bulk command transfer result=0
[    3.948000] usb-storage: usb_stor_bulk_transfer_sglist: xfer 192 bytes, 1 entries
[    3.948000] usb-storage: Status code -140; transferred 12/192
[    3.948000] usb-storage: -- short read transfer
[    3.948000] usb-storage: Bulk data transfer result 0x1
[    3.948000] usb-storage: Attempting to get CSW...
[    3.948000] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[    3.948000] usb-storage: Status code 0; transferred 13/13
[    3.948000] usb-storage: -- transfer complete
[    3.948000] usb-storage: Bulk status result = 0
[    3.948000] usb-storage: Bulk Status S 0x53425355 T 0x13 R 180 Stat 0x0
[    3.948000] usb-storage: scsi cmd done, result=0x0
[    3.948000] usb-storage: *** thread sleeping.
[    3.948000] sd 0:0:0:0: [sda] No Caching mode page present
[    3.952000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.960000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    7.800000] lib80211: exports duplicate symbol lib80211_crypt_delayed_deinit (owned by kernel)
[    7.832000] lib80211_crypt: registered algorithm 'WEP'
[    7.860000] lib80211_crypt: registered algorithm 'CCMP'
[    7.888000] lib80211_crypt: registered algorithm 'TKIP'
[    7.916000] IFXOS, Version 1.5.14 (c) Copyright 2009, Lantiq Deutschland GmbH
[    7.916000]
[    7.948000] Compat-wireless backport release: compat-wireless-2011-11-29
[    7.956000] Backport based on wireless-testing.git master-2011-12-01
[    8.000000] device class 'ieee80211': registering
[    8.004000] Registering platform device 'regulatory.0'. Parent at platform
[    8.004000] device: 'regulatory.0': device_add
[    8.004000] bus: 'platform': add device regulatory.0
[    8.008000] cfg80211: Calling CRDA to update world regulatory domain
[    8.192000] Lantiq TAPI device driver, version 3.13.0.2, (c) 2001-2010 Lantiq Deutschland GmbH
[    8.208000] cfg80211: World regulatory domain updated:
[    8.212000] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    8.220000] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.228000] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.236000] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.244000] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.252000] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.352000] Lantiq MIPS24KEc MPS driver, version 2.2.2.5, (c) 2006-2010 Lantiq Deutschland GmbH
[    8.360000] request_timer(3, 0x000001AE, 1)...successful!
[    8.364000] Lantiq VMMC device driver, version 1.9.0.3, (c) 2006-2010 Lantiq Deutschland GmbH
[    8.780000] Lantiq KPI2UDP driver, version 2.2.0.0, (c) 2008-2010 Lantiq Deutschland GmbH
[    8.824000] bus: 'pci': add driver ath5k
[    8.944000] bus: 'pci': add driver ath9k
[    8.980000] NET: Registered protocol family 8
[    8.980000] NET: Registered protocol family 20
[    8.984000] device class 'atm': registering
[    9.044000] Button Hotplug driver version 0.4.1
[    9.152000] PPP generic driver version 2.4.2
[    9.156000] device class 'ppp': registering
[    9.156000] device: 'ppp': device_add
[    9.300000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.604000] NET: Registered protocol family 24
[    9.672000] nf_conntrack version 0.5.0 (959 buckets, 3836 max)
[   10.120000] IFX MEI Version 5.00.00
[   10.124000] device class 'ifx_mei': registering
[   10.124000] device: 'ifx_mei': device_add
[   10.164000]
[   10.164000]
[   10.164000] Infineon CPE API Driver version: DSL CPE API V3.24.4.4
[   10.168000] device class 'dsl_cpe_api': registering
[   10.168000] device: 'dsl_cpe_api': device_add
[   10.208000] device: 'ifxmips_atm0': device_add
[   10.208000] device: 'ifxmips_atm1': device_add
[   10.208000]     ATM (A1) firmware version 1.0.19
[   10.212000] ifxmips_atm: ATM init succeed
[   10.240000] bus: 'platform': add driver gpio-keys-polled
[   10.240000] bus: 'platform': driver_probe_device: matched device gpio-keys-polled with driver gpio-key s-polled
[   10.240000] bus: 'platform': really_probe: probing driver gpio-keys-polled with device gpio-keys-polle d
[   10.240000] device: 'input0': device_add
[   10.240000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[   10.248000] device: 'event0': device_add
[   10.248000] driver: 'gpio-keys-polled': driver_bound: bound to device 'gpio-keys-polled'
[   10.248000] bus: 'platform': really_probe: bound device gpio-keys-polled to driver gpio-keys-polled
[   10.276000] device class 'scsi_generic': registering
[   10.276000] device: 'sg0': device_add
[   10.276000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   10.308000] fuse init (API version 7.17)
[   10.312000] device: 'fuse': device_add
[   11.996000] device: 'br-lan': device_add
[   12.136000] device eth0 entered promiscuous mode
[   12.228000] br-lan: port 1(eth0) entering forwarding state
[   12.232000] br-lan: port 1(eth0) entering forwarding state
[   12.784000] usb-storage: queuecommand_lck called
[   12.784000] usb-storage: *** thread awakened.
[   12.784000] usb-storage: Command TEST_UNIT_READY (6 bytes)
[   12.784000] usb-storage:  00 00 00 00 00 00
[   12.784000] usb-storage: Bulk Command S 0x43425355 T 0x14 L 0 F 0 Trg 0 LUN 0 CL 6
[   12.784000] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[   23.516000] Trying 100/FULL
[   42.848000] usb-storage: command_abort called
[   42.848000] usb-storage: usb_stor_stop_transport called
[   42.848000] usb-storage: -- cancelling URB
[   42.848000] usb-storage: Status code -131; transferred 0/31
[   42.848000] usb-storage: -- transfer cancelled
[   42.848000] usb-storage: Bulk command transfer result=4
[   42.848000] usb-storage: -- command was aborted
[   42.848000] usb-storage: usb_stor_pre_reset
[   43.020000] usb 1-1: reset high speed USB device number 2 using dwc_otg
[   58.196000] usb 1-1: device descriptor read/64, error -145
[   73.476000] usb 1-1: device descriptor read/64, error -145
[   76.852000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   80.124000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   83.396000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   83.400000] usb-storage: usb_stor_post_reset
[   83.400000] usb-storage: usb_reset_device returns -19
[   83.400000] usb-storage: usb_stor_Bulk_reset called
[   83.400000] usb-storage: usb_stor_control_msg: rq=ff rqtype=21 value=0000 index=00 len=0
[   83.400000] usb-storage: Soft reset failed: -19
[   83.400000] usb-storage: scsi command aborted
[   83.400000] usb-storage: *** thread sleeping.
[   83.400000] usb 1-1: USB disconnect, device number 2
[   83.404000] device: 'ep_81': device_unregister
[   83.404000] device: 'ep_02': device_unregister
[   83.404000] device: 'ep_83': device_unregister
[   83.404000] bus: 'usb': remove device 1-1:1.0
[   83.404000] usb-storage: storage_disconnect() called
[   83.404000] device: '0:0:0:0': device_unregister
[   83.404000] device: 'sg0': device_unregister
[   83.408000] device: 'sg0': device_create_release
[   83.408000] bus: 'scsi': remove device 0:0:0:0
[   83.408000] usb-storage: queuecommand_lck called
[   83.408000] usb-storage: Fail command during disconnect
[   83.408000] usb-storage: device_reset called
[   83.408000] usb-storage: usb_stor_Bulk_reset called
[   83.408000] usb-storage: No reset during disconnect
[   83.408000] usb-storage: bus_reset called
[   83.408000] usb-storage: unable to lock device for reset: -19
[   83.408000] sd 0:0:0:0: Device offlined - not ready after error recovery
[   83.420000] usb-storage: queuecommand_lck called
[   83.420000] usb-storage: Fail command during disconnect
[   83.424000] usb-storage: queuecommand_lck called
[   83.424000] usb-storage: Fail command during disconnect
[   83.424000] usb-storage: queuecommand_lck called
[   83.424000] usb-storage: Fail command during disconnect
[   83.424000] device: '8:0': device_unregister
[   83.424000] device: '8:0': device_create_release
[   83.424000] scsi: killing requests for dead queue
[   83.428000] bus: 'scsi': remove device target0:0:0
[   83.428000] device: 'host0': device_unregister
[   83.428000] bus: 'scsi': remove device host0
[   83.428000] usb-storage: -- usb_stor_release_resources
[   83.428000] usb-storage: -- sending exit command to thread
[   83.432000] usb-storage: *** thread awakened.
[   83.432000] usb-storage: -- exiting
[   83.448000] usb-storage: -- dissociate_dev
[   83.452000] device: 'ep_00': device_unregister
[   83.452000] bus: 'usb': remove device 1-1
[   86.848000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   89.804000] device: 'nas0': device_add
[   90.120000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   93.392000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   96.664000] hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
[   96.668000] hub 1-0:1.0: unable to enumerate USB device on port 1
root@OpenWrt:/#

(Last edited by simonh on 14 Jan 2012, 19:18)

The discussion might have continued from here.