Author Topic: Yet Another Broken C3000  (Read 2950 times)

Stilgar

  • Newbie
  • *
  • Posts: 43
    • View Profile
Yet Another Broken C3000
« on: May 05, 2006, 09:16:48 am »
I do apologize for the long post. I have tried many things (detailed here) before asking help from this forum. At the moment (after 2 days of fiddling), there are many threads to the story. I will, however, try to make it short.

The zaurus wouldn't boot (with misc. kernel patnics) a few days ago. Figuring out I couldn't debug it, I tried getting into rescue mode with the updater.sh.rescue (an old-time friend).
That's where I had a surprise waiting. The CF card would not be recognized by the updater menu (Holding OK while powering on, then 4->1->Y). It would yell something about missing CF card and then rebooting.

Right. There's the D+B rescue boot console. Boots pretty well, except for one (not surprising by now) thing: the /sbin/cardmgr would output an error message (something like encountering an unexpected word or ")".).
Then, I could not access /dev/hdc, even for backup purpose. I'd get the error that block-major-3 is missing (as well as block-major-22 on /dev/hda). Great.

Obviously, something was wrong with the rescue boot rootfs. I could not flash a new kernel/distro, as the CF card would not be recognized by the updater (Which uses the emergency rootfs to boot when upgrading).
Using an SD card was an obvious solution along the way. However, when I use it, the updater is yelling misc messages about /var/lib/pcmcia/stab missing (which may be correct, since it's using the rescue rootfs, which is somewhat broken).

Booting again into the rescue rootfs and diagnosing things a bit, I found out that /sbin/cardmgr is broken! it's md5sum with an old version of cardmgr was different. Moreover, mounting /dev/mtdblock2 and copying cardmgr from there to /sbin/cardmgr on the rescue rootfs and then restarting pcmcia, works.
However, /dev/root on the rescue partition is /dev/ram0 -> the kernel is extracted dynamically from the rom (mtdblock1 maybe?) to the ram.

Right now, my ROM (cacko 1.23b) wouldn't boot, due to misc kernel panics, and I am unable to upgrade to any other distro (or even sharp's original rom) because the rootfs is fucked up.
What I'd like to know, is that:
1. Wouldn't a NAND restore will rewrite /dev/mtdblock1 ?
2. Is the rootfs actually taken from mtdblock1?
3. Fortunately, I have a backup of mtdblock1 I manually made after some previous restore. I would like to copy it (via dd) to /dev/mtdblock1 on my Z. However, I am unable to mount it (via loopback interface) to check what's inside and see if there I have a correct version of cardmgr. Does anyone know about the image structure of /dev/mtdblock1?

I will appreciate any help.

Stilgar

  • Newbie
  • *
  • Posts: 43
    • View Profile
Yet Another Broken C3000
« Reply #1 on: May 09, 2006, 06:37:42 pm »
Some serious advancments, still not complete:
I've had bad rootfs, so /sbin/cardmgr would fail to run. No update was possible.
Until... I took updater.sh from OZ, decoded it, and added to the beginning a few lines to copy cardmgr from mtdblock2's sbin to /sbin, then continue with the flashing.
It segfaults somewhere, but that's a progress. If anyone has ideas on how to continue, let me know.

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Yet Another Broken C3000
« Reply #2 on: May 09, 2006, 07:43:12 pm »
Quote
Some serious advancments, still not complete:
I've had bad rootfs, so /sbin/cardmgr would fail to run. No update was possible.
Until... I took updater.sh from OZ, decoded it, and added to the beginning a few lines to copy cardmgr from mtdblock2's sbin to /sbin, then continue with the flashing.
It segfaults somewhere, but that's a progress. If anyone has ideas on how to continue, let me know.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126327\"][{POST_SNAPBACK}][/a][/div]


ouch!

mtdblock1 is used by the emergency console with a limited rootfs
mtdblock2 is the normal rootfs
mtdblock3 is the home partition
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Stilgar

  • Newbie
  • *
  • Posts: 43
    • View Profile
Yet Another Broken C3000
« Reply #3 on: May 10, 2006, 05:26:47 am »
Does anyone know where I can find out the NAND rom layout?
I specifically try to get the initrd for the rescue mode boot.

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Yet Another Broken C3000
« Reply #4 on: May 10, 2006, 06:05:19 am »
Quote
Does anyone know where I can find out the NAND rom layout?
I specifically try to get the initrd for the rescue mode boot.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=126376\"][{POST_SNAPBACK}][/a][/div]

why dont you just restore the nand and backup images from trisoft to get you a working system? use D+M
« Last Edit: May 10, 2006, 06:07:10 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Yet Another Broken C3000
« Reply #5 on: May 11, 2006, 05:22:01 am »
Quote
,,
why dont you just restore the nand and backup images from trisoft to get you a working system? use D+M

This suggestion is the most useful approach since it will restore not only the root file system but also the emergency Linux system accessable via the D+B boot sequence. It will not restore contents of the hard drive if they are corrupt but at least it is a starting point.

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

Cresho

  • Hero Member
  • *****
  • Posts: 1609
    • View Profile
    • http://home.earthlink.net/~cresho/
Yet Another Broken C3000
« Reply #6 on: May 11, 2006, 05:48:43 am »
well, have you noticed any difference in audible aspect of it?  Does it sound any different?  yeah i know i know its not audible but sometimes you can get a glimps of the hardisk sound.  Have you tried yanking it out, and wiping the disk and also doing a head integrety check?  how about the D+M, have you used the tools in it to check the hardisk read write and also other tests?  I would do that first before deciding to try and partition and install anything else on it.

Dude, if you lived around the los angeles area, i can fix it for you for free   minus hardisk replacement.
« Last Edit: May 11, 2006, 05:55:03 am by Cresho »
Zaurus C-3200 (internal 8gb seagate drive) with buuf icon theme, cacko 1.23 full,  and also Meanie's pdaxqtrom-Debian/Open Office
Zaurus SL-5500 Sharp Rom 3.13 with steel theme
pretec pocket pc wi fi
ambicom bt2000-cf bluetooth-made in taiwan
simpletech 1gb cf
pny 1gb sd
patriot 2gb
ocz or patriot 4gb sd(failed after 2 weeks)only on z
creative csw-5300 speakers in stereo
DigiLife DDV-1000 for video, Audio, Picture recording playable on the zaurus
Mustek DV4500-video recorder, pictures, voice record on sd for z

zaurusthemes.biz | ZaurusVideo | Zaurus Software

Stilgar

  • Newbie
  • *
  • Posts: 43
    • View Profile
Yet Another Broken C3000
« Reply #7 on: May 12, 2006, 12:34:41 pm »
As for restoring NAND - tried that several times, both from the original Sharp's rom as well as a backup I made some time ago. The NAND restore itself worked (my backup had a different kernel, so I know it worked) but I still get the same errors. (cardmgr on boot says something like 'word unexpected').
I did have a partial success - I took the updater.sh from OZ 3.5.4.1-rc2, and added a script that replaces /sbin/cardmgr with the one from mtdblock2's /sbin. However, now the error is the kernel segfaulting somewhere when writing to the microdrive. I do not know why this is, as the R/W tests in the D+M menu do not tell of any HD error.