9 Replies Latest reply on Jan 6, 2016 12:25 PM by LeoMRLima

    Ubilinux installation fails

    Joakim

      I have a fresh Edison (two actually). I don't want to deal with Yocto and immediately went for Ubilinux.

       

      On my Mac, flashing works fine and the Edison restarts. However, it keeps restarting several times and eventually goes into "rescue" mode. Rescue mode doesn't seem to actually work – there is no login prompt on the serial port, even though I can see the boot sequence there. The last message printed is "[  OK  ] Reached target Rescue Mode."

       

      This is consistent on both my Edisons. I can still interrupt the boot sequence and enter flash mode, so they're by no means bricked. But I really would like to get Ubilinux working.

       

      Has this worked for others?

        • 1. Re: Ubilinux installation fails
          Andre.M

          it worked for me with dfu-util

          if you scroll the boot messages up do you see a message why you end with rescue mode?

          • 2. Re: Ubilinux installation fails
            Joakim

            There is nothing in the output about why rescue mode, but I realize now that the flashall tool failed to flash the rootfs. At one point in the process, it waits for the Edison to reboot (before doing the rootfs flash). However it fails to wait and immediately proceeds to try before the Edison is ready, and fails (silently). In hindsight it's obvious, since the rootfs flash should have taken longer.

             

            This is output of flashall for a bad flashing session:

             

            Using U-Boot target: edison-blank

            Now waiting for dfu device 8087:0a99

            dfu-util: Device has DFU interface, but has no DFU functional descriptor

            Flashing IFWI

            dfu-util: Device has DFU interface, but has no DFU functional descriptor

            Download [=========================] 100%      4194304 bytes

            Flashing U-Boot

            Download [=========================] 100%       245760 bytes

            Flashing U-Boot Environment

            Download [=========================] 100%        65536 bytes

            Flashing U-Boot Environment Backup and rebooting to apply partiton changes

            Download [=========================] 100%        65536 bytes

            Now waiting for dfu device 8087:0a99

            dfu-util: Device has DFU interface, but has no DFU functional descriptor

            Flashing boot partition (kernel)

            Flashing rootfs, (it can take up to 5 minutes... Please be patient)

            Rebooting

            U-boot & Kernel System Flash Success...

            Your board needs to reboot twice to complete the flashing procedure, please do not unplug it for 2 minutes.

             

             

            I think the fault lies in the bash subroutine "dfu-wait", which seems to return too early. Or it could be that it returns correctly, but Edison fails to come up in the right mode after the reboot (the correct mode being dfu mode, I think).

             

            I was able to hack my way around this by editing the flashall.sh script and removing "-R" at one point, preventing the Edison reboot and letting the flash finish normally. Supposedly, this may only work if you've let it reboot at least once so that the partitioning is done. So I have my workaround, but I'd like this to work repeatedly without hacks…

            • 3. Re: Ubilinux installation fails
              tintar

              it seems weird coincidence to be happening on both machines.


              even though the ubilinux recovery subsystem doesn't technically require xfstk anymore, some people (*averts eyes* **...off-key whistling**) have done things embarrassingly-bad-enough that flashall-recovery only works with xfstk.


              in my case it was also a problem of not being seen as a proper dfu medium, but in my case the underlying reason for that was 100% pilot error. adding xfstk cleaned that up.

               

              in the first ubilinux thread, I recall the Emutex guys actively improving the flash script, until a point where it seemed like it was solid for everyone - you may try asking one of them.

               

              at least you've made a workaround, but it really does not make sense.

               

              data point:

              - 2 Edisons, both are mini-board variant.

              - 2 successful installs of ubilinux-edison-ww44.5.tar.gz (one from clean/working yocto, one from a ...somewhat trashed state...)

               

              hm, nevermind - I had a vague thought maybe the issue could be with the more recent ubilinux-edison-141030.tar.gz, but turns out the size and md5sum are an exact match to the ww44.5, so, that's not it.

               

              zero clue of OSX device handling, but looking at the udev ruleset on the machine I used for both ubilinux flashes, I never added anything Edison-specific, so it shouldn't be any kind of permissions/ID issue.

               

              I am at this literal moment flashing an arduino-variant with 141030, and so far all is well. have you tried a different host machine? it could even be down to weird-**** like neutrinos causing parity errors on your Mac (ok that's a rather lame joke, although physics-math technically allows for this

              success!

              although...

              - still getting the same annoying occasional WARN about errors in the ext journal, as on the other 2 devices. but this is some kernel defect, it was always the same in yocto on the 2 minis too, as well as in debian on both of them. neither online/realtime nor reboot-time fsck ever fixed this. again, it's a kernel problem that may only be a nuisance message,

              • 4. Re: Ubilinux installation fails
                ddewaele

                Hi,

                 

                While following the Sparkfun guide I ran into the same issue.  My boot sequence can be found here : Edison Linux boot output

                How exactly did you recover from this ? I would like to put Yocto on it again but I'm unable to partition the Edison again. I'm left with a 500mb partition.

                 

                Regards,

                Davy

                • 5. Re: Ubilinux installation fails
                  Joakim

                  I recovered by using the serial port to interrupt the boot sequence (hit enter) and type "run do_flash". That puts it in receive mode to be flashed by the flashall.sh script (which comes with both yocto and ubilinux)

                  • 6. Re: Ubilinux installation fails
                    ddewaele

                    That did the trick ! Thanks a lot .... lost 4 hours on this one

                    • 7. Re: Ubilinux installation fails
                      MarkHaysHarris777

                      hola... and lesson learned? ...  yocto works fine, if it ain't broke don't fix it ...  and if everything works leave it alone.

                       

                      Why on earth is Sparkfun recommending replacing yocto project on Edison when the flash procedure is so flaky... seems like a perfect waste of $50 bucks U.S.

                       

                      ... but that's just me.

                      • 8. Re: Ubilinux installation fails
                        Cale-Hoopes

                        I'm actually having this situation. However, here's the deal. I got to the "Flashing rootfs" section and put the -v on the script (and added some echo of local variables).

                         

                        The issue?

                         

                        Cannot allocate memory of size 1610612736

                         

                        Hmmmmm. Does that mean it really didn't partition?

                        • 9. Re: Ubilinux installation fails
                          LeoMRLima

                          Just in case anyone stumbles here because of the "Cannot allocate memory of size 1610612736" error: it's a DFU-Util meaning it couldn't allocate enough heap.

                           

                          On my system (windows 10 64bits, on a bootcamped 8GB macbook pro), I had this problem when running with a system managed page file size, and the page file was less than 1.5GB. When I set the page file size to be between 1 and 2GB, dfu-utils worked, so did the flashing procedure.