New IT forum Follow us on Twitter
23 May 2012, 03:10:02 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Dead Sheeva: 'Bad Magic Number' or 'fsck something something superblock'  (Read 1529 times)
JustaGuy
Newbie
*
Posts: 38



WWW
« on: 16 July 2010, 03:26:29 pm »

My Sheeva doesn't boot anymore from the internal disk or the card.
I may be wrong on the sequence of events since there was so much that went wrong in an hour prior to its death, this is best I can remember.

It used to boot from the card that came with the pre-installed Debian.
There was a Drobo attached via eSATA that had acquired sda, sdb, sdc & sdd.
I attached a USB thumbdrive, it got sde, & I added it as a swap partition.
Then I added swap to fstab as /dev/sde1.

Apparently once you populate fstab with anything once, it won't boot from the card again unless you define /dev/mmcblk0p2 as / in fstab too. Otherwise I'd get a failed fsck & it asked for a different superblock.

That wasn't a problem since I could boot the pre-installed ubuntu from the internal drive & mount the card from there to add this line to fstab:
/dev/mmcblk0p2   /         ext3   defaults,noatime   0   1

Everything was fine until I noticed the USB thumbdrive was on sda where the Drobo had been.
So now I had ext3 mounted as swap & vice versa, so I changed fstab to put the swap on sda & shifted the Drobos up by one up to sde.

After it rebooted again I changed fstab to use UUID's for everything, and rebooted yet again.

Now out of nowhere it couldn't detect something to do with USB & did T T T T T T T for a minute or two instead of booting.
So I removed the swap thumbdrive & tried again.

This time it was a unrecoverable I/O error over & over but it would boot. So in case that had to do with me adding an explicitly defined / to fstab and it was Debian- (the forum said ubuntu needed root explicitly defined- and that Debian supposedly didn't need it to be), I commented out the line defining / in fstab.

At this point I got the same fsck error that adding / to fstab resolved a few hours earlier. So I remove the card so I can boot into ubuntu from the internal drive again to mount & repair fstab on the card, just like I did before.
Except now the internal card doesn't boot anymore either.

Instead of booting it says there's a bad partition, a bad magic number & no mmc card found.

So now there's no hope.

I read about similar problems on the forums, and about solutions that are far beyond my level of competance with compiling & what not.
I don't have time to go through that. It took me a month to find the time to figure out how to set up NFS- which ironically was working for the first time for less than an hour prior to it dying.

I saw some mention of the possibility of an RMA, which I'll write in about.

I did buy 2 of these, so I'm wondering about the possibility of cloning the other one, but after seeing the alien dialect of linux these things speak, I imagine it's too involved for someone like me.

I did manage to get a printenv just before it died, in case someone thinks they can help. I saw that's helpful to people who know how to read all that.

If you think you can help, please do.

Thanks in advance.

Printenv:
http://temp.nocturnal.fea.st/printenv.txt

------
Not only did the Sheeva kick the bucket, now I can't log onto my KVM server because it needs the NFS shares. Great.

--

I just found the recovery procedure in the folder that came with these- hope it works. I'll hope to post about my success with it soon.
« Last Edit: 16 July 2010, 03:48:17 pm by JustaGuy » Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #1 on: 16 July 2010, 04:18:28 pm »

The recovery instructions say:
5.  Copy the following to the USB stick root directory:
      a. Root file-system (packed into rootfs.tar.gz)

However I don't see a file called rootfs.tar.gz anywhere on the CD that came with it.

But that's Ok, because it says I can download it from here:
http://plugcomputer.org/index.php/us/resources/downloads

Except that's not a link to it. It's a link to a maze of links where I imagine somewhere it's in there.
Let's guess what a root filesystem would be classified under.

It's not going to be under 'Compilers' because it's a filesystem not a compiler.

It may be under 'Distributions' because that's what linuxes are called.

It's not going to be under 'Documentation' because it's a file system.

It might be under 'Kernel / LSP Sources' because while a filesystem's certainly not a kernel, a LSP could be anything, and a source of a LSP is maybe more important than the LSP itself.

It's not going to be under 'Kernel Images' because a filesystem still isn't a kernel.

Maybe it's under 'SheevaPlug Software & Design Information - Revision 1.2'. It is the software that runs the OS after all, these files that comprise the root filesystem.

It might be under 'Tools / Drivers' or it might not. I imagine depending on who you talk to the root filesystem could be a tool. A tool to recover a bricked plug in this case. I don't think it'd be considered a driver however.

I don't think it's under uboot. I think booting happens prior to filesystems being involved, but I could be wrong.

Oh, wait! Look here at the bottom of the page. There's a link down here.
It says 'Search Repository' if you look real close you can make out the letters.

I'll query rootfs.tar.gz.

Search Repository

Search For: rootfs.tar.gz

Search File Titles: checked

Search File Descriptions: checked
No Files Found.

Aww, shucks. Guess we go exploring by hand.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #2 on: 16 July 2010, 04:32:29 pm »

I found it!!
It's inside this zip file called 'SheevaPlug_Host_SWsupportPackageLinuxHost1.2'.

So I open 'SheevaPlug_Host_SWsupportPackageLinuxHost1.2',
Then I can drill down through a couple more folders
And eventually I come to a file called 'Linux Host Filesystem - rootfs.tar.bz2'

It has the name of the file I'm looking for in it's name.

In my opinion the instructions could've been clearer.
The root filesystem is indeed packed in a file whose name contains rootfs.tar.bz2 called 'Linux Host Filesystem - rootfs.tar.bz2', which in turn is packed in 'SheevaPlug_Host_SWsupportPackageLinuxHost1.2.zip'.

I have some copying to do.

Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 16 July 2010, 04:39:10 pm »

Quote
T T T T T T T
means that the plug is trying to boot from a TFTP server. If that wasn't your intention, then your environment variables are not what you thought they were.

If you can't restore them, or having fixed them you still have problems, you should use the installer. (But to boot from the SD card you should only need to reset the environment variables). If you didn't make a note of the settings, look here

The installer download here includes an Ubuntu rootfs.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #4 on: 16 July 2010, 05:02:49 pm »

Ok, so here we go again.
Not finding what the instructions are referring to when they say to copy:
c. Kernel modules (packed into modules.tar.gz)
into the root of my USB drive.

I started opening every file that was in front of me like last time thinking eventually it would turn up like the last one did.
Then it dawned on me I could just download it from the supplied URL.

There are actually 3 URL's to choose from, and the authors were kind enough to detail following each what they were for, as follows:

If you do not have all, you can download from:
      a. http://plugcomputer.org/index.php/us/resources/downloads (distro, kernel(LSP), uboot)
      b. http://plugcomputer.org/plugwiki/index.php/Main_Page     (distrio,uboot)
      c. http://sheeva.with-linux.com/sheeva                      (mainline kernel+modules)

Since it's kernel modules I'm after, I pasted the one at line 'c' into Firefox.

And OpenDNS, who's also kind has this to say about it:

Hmm, sheeva.with-linux.com isn't loading right now.
The computers that run sheeva.with-linux.com are having some trouble. Usually this is just a temporary problem, so you might want to try again in a few minutes.
Want more detail? See which nameservers are failing.
Nameserver trace for sheeva.with-linux.com:
    * Looking for who is responsible for root zone and followed g.root-servers.net.
    * Looking for who is responsible for com and followed g.gtld-servers.net.
    * Looking for who is responsible for with-linux.com and followed ns2.afraid.org.
Nameservers for sheeva.with-linux.com:
    * ns1.afraid.org returned (SERVFAIL)
    * ns2.afraid.org returned (SERVFAIL)
    * ns3.afraid.org returned (SERVFAIL)
    * ns4.afraid.org returned (SERVFAIL)

Bummer.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #5 on: 16 July 2010, 05:03:49 pm »

Quote
T T T T T T T
means that the plug is trying to boot from a TFTP server. If that wasn't your intention, then your environment variables are not what you thought they were.

If you can't restore them, or having fixed them you still have problems, you should use the installer. (But to boot from the SD card you should only need to reset the environment variables). If you didn't make a note of the settings, look here

The installer download here includes an Ubuntu rootfs.


Looking now, thanks!
Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #6 on: 16 July 2010, 05:22:09 pm »

Ok, so here we go again.
Not finding what the instructions are referring to when they say to copy:
c. Kernel modules (packed into modules.tar.gz)
into the root of my USB drive.

I started opening every file that was in front of me like last time thinking eventually it would turn up like the last one did.
Then it dawned on me I could just download it from the supplied URL.

There are actually 3 URL's to choose from, and the authors were kind enough to detail following each what they were for, as follows:

If you do not have all, you can download from:
      c. http://sheeva.with-linux.com/sheeva                      (mainline kernel+modules)

Since it's kernel modules I'm after, I pasted the one at line 'c' into Firefox.



You chose correctly. Someone reported that it was down yesterday, too. I didn't have any problems then, but I can confirm that right now it does seem to be down.
Logged
JustaGuy
Newbie
*
Posts: 38



WWW
« Reply #7 on: 17 July 2010, 07:32:01 am »

The re-installation procedure seems poorly documented to the extent that it's useless to me.

For example step 3 of the instructions as dictated by /sheevaplug-installer-v1.0/README.txt says to edit /sheevaplug-installer/installer/uboot-custom.txt, which doesn't exist in /sheevaplug-installer-v1.0/installer.

Second example step 4 has me copying the entirity of /sheevaplug-installer-v1.0/installer into the root of the USB drive, while the step directly after, step 5 wants me to copy individual files to the root of the USB drive, and these files seem to only exist in the path I just copied there in the previous step. This leads me to believe step 5 must be referring to files that have yet to be copied to the destination and that I should make an effort to locate these files.

The instructions state the file(s) can be found at a said location, however I was unable to navigate to the specified location until I began randomly unzipping each & every file contained in the installer package. Actually, I had to re-download fresh copies to learn this because I was originally under the impression that I had been shipped an outdated CD, being that the first link right at the top of the index.html located in the root of the CD that comes with the plugs points to "Marvell: Page Not Found" (http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp).

Once I unzip something whose name seems similar to that which I've been directed to find something in, when I look there I don't see the file I expect to find, namely a .gz file, but rather a .bz2 file named similarly to the one I'm directed to locate by the README.txt file.

When the instructions say to locate a file called uimage, instead I find a file called something-uimage-somethingsomething.

I never found anything close to modules.tar.gz.

Rather than something called uImage.initrd, instead I was able to locate a few called something-rd-somethingsomething, or also some-rd-thingsomething, and yet another somewhere else called somethingsomethingsomething-rd-something.


With that, you already have my $40 US to re-flash the plug, I'll have it to the Post Office today providing I receive the address confirmation in my email- which I expect I will since staff replies have indeed been timely & responsive thus far, thank you.

------------------------------------

I've gone ahead & unboxed the second plug I ordered, the white one- and booted it from it's internally installed OS.
I missed the output of it's first boot because it was on a different COM port than the black one.

I had to power cycle to reboot it since when I pointed Putty.exe to the right port to connect, the console didn't respond to me pressing <Enter> in it.
I caught the output of it's second ever boot & I see the same error messages stream by as I see on the bricked one, except in this case it's not affected by them- it plows through & reaches a logon prompt.

This is the part that seems to stop the black one in it's tracks:

Hit any key to stop autoboot:  0
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK



-------------------------------------------------------------
My black SheevaPlug stops here, the white one continues past the following & reaches the logon prompt:
-------------------------------------------------------------



## Booting image at 00800000 ...
   Image Name:   Linux-2.6.32.7
   Created:      2010-02-10  21:21:03 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822164 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK



Is this normal for when they're new?


--------------------

As for the NFS server I've installed to the card containing the pre-installed Debian, it's working happily after having edited /etc/fstab & /etc/exports accordingly while the card was mounted from the internally-installed OS.

For the sake of whoever may arrive to this thread by means of a query for fsck:
I had to add the line in fstab that defines the / mountpoint to boot past that error.

These are the first 2 lines from /etc/fstab on my pre-installed Debian card:
#UUID=bf3fee2c-b90b-481f-b202-ea0ad3fddd9e / ext3 defaults,noatime 0 1
/dev/mmcblk0p2 / ext3 defaults,noatime 0 1

If you can't boot to the OS on that card to edit /etc/fstab from, you ought to be able to boot into the OS that's present when that card's removed. This is what I did from there:

First I made a place I can make the card available from (at the root prompt):
#mkdir /mnt/mmcblk0p2
#

Then I mount it (make the card available):
#mount /dev/mmcblk0p2 /mnt/mmcblk0p2
#

At this point I can edit the OS on the card's fstab to add the missing lines to the file:
#vi /mnt/mmcblk0p2/etc/fstab

Press the <i> key to be able to type something new, then type the following (don't try to paste with Ctrl-V, vi is an editor just looking for an excuse to screw you up- type it):
/dev/mmcblk0p2 / ext3 defaults 0 1

Then press <Esc> then <:> then <w> then <q> then <Enter>, and you should see a line about having written a bunch of bytes to a file, and be back to the root prompt.
#

Notice the missing ,noatime from the part my instructions had you type into your /etc/fstab. You can have that there if you want to help you card live longer, but I can't say to put it there because it could cause problems for you later depending on what you use your plug for.
I figure if you need my help to do this, you're noob enough to not know better than to put that in there.
« Last Edit: 17 July 2010, 08:03:49 am by JustaGuy » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #8 on: 17 July 2010, 10:16:27 am »

The re-installation procedure seems poorly documented to the extent that it's useless to me.

It is badly documented, but thousands have figured out the correct steps. If you provide clear information about what you have done, and where you are stuck, we can help.

Quote
For example step 3 of the instructions as dictated by /sheevaplug-installer-v1.0/README.txt says to edit /sheevaplug-installer/installer/uboot-custom.txt, which doesn't exist in /sheevaplug-installer-v1.0/installer.

The file(s) are in a sub-directory uboot/uboot-env, named uboot-mmc-custom.txt and uboot-nand-custom.txt

Quote

Second example step 4 has me copying the entirity of /sheevaplug-installer-v1.0/installer into the root of the USB drive, while the step directly after, step 5 wants me to copy individual files to the root of the USB drive, and these files seem to only exist in the path I just copied there in the previous step. This leads me to believe step 5 must be referring to files that have yet to be copied to the destination and that I should make an effort to locate these files.

The instructions state the file(s) can be found at a said location, however I was unable to navigate to the specified location until I began randomly unzipping each & every file contained in the installer package. Actually, I had to re-download fresh copies to learn this because I was originally under the impression that I had been shipped an outdated CD, being that the first link right at the top of the index.html located in the root of the CD that comes with the plugs points to "Marvell: Page Not Found" (http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp).

Once I unzip something whose name seems similar to that which I've been directed to find something in, when I look there I don't see the file I expect to find, namely a .gz file, but rather a .bz2 file named similarly to the one I'm directed to locate by the README.txt file.

When the instructions say to locate a file called uimage, instead I find a file called something-uimage-somethingsomething.

I never found anything close to modules.tar.gz.

Rather than something called uImage.initrd, instead I was able to locate a few called something-rd-somethingsomething, or also some-rd-thingsomething, and yet another somewhere else called somethingsomethingsomething-rd-something.


The contents of your US stick should be something like:
-rwxr-xr-x  1 root root      1853 Aug 20  2009 README.txt
-rwxr-xr-x  1 root root   3331626 Aug 19  2009 initrd
-rwxr-xr-x  1 root root   3561533 Jul 23  2009 modules.tar.gz
-rwxr-xr-x  1 root root 136517388 May 27  2009 rootfs.tar.gz
-rwxr-xr-x  1 root root   2620504 Jul 23  2009 uImage
-rwxr-xr-x  1 root root      2671 May 27  2009 ubuntu-sheevaplug.sh

I have several different USB sticks prepared for different plugs (and OSes); the above example is taken from my standard (white, non-eSATA) plug.

If you can't find any of these files, you can ask. Don't be looking on the CD for them, get them from the downloaded installer package

http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=5

Quote
With that, you already have my $40 US to re-flash the plug, I'll have it to the Post Office today providing I receive the address confirmation in my email- which I expect I will since staff replies have indeed been timely & responsive thus far, thank you.

------------------------------------

I've gone ahead & unboxed the second plug I ordered, the white one- and booted it from it's internally installed OS.
I missed the output of it's first boot because it was on a different COM port than the black one.

I had to power cycle to reboot it since when I pointed Putty.exe to the right port to connect, the console didn't respond to me pressing <Enter> in it.
I caught the output of it's second ever boot & I see the same error messages stream by as I see on the bricked one, except in this case it's not affected by them- it plows through & reaches a logon prompt.

This is the part that seems to stop the black one in it's tracks:

Hit any key to stop autoboot:  0
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK


It's trying to boot from SD card (which is fine, you presumably have a multiboot setup), but since no SD card is inserted, or if one is, it isn't properly prepared, it then drops down to NAND. And fails, because it can't find the kernel.

Quote
-------------------------------------------------------------
My black SheevaPlug stops here, the white one continues past the following & reaches the logon prompt:
-------------------------------------------------------------



## Booting image at 00800000 ...
   Image Name:   Linux-2.6.32.7
   Created:      2010-02-10  21:21:03 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822164 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK



Is this normal for when they're new?


Not for ex-factory models, which aren't multiboot. For multiboot plugs, other than the NAND failure in your white plug, yes.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!