OESF Portables Forum

General Forums => General Discussion => Topic started by: speculatrix on May 08, 2007, 06:13:56 am

Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 06:13:56 am
I installed Angstrom spitz on my 3100 (which uses the microdrive for most things) and wanted to make use of unused flash and I think I'd committed a massive cockup!

I accidentally formatted /dev/mtdblock1, which I think is the emergency recovery partition.

My Z is alive, running Angstrom OK, so I can put the data back into the partitions. I'm going to keep it powered up on charge so it won't try and reboot!

Can anyone confirm which partitions are which - mtdblock0 to 3, and perhaps let me have the data that should go into the critical ones!

thanks in desperation
 
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: koen on May 08, 2007, 06:41:39 am
Quote
I installed Angstrom spitz on my 3100 (which uses the microdrive for most things) and wanted to make use of unused flash and I think I'd committed a massive cockup!

I accidentally formatted /dev/mtdblock1, which I think is the emergency recovery partition.

My Z is alive, running Angstrom OK, so I can put the data back into the partitions. I'm going to keep it powered up on charge so it won't try and reboot!

Can anyone confirm which partitions are which - mtdblock0 to 3, and perhaps let me have the data that should go into the critical ones!

thanks in desperation
 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160761\"][{POST_SNAPBACK}][/a][/div]

In case anyone is wondering how to get that to speculatrix:

Code: [Select]
dd if=/dev/mtdblock1 of=outfile; gzip outfile
and put outfile.gz online somewhere
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 07:44:40 am
Quote
In case anyone is wondering how to get that to speculatrix:

Code: [Select]
dd if=/dev/mtdblock1 of=outfile; gzip outfile
and put outfile.gz online somewhere
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160763\"][{POST_SNAPBACK}][/a][/div]

nice one, thanks.

BTW, on the 3100, which mtdblock partitions are which? I've googled around and there's no one definitive place... where is the power-on-self-test stuff and maybe the D+M menu and OK menu stuff? Didn't some older Zauruses have some NOR memory where the Arm CPU starts up?
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: Capn_Fish on May 08, 2007, 07:52:34 am
Does it matter if I have pdaXrom with uBoot? If it's OK, I'll post it ASAP.
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: Capn_Fish on May 08, 2007, 07:59:28 am
Here it is. No idea if it will help, but hey.
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 09:50:30 am
Quote
Here it is. No idea if it will help, but hey.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160768\"][{POST_SNAPBACK}][/a][/div]

thanks for that... I'll grab a copy... whatever happens I'd rather put that on my Z than leave it as it is, at least if it resets there'll be something there, I'm panicky that something will crash and my Z will be totally bricked.
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 10:11:52 am
ah yes, your mtdblock1 file is u-boot...
Code: [Select]
strings /home/paulm/download/zaurus/mtdblock1.pdax | more
@ #!
@c P
TSIL
0a0,0
0b0,
0n0
@ c!
!1C "
U-Boot 1.1.4 (Sep 15 2006 - 11:38:19)
nand
e03f
I'll put it there anyway... scary!
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 11:44:01 am
Code: [Select]
root@c3100:/media/card/zaurus/rescue$ wc -c /dev/mtdblock1
7340032 /dev/mtdblock1
root@c3100:/media/card/zaurus/rescue$ ll
drwxr-xr-x    2 root     root         4096 Jun  7 15:00 ./
drwxr-xr-x    6 root     root         4096 Jun  7 14:59 ../
-rwxr-xr-x    1 root     root      7340032 Jun  7 15:16 mtdblock1.pdax
root@c3100:/media/card/zaurus/rescue$ cat mtdblock1.pdax > /dev/mtdblock1
root@c3100:/media/card/zaurus/rescue$ md5sum mtdblock1.pdax
da5d4d27561e0ccd8288333191440aba  mtdblock1.pdax
root@c3100:/media/card/zaurus/rescue$ md5sum /dev/mtdblock1
da5d4d27561e0ccd8288333191440aba  /dev/mtdblock1

well, this is much safer. does Angstrom install replace contents of mtdblock1? I suspect my Z is now an odd mix of pdaX boot with Angstrom runtime.

--edit--
still hoping someone with Sharp or Cacko on C3100 can supply their mtdblock1.gz file, thanks!
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: Jon_J on May 08, 2007, 12:37:03 pm
Code: [Select]
dd if=/dev/mtdblock1 of=outfile; gzip outfile
14336+0 records in
14336+0 records out
This is from my Sharp/Cacko C3100 (outfile.gz is inside outfile.zip)

EDIT:
I'm not sure how this will work, but I followed koen's instructions exactly, "as root" in konsole.
Looking at Capn_Fish's file with winrar, it contains
.\outfile
Mine is slightly different, as it contains
outfile
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 08, 2007, 06:39:52 pm
Quote
I'm not sure how this will work, but I followed koen's instructions exactly, "as root" in konsole.
Looking at Capn_Fish's file with winrar, it contains
.\outfile
Mine is slightly different, as it contains
outfile
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160799\"][{POST_SNAPBACK}][/a][/div]

thanks for that,  I will give it a go. I might even dare try rebooting my Z then.
 
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 10, 2007, 08:29:45 am
uh-oh, I needed to reboot my Z and now it is totally dead... not even the charge light comes on, removed the battery and left it for a long time too. I am really scared that I have bricked it completely... feelings of panic and fear, like WTF do I do next (and nervous about making things worse).
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: pelrun on May 10, 2007, 08:41:03 am
Can you get into the Fn+D+M menu? I think we were pretty certain it was in rom, so it shouldn't get toasted if the flash was wiped...
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 10, 2007, 09:25:34 am
Quote
Can you get into the Fn+D+M menu? I think we were pretty certain it was in rom, so it shouldn't get toasted if the flash was wiped...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160948\"][{POST_SNAPBACK}][/a][/div]

YES, thank God... and thank you Trisoft for providing a convenient SYSTC310.dbk.zip file!!!
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 10, 2007, 09:33:14 am
restoring now... oh well, bye bye Angstrom, hello Sharp ROM :-)
--edit-- Bye bye Sharp, hello OpenZaurus 3541! Now I hope to try getting TomTomGo to work on it.


BTW, I do not think the zaurus has a separate ROM.

I've googled around a lot to try and understand the 3x00 memory layout but what exists is a bit patchy.

My guess is that the CPU initialisation stuff, zaurus power-on-self and  D+M menus etc are in a locked flash segment at the beginning of flash (hopefully it's hard-wired as read only), then there's the OK menu in mtdblock0, the user kernel and initrd (uboot on pda, altboot on OZ/Angstrom etc) in mtdblock1, then root in block2 and home in block3?
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: pelrun on May 10, 2007, 10:55:25 am
Woo! It lives again!

Quote
BTW, I do not think the zaurus has a separate ROM.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160956\"][{POST_SNAPBACK}][/a][/div]
I'm looking at the 64mbit P2ROM on the schematic right now.
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 10, 2007, 11:38:12 am
Quote
Woo! It lives again!

Quote
BTW, I do not think the zaurus has a separate ROM.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160956\"][{POST_SNAPBACK}][/a][/div]
I'm looking at the 64mbit P2ROM on the schematic right now.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160960\"][{POST_SNAPBACK}][/a][/div]

ah, then I stand corrected, thanks! do you have a workshop manual then, or are you looking at hires photos of the PCBs?

I'd be curious to know a bit more about the flash config, whether its got hardware partitioning enabled, any write-locked regions, and what's in each?
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 10, 2007, 05:22:43 pm
Oh, and lest I forget, thanks to everyone again. The zaurus community is a wonderful thing.

If I ever win the lottery I shall pay for a zaurus convention and pay everyone's travel costs to come!
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: dlj0 on May 16, 2007, 01:24:51 pm
Quote
I installed Angstrom spitz on my 3100 (which uses the microdrive for most things) and wanted to make use of unused flash and I think I'd committed a massive cockup!

I accidentally formatted /dev/mtdblock1, which I think is the emergency recovery partition.

My Z is alive, running Angstrom OK, so I can put the data back into the partitions. I'm going to keep it powered up on charge so it won't try and reboot!

Can anyone confirm which partitions are which - mtdblock0 to 3, and perhaps let me have the data that should go into the critical ones!

I think you are in big doo-doo.  Angsstrom actually stores the kernel image there.  That device is the 128M flash ram that is mounted on / in 2.4 kernels.  

But you can restore the Sharp rom and start over....
Title: Uh-oh, Wiped My /dev/mtdblock1 Device
Post by: speculatrix on May 16, 2007, 02:10:38 pm
Quote
I think you are in big doo-doo.  Angsstrom actually stores the kernel image there.  That device is the 128M flash ram that is mounted on / in 2.4 kernels. 

But you can restore the Sharp rom and start over....
[div align=\"right\"][a href=\"index.php?act=findpost&pid=161466\"][{POST_SNAPBACK}][/a][/div]

yeah, that's what I had to do...  I should have remembered D+M menu recovery, but I was too busy panicking to think straight!