Page 1 of 1

Weird problem weird solution

Posted: Tue Apr 03, 2018 2:10 am
by kilaueabart
Following instructions from an old thread, Spectre 660's Downloads ..., I had -- if I remember correctly -- set up a script in U-Boot called "ubuntu" that looked like

Code: Select all

usb reset
setenv bootargs root=/dev/sdb2 rootdelay=10 mem=3500M [except I think I left the "mem=3500M" part out]
fatload usb 0:1 1000000 uImage-cyrus
fatload usb 0:1 1c00000 cyrus_5020.dtb
bootm 1000000 - 1c00000
Whenever I wanted to run Ubuntu (at least once a day, because Odyssey is a terrible thing to do google mail from) I'd go to the Command option of U-Boot, type "run ubuntu" and soon Ubuntu 16.04.4 LTS would be up and running.
Today running ubuntu attempted to reset usb, but found no storage device and the wrong size of something or other. I panicked because I have an important job to do this afternoon, that essentially requires Scribus. I can think of two possible causes for the problem. Somewhat earlier I had been about to compose an e-mail through my e-mail service provider (gmail.hawaii.edu), looked away for a moment, and looked back to find a black screen. Still had the red lights shining in the X5000, but I couldn't get a flicker on the monitor.
It turned out to be a power outage. The computer was still on because of a backup power supply, but no wifi, and I don't usually plug the monitor into the backup.
When the power came back on, for some reason I ended up in OS4, rebooted, and that's when the "ubuntu" script failed me as described above.
Out of desperation I tried something I had no hope of working. I typed the above script into U-Boot but changed the "0:1" in the two fatload lines to "1:1" and here I am! Why? And what do I do now to make the original script work?

Re: Weird problem weird solution

Posted: Tue Apr 03, 2018 10:34 am
by xeno74
Could you please boot ubuntu MATE from a USB stick and check the ubuntu MATE partition on your hard drive?

Re: Weird problem weird solution

Posted: Wed Apr 04, 2018 2:41 am
by kilaueabart
xeno74 wrote:Could you please boot ubuntu MATE from a USB stick and check the ubuntu MATE partition on your hard drive?
I don't know if I have a USB stick that would work, and I probably wouldn't know how to do it anymore anyway. (Darned senility!)

Oddly, today when I first turned on the computer I pessimistically tried "run ubuntu" and it worked! After a while in Ubuntu, I switched to OS4 to print some stuff that I couldn't handle from Ubuntu, then rebooted and tried "run ubuntu" again. No good this time:

Code: Select all

Scanning bus 1 for devices ERROR: Invalid USP EP length
     ERROR: invalid USP EP length
3 USB devices found
                      Scanning usb for storage devices... Device NOT ready
      Request sense returned 02 3A 00
2 storage devices found
** Bad device size - usb 0 **
** Bad device size - usb 0 **
So I tried the 1:1 instead of 0:1 trick again, and Ubuntu booted right up.

So my current secret plan is to write a second boot script, "ubuntu2," with "fatload usb 1:1 10000000" etc., and I'll just run it when "run ubuntu" fails. Why it works is just an interesting puzzle that I will probably never understand.

Re: Weird problem weird solution

Posted: Wed Apr 04, 2018 4:54 am
by xeno74
kilaueabart wrote: So I tried the 1:1 instead of 0:1 trick again, and Ubuntu booted right up.
Fantastic! :-) Well done!

Re: Weird problem weird solution

Posted: Tue Apr 10, 2018 1:43 am
by kilaueabart
xeno74 wrote:Could you please boot ubuntu MATE from a USB stick and check the ubuntu MATE partition on your hard drive?
I thought I always do boot from a USB stick. Isn't that why the "reset usb" and the "0:1" in the fatload commands? I have the idea that that is what shows up as "Ubuntu" on Workbench. I am able to open "Ubuntu" on Workbench, and I can even list it:

Code: Select all

8.Workbench:> list Ubuntu:
Directory "Ubuntu:" on Monday 09-Apr-18
cyrus_5020.dtb                29244 ----rwed 01-Jul-17 12:39:10
cyrus-4.13.11-jm.config      136347 ----rwed 03-Nov-17 18:39:00
installer.scr                   460 ----rwed 08-Nov-17 11:43:34
System.map                  6042625 ----rwed 03-Nov-17 18:56:06
Ubuntu-Mate_Installer_Uboot_Script.txt        388 ----rwed 08-Nov-17 11:43:16
uImage-cyrus               10175680 ----rwed 14-Mar-18 09:58:04
uRamdisk                   30457534 ----rwed 23-Jul-17 12:25:14
.Trash-1000                     Dir ---arwed 25-Feb-18 21:04:04
7 files - 44M bytes - 1 directory - 91550 blocks used
Meanwhile, Media Toolbox says it is "SanDisk Cruzer (version) 1.00 (id, LUN) 0,0, Removable hard disk, Not installed."

Once again, today, after using OS4 a while I tried to boot by running "ubuntu" from Uboot, and got

Code: Select all

                      Scanning usb for storage devices... Device NOT ready
      Request sense returned 02 3A 00
2 storage devices found
** Bad device size - usb 0 **
** Bad device size - usb 0 **
I had set up a "ubuntu2" script, just in case, where the "fatloads" looked at 1:1, but this time it didn't work, and I don't know what to do. Can anyone tell from the Uboot session what the problem is, and is there a fix? (I have a lot of important jobs to do in ubuntu, in a hurry.)

Re: Weird problem weird solution

Posted: Tue Apr 10, 2018 2:35 am
by kilaueabart
I finally noticed that it had apparently loaded uImage-cyrus from usb 1:1. So right after its instructions on how to do fatload, I deliberately tried just the one command to load cyrus_5020.dtb, and that apparently worked this time. Hopefully, I keyed in "bootm 1000000 - 1c00000" and it ended up launching Ubuntu, where I am for this second post of the day, instead of OS4.

But what the heck is going on? Why can I usually load from usb 0:1 by simply running the "ubuntu" script, and why doesn/t ubuntu2 work in one batch? Maybe I forgot a ";"? I'll have to check, but if so, why the "Usage" notice?

Oh, yes. I see I used a ":" instead!

Aargh!