Problem in new device mounts

  • There is a strange problem in new device mounts.


    On boot I get an error in mount of an USB stick


    [

    Code
    4294681.749000] 2331 ms: 29 Starting /etc/rcS.d/S03udev... 
    
    
    
    
    [4294681.761000] 12 ms: =s [4294681.800000] 38 ms: 31 Starting /etc/rcS.d/S04bootup... [4294681.827000] 26 ms: 10 mount: mounting /dev/disk/by-uuid/3D84-96AB on /media/U3CruzerMicro failed: No such device [4294682.333000] 505 ms: 12 [4294682.371000] 38 ms: 14 [4294682.417000] 46 ms: 15 [4294682.444000] 27 ms: 16 [4294682.470000] 26 ms: 17 [4294682.543000] input: dreambox remote control (native) as /class/input/input0 [4294682.545000] input: dreambox advanced remote control (native) as /class/input/input1 [4294682.556000] input: dreambox ir keyboard as /class/input/input2 [4294682.557000] input: dreambox ir mouse as /class/input/input3 [4294684.143000] enter base init, xvd 20100413, vdc 20100413, rap 20100719, xpt 20100825 [4294684.626000] 17:330011000 SMCA: controller reset timed out [4294684.636000] 17:340009000 SMCB: controller reset timed out [4294685.393000] register adapter [4294685.393000] register adapter [4294685.394000] register adapter [4294685.395000] register adapter [4294685.395000] register adapter [4294685.400000] FP Version 3 [4294685.409000] input: dreambox front panel as /class/input/input4 [4294685.427000] HDMI: no device attached [4294685.427000] set sb to 3(2) [4294685.428000] set fb to 2(-1) [4294685.428000] set input to 0 [4294685.429000] set fb to 2(-1) [4294685.434000] bcm_video_analog_port_setup (fmt=7) [4294685.434000] SET FORMAT: display[1], format=7 [4294685.435000] display 0 uses vbi path 1 [4294685.436000] display 1 uses vbi path 0 [4294685.437000] HDMI: hotplug handler! [4294685.437000] HDMI: no device attached [4294685.438000] using 50.00Hz as MonitorRefreshRate [4294685.438000] SET FORMAT: display[0], format=37 [4294685.439000] set fb to 2(0) [4294685.439000] bcm_video_analog_port_setup (fmt=7) [4294685.440000] SET FORMAT: display[1], format=7 [4294685.443000] keys 81 [4294685.482000] disable wss on display 0 [4294685.482000] disable wss on display 1 [4294685.483000] bcmfb: original 720x576-32 (720x576) RGB 000 [ 0 0 0 0] [4294685.483000] bcmfb: modified 720x576-32 (720x576) RGB 888 [ 0 16 8 0] [4294685.484000] bcmfb: creating surface with pixel format 0x06e48888 (BPXL_eX8_R8_G8_B8) udevd-event[386]: node_symlink: rename(/dev/fb.udev-tmp, /dev/fb) failed: Is a directory


    I have a script invoked by an etc/rc3.d entry (S25bootmount) to mount swap file if exist but of course it fail due to mount failure.


    I run some python code inside mytest.py to try to activate the swap file and it works


    Code
    Enigma2 is property of Dream Multimedia GmbH. All copyrights with regard to Enigma2 belong to Dream Multimedia GmbH only. The full license text is available at /usr/share/doc/enigma2/LICENSE. PYTHONPATH: /usr/lib/enigma2/python + (1) Background File Eraser + (8) graphics acceleration manager + (9) GFBDC 16384k video mem [4294717.602000] bcmfb: enable manual blit [4294717.615000] bcmfb: creating surface with pixel format 0x07e48888 (BPXL_eA8_R8_G8_B8) - double buffering available! 13144kB available for acceleration surfaces. resolution: 720 x 576 x 32 (stride: 2880) + (9) gLCDDC found OLED display! lcd buffer 0x6bb820 12288 bytes, stride 192 + (9) Font Render Class [FONT] initializing lib... [FONT] loading fonts... [FONT] Intializing font cache, using max. 4MB... + (10) gRC RC thread created successfully + (15) eWindowStyleManager + (20) DVB-CI UI + (20) UHF Modulator couldnt open /dev/rfmod0!!!! + (20) RC Input layer + (20) misc options + (20) AVSwitch Driver couldnt open /dev/dbox/fp0 to monitor vcr scart slow blanking changed! + (21) input device driver Input device "dreambox remote control (native)" is not a keyboard. Input device "dreambox advanced remote control (native)" is not a keyboard. Input device "dreambox ir keyboard" is a keyboard. Input device "dreambox ir mouse" is not a keyboard. Input device "dreambox front panel" is not a keyboard. Found 5 input devices! + (21) Console RC Driver + (30) eActionMap + (35) CI Slots scanning for common interfaces.. cannot open /proc/stb/tsmux/input0 cannot open /proc/stb/tsmux/input1 done, found 0 common interface slots + (40) eServiceCenter settings instance. + (41) eServiceFactoryM2TS + (41) eServiceFactoryMP3 + (41) eServiceFactoryFS + (41) eServiceFactoryDVB reached rl 70 ---- opening lame channel db reading services (version 4) loaded 3224 services scanning for frontends.. opening frontend 0 [4294718.313000] bcm4506: channel 0 is in normale mode now detected satellite frontend (0)setTone Off (0)setVoltage 0V close frontend 0 opening frontend 1 detected terrestrial frontend ([4294718.324000] VTUNER0 ioctl 1)setVoltage 0V [4294718.325000] VTUNER0 ioctl close frontend 1[4294718.325000] VTUNER0 ioctl [4294718.326000] VTUNER0 ioctl scanning for demux.. [4294718.327000] bcm4506: channel 0 is sleeping now scanning for decoders.. [4294718.327000] VTUNER0 ioctl scanning for descramblers.. [4294718.328000] VTUNER0 ioctl scanning for frontends.. opening frontend 0 failed! (/dev/dvb/adapter1/frontend0) Device or resource busy scanning for demux.. scanning for decoders.. scanning for descramblers.. found 2 adapter, 2 frontends(2 sim) and 6 demux, boxtype 3 RTC not ready... wait for transponder time [EPGC] Initialized EPGCache (wait for setCacheFile call now) Loading spinners... found 6 spinner! executing main setIoPrio best-effort level 3 ok [4294719.118000] 20164 ms: =s [4294719.168000] 49 ms: 50 /proc/stb/frontend/0/lnb_sense is 0 [setupConfigEntries] initial_call for stored uuid: 3D84-96AB {'mountpoint': '/media/U3CruzerMicro', 'device_info': 'Lower USB', 'device_description': 'SanDisk-U3 Cruzer Micro (2.054 GB)', 'enabled': 'true', 'isRemovable': 'true'} [mountPartitionbyUUID] for UUID:'3D84-96AB' main thread is non-idle! display spinner! [mountPartitionbyUUID]: mount -t auto /dev/disk/by-uuid/3D84-96AB /media/U3CruzerMicro [setupConfigEntries] new device add for 'sda1' with uuid:'3D84-96AB' [mountPartitionbyUUID] for UUID:'3D84-96AB' enumerating block devices... found block device 'sda': ok, removable=True, cdrom=False, partitions=['sda1'] new Harddisk sda -> /dev/sda -> /dev/sda [addDevicePartition] device:'sda' with UUID:'None' found block device 'sda1': error querying properties [addDevicePartition] device:'sda1' with UUID:'3D84-96AB' [mountPartitionbyUUID] for UUID:'3D84-96AB' default storage device successfully linked to /media/hdd [enumerateBlockDevices] devices_scanned_on_init: [('sda', True, False, True)] found block device 'mtdblock3': blacklisted found block device 'mtdblock2': blacklisted found block device 'mtdblock1': blacklisted found block device 'mtdblock0': blacklisted found block device 'loop7': blacklisted found block device 'loop6': blacklisted found block device 'loop5': blacklisted found block device 'loop4': blacklisted found block device 'loop3': blacklisted found block device 'loop2': blacklisted found block device 'loop1': blacklisted found block device 'loop0': blacklisted Reading satellites.xml [4294720.781000] JFFS2 notice: (27) check_node_data: wrong data CRC in data node at 0x03475e00: read 0x21ee1c99, calculated 0xd62811f5. Reading terrestrial.xml sec config cleared setSlotInfo for dvb frontend 0 to slotid 0, descr BCM4505, need rotorworkaround No, enabled Yes, DVB-S2 Yes setSlotInfo for dvb frontend 1 to slotid 1, descr USB Tuner A867 USB DVB-T, need rotorworkaround No, enabled Yes, DVB-S2 No slot: 0 configmode: simple diseqcmode: diseqc_a_b sec config completed [4294721.253000] Adding 32572k swap on /media/U3CruzerMicro/swap. Priority:-1 extents:48 across:55904k Swapfile found on /media/U3CruzerMicro/swap [4294721.258000] 2089 ms: 50 [4294721.296000] 38 ms: 55 [4294721.342000] 46 ms: 55 [4294721.366000] 24 ms: 55 [4294721.368000] 1 ms: 55 [4294721.405000] 36 ms: 55 not loading user skin: [Errno 2] No such file or directory: '/etc/enigma2/skin_user.xml'


    Why the mounts at boot time fail?


    Thanks.


    Ferrari3005

    DM500HD v2 - DM800se v2 - DM8000 - DM7020HD v2 - DM7080 HD

    2 Mal editiert, zuletzt von Ferrari3005 ()

  • Because the USB ist not yet detected when you try to mount it.


    Put a rootdelay=10 into the kernel command line and you will see the difference.


    USB is Plug and Play and this means it takes time to detect the devices during boot.


    Hence this is NOT a bug, you are simply not using it correctly.

  • I'm not an expert but to set up rootdelay=10 you must go inside bios settings.......is not an user friendly operation!!!


    OK let's use the workaround.



    Thanks Ferrari3005

    DM500HD v2 - DM800se v2 - DM8000 - DM7020HD v2 - DM7080 HD

    Einmal editiert, zuletzt von Ferrari3005 ()

  • This is not a workaround, if you want to use USB as a fixed mount device instead of automount then you either have to add waiting time or find an USB stick which is faster detected.


    You will find everything between 5-10 secs. If yours is to slow - either wait or get another one, or increase detection with an USB hub.


    Swapping is simply something which should be done already very early in the booting process where USB is simply not the optimal device because of the detection problems.


    My SATA stick is instantly available as it hasn't even a spinup time like a Harddisk.


    Barry Allen has an autoswap feature which overcomes this limitation by simply waiting until the device is detected, but this is NOT a standard Linux Feature. I could add this functionality also to my initramfs but then it still would be no standard feature and hence work only in images which have the initramfs patch in their kernel. BA works on allmost all images and does the job much nicer then you implemented it.


    If you would write a script which checks with fdisk if the device is already detected before mounting and swapping you could solve the problem also yourself instead of complaining.


    rootdelay is simply that you understand the root cause and not regard it as a bug.


    Hence your script is simply too dumb as a simple while loop and grep on the fdisk -l output would solve the problem :smiling_face:

  • Well Gutemine, in regard to certain things you mentioned, I admit you have a point - as the saying goes – “the ways of the Lord are infinite”.
    But in this case, things are complicated and one might actually end up first in “hell” rather than in “heaven”.


    Your solution and reasoning make you say that is not a Bug. OK, that is fine with me. But, as I already told you, not being aware of this fact and not being a developer, I think that nevertheless my question is legitimate. I only wanted to write what I found out by using my box.


    When re-reading what I wrote earlier, I can’t find a single reason why someone should consider my post as a complaint, nor why someone should call me a fool. What I did instead, was simply to ask for support from the developers of DMM who surely are very competent in this area.


    This Board was created in order to give support to all buyers of DMM-products and as a matter of fact, I did not post my question in the Development-section of this Board. As you can surely deduct from what I wrote, I did indeed some testing before writing but unfortunately I was unable to resolve the problem by myself.


    Not all people are competent like you. Your “Barry Allen” is a great addition to the world of DMM and indeed, I find it outstanding. As a matter of fact, I also take the occasion to thank you in public for your contribution. But at the same, I also think about all end-users who simply do not possess the knowledge necessary to use “Barry Allen” and who use their Dreambox-decoders as a pure STB or a PVR.


    You should see things from another point of view i.e. put yourself in the position of a person who enters Mediamarkt and buys a Dreambox, not even knowing how to use it. I think that simplicity is the best solution and I am sure that many people of the development-staff of DMM agree with me and maybe we have already thought about it and a new solution……. :thumbs_up:


    Thanks


    Ferrari3005

    DM500HD v2 - DM800se v2 - DM8000 - DM7020HD v2 - DM7080 HD

  • Look, I simply explained to you how you would need to modify your script and I only said that your script is too dumb and not you.


    If you have problems understanding what coding I tried to suggest simply look how this could work:


    Code
    while true; do                                                                                    	
                	if [ 'fdisk -l | grep /dev/sdb1 | wc -l` -gt 0 ]; then                                                  	
                        	break;                                                                            	
                	fi;                                                                                       	
        	done;                   	
    mount /dev/sdba1 /media/usb
    swapon /media/usb/swapfile



    This loop will simply let your script wait until you to be mounted swapdevice /dev/sdb1 (change device name if needed) is already detected.


    If you then put your mount and/or swapon after this code it will work as expected.


    it is not my faul that new Dreamboxes boot fast enought so that the device detection falls behind.


    BUT the above loop is just a simple example and the box will hang if the device is not present during boot. Hence you should make the loop more clever for example by incrementing a counter and use this instead of the true so that while will not count infinitely if the device is not there.


    Hence you should start solving your problem by making your script handling the situation instead of complaining - and this is a legitimate advice that I gave you to help you to understand it and solve it yourself instead of misinterpreting it as a bug.


    Ciao
    gutemine

    4 Mal editiert, zuletzt von Lost in Translation ()

  • It`s clear that`s an hardware dependent issue and now it`s clear for me that`s not a bug.
    About the solution I`m not agree with your suggestion because only the 5-10% of the user have a swap file needed (and the 100% I think do it by usb stick) and the effect of your script inserting will be that the 90-95% of the users will have a slowest boot due to the script timeout set.
    It`s different from the BA solution because there you must wait for the device mount because you need it and the user can wait: he choose to install a multiboot and this is the "price".
    At the end I will leave the swap activation on enigma starting where the usb sticks are detected so I don`t introduce any boot delay for all the other users and are only a few lines of python code that checks a condition.
    Thank`s for your time and I always appreciate technical discussion with you.



    Regards.


    Ferrari3005

    DM500HD v2 - DM800se v2 - DM8000 - DM7020HD v2 - DM7080 HD

  • Well, if you consider USB a Hardware problem maybe you are right :smiling_face:


    And yes, doing it when enigma2 starts is more then sufficient (I do that also in in Dumbo this way for example).


    But in 95% of the cases swapfiles are useless on Dreamboxe as even the oldest ones have sufficient memory for normal operation.


    I make swapfile only mandatory in my Tools which do backups (like dFlash, Dumbo, BA, LowFAT), because mkfs.jffs2 is a PAIN from the Memory side and especially now with the Jumbo images with 256 MB Flash you can get lost pretty fast without it.


    Have fun


    gutemine


    PS: you are not 100% right on the boot delay - start-stop-daeon could easily do the job in background without delaying the boot process at all, but as you realized there is no real need for an that early swapfile.