Page 1 of 1

Trying to scrub internal partitions...locked? SOLVED(ish)!

Posted: Tue Mar 06, 2012 11:23 pm
by offbeatdave
I'm trying to remove all partitions on one of my Joggler's internal flash memory. However, when I try to do this in gparted via Ubuntu, even though the operations to delete the partitions complete successfully, when it refreshes, the partitions return (with mmcblk0p1 as ! unknown file system).

Am I missing something obvious here or the internal flash had it? If I try to format the first partition, the problem above still persists.

Any thoughts?

Re: Trying to scrub internal partitions...appear to be locke

Posted: Wed Mar 07, 2012 12:35 am
by joh
Maybe you could try to delete the MBR and partition table with DD. Command should be

Code: Select all

dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1
After that please reboot or try to re-read the partition table with

Code: Select all

partprobe
The kernel has a cache of the partition table.

Never tried to wipe the internal storage with DD, but on all hard drives I know the dd command works. Use at your own risk.

Re: Trying to scrub internal partitions...appear to be locke

Posted: Wed Mar 07, 2012 4:41 pm
by offbeatdave
So I tried the code above and got the output

Code: Select all

joggler@joggler:~$ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00335442 s, 153 kB/s
However,

Code: Select all

partprobe
gave no output whatsoever and the partitions are still there when I launch gparted.

Re: Trying to scrub internal partitions...appear to be locke

Posted: Wed Mar 07, 2012 5:28 pm
by offbeatdave
OK, sorted in a rather haphazard way via random googling and keeping fingers crossed.

I perhaps should have said that the reason for needing to do this was that over the last week, on this particular unit reflashing or any other restore method just would not work, even though they all went through the motions. I was starting to think that the internal flash was finished on this particular machine.

Anyway, figuring that I had nothing to lose, here is what I did:

To begin with I booted into Ubuntu - many times my saviour on Joggler projects - and telneted in via my laptop for easier typing of commands!

First I did

Code: Select all

sudo umount /dev/mmcblk0*
Then did

Code: Select all

sudo fdisk /dev/mmcblk0
This presented me with the following:
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u').
So I pressed the following

Code: Select all

c and u followed by d, n, p, enter enter and finally w.
When I went back into gparted, the whole device was now unallocated (which I previously hadn't been able to achieve), although it still wouldn't let me fix a partition table.

However, I thought I'd give the reflash tool another go. Once again, it went through the motions but, lo and behold, one the first attempt the Joggler fired up and booted straight into a nice clean stock OS! This proceedure might be useful as a last resort for those who appear unable to reflash their Joggler, even though the reflash tool appears to be running properly. I've lost count of how many times I'd tried it or used re-imaging via Ubuntu with no joy, but this worked first time. Use with caution though!

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Wed Mar 07, 2012 6:03 pm
by cbredfred
Well done!

I haven't got a clue what any of that means or does, but I hope Roobarb see's it because it might be the answer for all the Jogglers that the reflash tool doesn't fix. Two of my five Jogglers are currently candidates.

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Wed Mar 07, 2012 6:48 pm
by joh
thanks for the info, I thought you already unmounted the partitions /dev/mmcblk0*. Modern Linux distribution auto mount all file systems, which can be annoying. The dd command normally works if not I overwrite everything with zeros.

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Wed Mar 07, 2012 10:50 pm
by Mevi
I had the same problem wiping the internal flash from windows. Using minitools, just deleting the partitions didn't work... They kept coming back! Wiping the drive by writing zeros did the trick. Since doing that I've been unable to run the reflash tool on that Joggler.

Re: Trying to scrub internal partitions...appear to be locke

Posted: Thu Mar 08, 2012 12:21 am
by gegs
offbeatdave wrote:...So I pressed the following

Code: Select all

c and u followed by d, n, p, enter enter and finally w.
Is this really a line of code?

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Thu Mar 08, 2012 8:24 am
by offbeatdave
Oops! If only tech responded to such things! It'd be great wouldn't it!

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Sat Mar 10, 2012 11:10 am
by cbredfred
offbeatdave,

Are you saying that the fdisk command presents you with the ability to then issue the other commands such as "C" and "U" etc?
I'm not very clued in to Linux and with Mevi's tales of doom and gloom such as never being able to run the reflash tool, I'd like to know a bit more about what I'm doing first.
I believe the first rule of First Aid is "Never make the patient worse"...of course that's no where near as important as "Never let anyone take photos of you snogging a doll on the First Aid classroom floor!" :D
Anyway, what I was trying to say is, I don't want to make my Joggler any worse.

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Sat Mar 10, 2012 11:20 am
by Mevi
cbredfred wrote: "Never let anyone take photos of you snogging a doll on the First Aid classroom floor!" :D
No tongues. :D

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Sat Mar 10, 2012 11:27 am
by cbredfred
Flibble

Re: Trying to scrub internal partitions...locked? SOLVED(ish

Posted: Sat Mar 10, 2012 12:57 pm
by offbeatdave
cbredfred wrote:offbeatdave,

Are you saying that the fdisk command presents you with the ability to then issue the other commands such as "C" and "U" etc?
I'm not very clued in to Linux and with Mevi's tales of doom and gloom such as never being able to run the reflash tool, I'd like to know a bit more about what I'm doing first.
I believe the first rule of First Aid is "Never make the patient worse"...of course that's no where near as important as "Never let anyone take photos of you snogging a doll on the First Aid classroom floor!" :D
Anyway, what I was trying to say is, I don't want to make my Joggler any worse.
Yeah, they're options from fdisk. no idea what it does but it worked. My joggler was knackered before i did this so it was a nothing to lose job.