Author Topic: Uh-oh, Wiped My /dev/mtdblock1 Device  (Read 5075 times)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« 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
 
« Last Edit: May 10, 2007, 12:01:14 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #1 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
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #2 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?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #3 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.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #4 on: May 08, 2007, 07:59:28 am »
Here it is. No idea if it will help, but hey.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #5 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.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #6 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!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #7 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!
« Last Edit: May 08, 2007, 11:48:26 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #8 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
« Last Edit: May 08, 2007, 01:07:15 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #9 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.
 
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #10 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).
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #11 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...
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #12 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!!!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #13 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?
« Last Edit: May 10, 2007, 10:39:25 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Uh-oh, Wiped My /dev/mtdblock1 Device
« Reply #14 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.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote