If you've messed up your eMMC Card - Solved
#1
After some problems with my 0.6.44 install, I decided to go for a fresh installation.

I tried to wipe my 64GB eMMC to carry out a fresh install but whatever I did, it was no longer accessible by Etcher in Win 10 or Linux (Xubuntu 18.04). I tried many things such as deleting partitions in gparted, but gparted could not delete partitions nor set up a new partition table.

Both Win10 and Linux insisted that the eMMC was only 32MB in size, so I was stuck, however I was able to load xenial mate image 0.5.15 onto a SD Card, and use the pin shorting method to get this onto the eMMC card, as described in the wiki article. Pine wiki rock software releases

That ran fine, so I knew that the eMMC card was not faulty, however I also knew that the update would break the OS, which it duly did.

Eventually, out of desperation, I flashed an SD Card with aufan's 0.6.44 image and running that, with the eMMC installed, I managed to do the following on the Rock 64

  1. Through gparted, I deleted the main root partition, the one that was over 50gb in size.
  2. I ran /usr/local/bin/rock64_reset_emmc.sh (sudo ./rock64_reset_emmc.sh) (I took a clue from the wiki - noobs - troubleshooting your device, although the advice was for the Pine64 and was about using /ussr/local/sbin/update_script.sh which was not available for the rock64 - yes I was getting desperate with what appeared to be a dead eMMC card)
I've no idea which of those sorted out the problem, but I was able to reinstall ayufan's
Code:
bionic-lxde-rock64-0.6.44-239-arm64.img.xz
under Win10. Note, Etcher through Linux still insisted that the eMMC card was a 32mb card, but Win10 Etched saw it as a 64gb card with multiple drives.

I'm hoping that this might help someone else who thinks they might have destroyed their eMMC card. I'm assuming that I did some damage to the uboot(?) partition but, really, I have no idea what I did wrong except by trying to wipe everything off the eMMC Card in the first place.

I'm sure someone out there knows a simpler way to restore your eMMC card.
PinePhone Beta 2GB/16GB Postmarket OS v23.06.1 Phosh 0.30.0 (not in use)

PineTab2 Arch Danctnix 6.4.2
  Reply
#2
(07-02-2018, 04:59 AM)gregb49 Wrote: <words>
Eventually, out of desperation, I flashed an SD Card with aufan's 0.6.44 image and running that, with the eMMC installed, I managed to do the following on the Rock 64

  1. Through gparted, I deleted the main root partition, the one that was over 50gb in size.
  2. I ran /usr/local/bin/rock64_reset_emmc.sh (sudo ./rock64_reset_emmc.sh) (I took a clue from the wiki - noobs - troubleshooting your device, although the advice was for the Pine64 and was about using /ussr/local/sbin/update_script.sh which was not available for the rock64 - yes I was getting desperate with what appeared to be a dead eMMC card)
I've no idea which of those sorted out the problem, but I was able to reinstall ayufan's
Code:
bionic-lxde-rock64-0.6.44-239-arm64.img.xz
under Win10. Note, Etcher through Linux still insisted that the eMMC card was a 32mb card, but Win10 Etched saw it as a 64gb card with multiple drives.

I'm hoping that this might help someone else who thinks they might have destroyed their eMMC card. I'm assuming that I did some damage to the uboot(?) partition but, really, I have no idea what I did wrong except by trying to wipe everything off the eMMC Card in the first place.

I'm sure someone out there knows a simpler way to restore your eMMC card.

In Windows, you can do almost the same thing as gparted to your sd- or emmc-cards. A wipe is great in case you've screwed the blocks or you have an invalid partition table.
Quick howto of Diskpart.exe:

Code:
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB      0 B        *
  Disk 1    Online          465 GB  1024 KB        *
  Disk 2    Online          931 GB      0 B
  Disk 3    Online          931 GB      0 B
  Disk 4    Online          113 GB      0 B        *
  Disk 5    Online           29 GB    26 GB
DISKPART> select disk 5
Disk 5 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART>



The card now has an empty, unformatted partition that spans the entirety of that card. You can access (or write to) this partition from Etcher, Win32DiskImager, Rufus or any other sd/emmc writer tool (unless it's shit). If you want to check for bad blocks or check the integrity of the card etc, I advice to format it with SDCard Formatter.
  Reply
#3
Thanks. I bear that in mind next time. The problem with both windows and Linux was that the tools only saw the eMMC card as a 32mb, thats mb, card. Nothing I tried such as data recovery, or check disk would allow the OS to see the card as a 64gb card, so I could not wipe it. There were other partitions, but neither OS seemed to be able to see them until, in desperation, I tried every thing I could think of, as detailed above.
PinePhone Beta 2GB/16GB Postmarket OS v23.06.1 Phosh 0.30.0 (not in use)

PineTab2 Arch Danctnix 6.4.2
  Reply
#4
I'm pulling facts directly from my ass here, so read with caution:
I assume you saw some kind of proprietary protected volume containing some bootloader or kernel files. If that partition has a descriptor unknown to the host OS or if the host OS doesn't understand the partition layout, it'll default to only showing the primary chunk on the first readable partition.

There are probably others on this forum that can give you a proper answer as to what and why that tiny partition exists in the beginning of the drive.
  Reply
#5
(07-03-2018, 01:04 PM)CaptainZalo Wrote: I'm pulling facts directly from my ass here, so read with caution:
I assume you saw some kind of proprietary protected volume containing some bootloader or kernel files. If that partition has a descriptor unknown to the host OS or if the host OS doesn't understand the partition layout, it'll default to only showing the primary chunk on the first readable partition.

There are probably others on this forum that can give you a proper answer as to what and why that tiny partition exists in the beginning of the drive.

Almost Capt'n Wink Etcher wouldn't have cared in the slightest about the reserved partitions... it should have looked at the entire drive size, and gone, 64GB eMMC... yummy! 

Windows won't understand the other filesystems, so will grumble at best with all but the /boot partition (#6). Partitions 1-5 are for uboot, kernel, and loader stuff. Partition 7 is the OS / root partition. I would have thought that gdisk would have had no trouble nuking all the partitions, but as he pointed out, something strange was going on, so diskpart probably wouldn't have worked either. Would be interesting to know the why behind that... and thus also why the 'reset' worked.
  Reply
#6
(07-03-2018, 06:01 PM)pfeerick Wrote: ... Would be interesting to know the why behind that... and thus also why the 'reset' worked.
Yes. Meanwhile I'm sticking to trialling rebuilds on sd  cards and retaining my working eMMC card in its working state, while I try to explore a problem or two - ie mythtv not running and libreoffice crashing.
I'm just grateful to have a working desktop that does most standard desktop tasks.
PinePhone Beta 2GB/16GB Postmarket OS v23.06.1 Phosh 0.30.0 (not in use)

PineTab2 Arch Danctnix 6.4.2
  Reply
#7
I did once mess up the eMMC Card on my Odroid XU4. Hardkernel has a eMMC Bootloader Recovery tool that, will recover the boot loader. As they say, the:
Quote:".. boot loader is placed on the Boot Partition(Hidden Partition) in the eMMC memory. .. When it is corrupted or you want to use the eMMC with other different board, you must install the proper boot loader in the eMMC."
  That would have been my next step if all my previous ones had failed, but, of course, that meant taking down two computers instead of just one.
Maybe some clever coder can write one for the Pine boards, or am I the only one to mess up my eMMC card?
PinePhone Beta 2GB/16GB Postmarket OS v23.06.1 Phosh 0.30.0 (not in use)

PineTab2 Arch Danctnix 6.4.2
  Reply
#8
I generally find that SD Formatter will restore most SD cards to their former glory. I use it any Sandisk cards that show signs of stubbornness https://kb.sandisk.com/app/answers/detai...sdxc-cards
  Reply
#9
(07-04-2018, 09:57 AM)Rocklobster Wrote: I generally find that SD Formatter will restore most SD cards to their former glory. I use it any Sandisk cards that show signs of stubbornness https://kb.sandisk.com/app/answers/detai...sdxc-cards

Thanks. I should have remembered that there was such a tool. I've just used the one that you pointed to to restore a miscreant Sandisk Ultra 32GB, successfully. If I get eMMC trouble again, I'll try the SD Formatter on it.
PinePhone Beta 2GB/16GB Postmarket OS v23.06.1 Phosh 0.30.0 (not in use)

PineTab2 Arch Danctnix 6.4.2
  Reply
#10
I have had the same problem periodically in the past find it to be really annoying.  In fact, then I put the card in the PC about 7 partitions showed up which was screwy.

The problem that I had with tools like SD formatter is that if the OS sees all the partitions then I found that SDF did not understand that they were all part of one storage device.  Of course, I could have done something wrong.

I have found two hacky solutions.  However, YMMV particularly with option 1 and so be warned!

1. Put microSD in SD adapter and format in my camera(!).  Yes, strangely, enough it works.  That does not help for eMMC though.
2. Use my Mac to format it.  This works okay too and should work for the eMMC with the adapter.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem with debian emmc boot G4zCDzWb 10 1,675 11-01-2024, 04:32 PM
Last Post: bits
  Debian installation via sd card oaFJSADBKV 0 115 10-12-2024, 10:24 AM
Last Post: oaFJSADBKV
  Buildroot 2021.08 not booting from SD card jimmy 1 2,453 11-08-2021, 02:25 AM
Last Post: hunderteins
  Debian (Vanilla) on Rock64 and eMMC - how ? as365n4 4 6,112 09-21-2020, 04:33 AM
Last Post: as365n4
  Display limited to 800x600 [SOLVED] Averell 16 21,251 06-05-2020, 11:07 PM
Last Post: ab1jx
  Nextcloudpi SD card fills up. default_user8 13 19,109 12-04-2019, 01:30 PM
Last Post: Rocklobster
Question [SOLVED] Alpine Linux won't boot rock7 1 6,566 10-22-2019, 04:30 PM
Last Post: rock7
  Clone the SD to eMMC tagyro 1 3,768 02-06-2019, 06:55 AM
Last Post: evilbunny
  Repair corrupt root filesystem on emmc David82 1 4,090 01-31-2019, 01:11 PM
Last Post: Tozzi
  Migrate Linux from microSD to onboard eMMC elik745i 7 11,235 11-03-2018, 08:23 AM
Last Post: mara

Forum Jump:


Users browsing this thread: 1 Guest(s)