• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: My plug fails to boot after 10 days  (Read 4629 times)
CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« on: August 13, 2009, 12:51:15 PM »

It has been working for about 10 days with almost no sign of any problems, or unreliability.  I had copied to SDCard, and has been running from there, with significant customizations and module additions.

Today when I booted, it fails.  Tried the previous working card, that fails too...

So after connecting the serial port, this is what I see on reboot:

(manually typed in here, not copy/pasted)
Quote
Marvel>> boot
NAND read: device 0 offset 0x1000000, size 0x400000

Reading data from 0x4ff800 -- 100% complete
 4194304 bytes read: OK
## Booting image at 00800000 ...
  Image Name   Linux-2.6.22.18
  Created:         2009-03-19 9:1816 UTC
  Image Type:   ARM Linux Kernel Image (uncompresed)
  Data Size:       2106696 Bytes = 2 MB
  Load Address: 00008000
  Entry Point:     00008000
  Verifying Checkum: ... Bad Data CRC
Marvell >>

Repeating it gets the same exact msg.

1.  Why is it reading the NAND since I have configured to boot from the SDCard, and the bootarg is the same as the one I had setup a week ago.  [It gives identical msg whether or not my SDCard is plugged in.]

2.  Why is showing the NAND size as 2MB (which is the size of my SDCard) ?

3.  Any suggestion of how do I fix this this problem?

BTW, I am running the serial terminal on a Ubunto 5.5 Live.  How do I copy and paste from by Ubuntu terminals to Win?  Any ideas?
Logged

Cordially, CqCn

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #1 on: August 13, 2009, 04:04:26 PM »

Without access to your Uboot environment, it is difficult to analyze your problem.

1.  When you moved to the SDcard, most people configure it to simply become the root filesystem, but they continue to boot from the NAND.  Did you explicitly change your Uboot to read the kernel off the SDcard?

2. Not sure what you mean.  My guess is your SDcard is 2GB, not 2MB.

3. What is your Uboot "bootcmd" parameter set to, along with any ancillary parameters it uses?

Did you do anything different on your last boot?  Was it perhaps the first time you had power-cycled your Plug?  When I first moved the root fs to the SDcard, I found it worked great for days and through multiple reboots... until I tried to power cycle it.  Then, it wouldn't boot -- at least until I reset the Plug using a paperclip.  Workaround:  I had to code an mmcinit in the Uboot sequence.

Some folks have set up Uboot sequences that attempt to boot from the SDcard and, if that fails, revert to booting from the NAND.  If you have done this (inadvertantly or not), that could explain your Plug's behavior.

As far as capturing the results of your Ubuntu Live session elsewhere, do you have a floppy?  a FAT FS on your HD you can mount and copy the output to?  If nothing else, create a gmail account, log into it, cut and paste, and then email the results to your regular account.

Good Luck!
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #2 on: August 13, 2009, 05:42:41 PM »

restamp,  Thank you for starting the help... Let me aswer your questions:

First, emailing for transfer from Ubuntu live, good idea!   However I still cannot paste into the gmail (online with FireForx), I would have to attach as file; still quite a bit indirect.   I do not have any floppy. But can I use a FAT32 usb stick as a shareable area?

1. My setup seems to be as you say in 1.   I only changed the bootargs variable, so I probably had been always booting from NAND; only my rootfs was on the SDCard.  Thank you, I am learning Smiley

2. My error, my SDCard is 2GB.  Still,  without the SDCard, where is the 2GB number coming from in the error msg?

3.
#printenv bootcmd
bootcmd=nand read.e 0x800000 0x100000 0x400000; bootm 0x800000

I do not think I did anything different on the last boot Sad  I have been doing poweroff, disconnect power plug, change sdcards, and reapply power frequently.  I am pretty sure I had also rebooted with the paperclip method.  All had worked before.  Now power reapply, or paperclip reset, stops at the same place with the same error.

No I had not added the mmcinit.  Remember I have not upgraded my uboot, will the mmcinit work with the origingal uboot came with the box (arrived in the last 2 weeks) ?  If you think there is no downside, I can add that.  Should I add 'mmcint;' to the beginning of the current bootcmd string?

On the side: 
Quote
Some folks have set up Uboot sequences that attempt to boot from the SDcard and, if that fails, revert to booting from the NAND.  If you have done this (inadvertantly or not), that could explain your Plug's behavior.
  How does one set this way?  I am curious now, it looks like a useful feature.

Logged

Cordially, CqCn

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #3 on: August 13, 2009, 08:35:37 PM »

First, regarding the 2MB vs. 2GB thing:  What the Kernel is printing is the size of it's internal data segment (2106696 Bytes = a bit more than 2 MB).  It's not an error.  It's just information the Kernel prints out when it comes up.  I see something similar on every boot.  It has nothing to do with the size of your SDcard.

From your bootcmd, it's obvious you are not booting from your SDcard, but simply using it as your root fs.  The "nand read.e" command works by reading the kernel in from NAND memory.

It surely appears as if the kernel uImage you have in your Plug has somehow become corrupted.  Perhaps some program inadvertently wrote to /dev/mtd0.  Or, perhaps the NAND has developed a bad block.  (That would be surprising, though, as there is nothing indicating a block error, but I've heard -- can't vouch for its correctness -- that the vanilla Uboot doesn't handle ECC errors well.)

It seems you are using the kernel distributed with the Plug.  There are several ways of proceeding.  Perhaps the easiest is to just run the Alpha-6 installer.  (BTW, I would have advised re-running it even if you had already done so in the past.)  It should rewrite the NAND with a bootable kernel (2.6.30-rc6).  It will also overwrite the NAND root partition.  But, in your case, that's OK because you can then just modify the Uboot boot parms to use your SDcard, which should have everything as you left it the last time you were able to boot, except for a better kernel.  (A caveat:  Actually, I've never tried running a 2.6.30 kernel with the Plug's original FS, so I can't say unequivocally that it will be w/o problems.)  You can then drop your desired kernel back in your NAND if you'd care -- or better yet, place it on your SDcard and modify the Plug to boot the kernel from there, leaving the kernel and FS on NAND for an emergency backup.  (BTW, since you haven't run alpha-6 yet, you may find that its Uboot is a bit more intelligent about dealing with NAND ECC, which may make your Plug more robust.)

In any event, I don't know how you are using your Plug, but I'd bet you find the 2.6.30 kernel a marked improvement.

Good luck!

Oh, about the dual/triple boot setup.  See:  http://www.openplug.org/plugwiki/index.php/Multi-Boot
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #4 on: August 14, 2009, 01:18:47 PM »

restamp,

When I try to do the alpha-6 install, I get an error about ftdi.

Quote
...
$UFL: http://svn.berlios.de/svnroon/repos/.../openocd.c $
2000 kHz
dcc downloads are enabled
Error:  unable to open ftdi device: device not found
Runtime error, file "command.c", line 453:

 *** openocd Failed
 *** Is the mini USB cable connected
 *** Try powering down, then replugging the Sheevaplug

Looking at the wiki, I think this is the fix there:

Quote
Important Note for Newer Plugs (7/30/09ish)

If you are getting errors when trying to connect to the plug, you may need to change the Vendor and Product IDs in the config. This is needed if you see the ftdi device and messages as outlined above, but have errors when trying to connect using the runme.sh. You need to change the file so that it contains:

 interface ft2232
 ft2232_layout sheevaplug
 ft2232_vid_pid 0x0403 0x6010
 #ft2232_vid_pid 0x9e88 0x9e8f
 #ft2232_device_desc "SheevaPlug JTAGKey FT2232D B"
 jtag_khz 2000

How/were exactly do I make this modifications?  I am not building anything...  Is the  an image prebuilt with the above fix?  Where?  Thank you.

Logged

Cordially, CqCn

boerner
Jr. Member
**

Karma: 0
Posts: 54


View Profile
« Reply #5 on: August 14, 2009, 01:52:27 PM »

Modify the file located at:

sheevaplug-installer-alpha-6/scripts-linux/openocd/config/interface/sheevaplug.cfg

with the changes mentioned in the wiki article.

Hopefully that works for you...
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #6 on: August 14, 2009, 05:37:41 PM »

Thank you, boerner!

Did I miss a line showing the exact path of that file, or this most *nix people would know??

Now it went through, rebooted, got an error on:

* Setting kernel variables (/etc/sysctl.d/10-network-security.conf)... error: "net.ipv4.tcp_syncookies" is unknown key  [fail]

I had read that a  file /etc/sysctl.d/10-process.security.conf
had to be added with the entry vm.mmap_min_addr=32768

I added this, but on reboot, the  one line file I added added also give an error  as an unknown key...

I do have remote ssh.  Are those errors to be fixed?  How?
Logged

Cordially, CqCn

boerner
Jr. Member
**

Karma: 0
Posts: 54


View Profile
« Reply #7 on: August 14, 2009, 05:43:39 PM »

Glad you got a little farther. Not sure about your new errors though...did you do a saveenv after you made the changes in uboot? I have made the mistake of not doing so more than once...
Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #8 on: August 14, 2009, 06:06:17 PM »

Did I miss a line showing the exact path of that file, or this most *nix people would know??

Now it went through, rebooted, got an error on:

* Setting kernel variables (/etc/sysctl.d/10-network-security.conf)... error: "net.ipv4.tcp_syncookies" is unknown key  [fail]

I had read that a  file /etc/sysctl.d/10-process.security.conf
had to be added with the entry vm.mmap_min_addr=32768

I added this, but on reboot, the  one line file I added added also give an error  as an unknown key...

I do have remote ssh.  Are those errors to be fixed?  How?


Is the proc filesystem mounted?  If it's not, these errors should go away once you get it mounted properly.

run "mount", it should show the proc filesystem mounted at /proc.  If it's not there it needs to be added to /etc/fstab.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #9 on: August 14, 2009, 07:16:35 PM »

This is the intial system right after the alpha-6 intall.  The rootfs is still in nand.  The /etc/fstab was empty except for the first comment line.
I added entry for proc, rebooted.

Still has the same two errors, mount shows proc is mounted.
Logged

Cordially, CqCn

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #10 on: August 14, 2009, 08:53:41 PM »

This is a bug.  (Google it!)  I saw it, too, after installing alpha-6.  I "solved" it -- well, made the error go away; don't know what I did to system security in the process, but my Plug won't be getting much external exposure -- by commenting out the last line of the file /etc/sysctl.d/10-network-security.conf .

It appears the special file systems are all created elsewhere, and really don't need to be specified in /etc/fstab.

BTW, congrats, CqCn, on upgrading and getting your Plug back in operation.  I hope you enjoy the newer load.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #11 on: August 14, 2009, 09:05:11 PM »

restab,

Thank you very much for your help!  It was bit of a stress for me since *nix is not my mother tonge Smiley  I just changed the bootargs_root to root=b301 and can now boot from last SDCard.  Almost everything looks the way it was when I was running from the my card 3 days ago.  Good news.  A very special thanks to you for the many questions you answered for me and staying with me.

I just tried a new feature of the new kernel, I can now make the blue led blink, and probably will add to things like powerdown to show progress when I do some special sys maintenance stuff such as backup...

I had only 30 minutes, so cant say I see any other 'improvements' yet Smiley

BTW, in the above root=b301 does not feel very symbolic like a device name?  How is this to be interpretted?  What are the other possible stuff like b301?

Logged

Cordially, CqCn

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #12 on: August 14, 2009, 10:45:22 PM »

BTW, in the above root=b301 does not feel very symbolic like a device name?  How is this to be interpretted?  What are the other possible stuff like b301?
You've just specified the first partition on your SD card by its major and minor device numbers.  Do an "ls -l /dev/mm*" and you'll see something like:
Code:
$ ls -l /dev/mm*
brw-rw---- 1 root disk 179, 0 2009-08-11 02:08 /dev/mmcblk0
brw-rw---- 1 root disk 179, 1 2009-08-11 02:08 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 2 2009-08-11 02:08 /dev/mmcblk0p2
brw-rw---- 1 root disk 179, 3 2009-08-11 02:08 /dev/mmcblk0p3
$
Note that 179 == 0xb3 and 1 == 0x01.

The other obvious device you might wish to specify is the one associated with the NAND-resident filesystem, /dev/mtdblock1.  It's major and minor devices are "31, 1" or 0x1f01.

Frankly, I prefer to specify the device by it's /dev name.  (My bootargs_root is "root=/dev/mmcblk0p1 rw,relatime")

Thanks for your thanks.  Glad you got your Plug back up and operating.
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #13 on: August 15, 2009, 01:14:08 PM »

Further discussion on what this topic has evolved into has been moved here.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #14 on: August 15, 2009, 09:25:35 PM »

restamp,
I see the error below after the upgrade, in syslog
Aug 15 11:15:23 xxboxxx modprobe: FATAL: Could not load /lib/modules/2.6.30-rc6/modules.dep: No such file or directory
Does this need fixing; how to?
Logged

Cordially, CqCn

Pages: [1] 2
Print
Jump to: