Help ,i Need To Format My Sd


paddy

Active Member
Joined
Sep 11, 2008
Messages
784
Website
Visit site
Hi ,i need to format my sd on my pandora as i have been messing around with a ubuntu.img and messed things up ,the sd no longer shows on windows so the only way i can format it is via linux ,the pandora could do it for me but i have no idea how to format my sd on the pandora ,i tried to install gparted but i have no idea if it's in the repo as the repo seems to be down.
 
Your partition is nackered. In windows, go to Control Panel, Administrative tools, Computer Management, Disk Management option. In the lower right, find the "disk" which corresponds to your SD card when it's inserted. Delete any partitions that are on it and create a new one by right clicking on it and choosing the appropriate commands.
 
nope ,the card wont read as i have been using my camera to connect it up and then transfer files ,but now my camera doesn't detect the card otherwise i would have done ther windows managment format ,i don't have a card reader ,and on the ps3 it only saw the ubuntu pertition and deleted the data off it but still not readable in my camera ,i am trying to think of another way to connect it to windows directly ,but not sure ,i know linux would see this no probs and give formatting options for the partitions.


mabe ill run my ubuntu desktop install and format the card in the format util ,but the pandora would be better for this. - on thinking ! that wont work becase the camera is still saying no to the card before it gets to the os.
 
paddy said:
nope ,the card wont read as i have been using my camera to connect it up and then transfer files ,but now my camera doesn't detect the card otherwise i would have done ther windows managment format ,i don't have a card reader ,and on the ps3 it only saw the ubuntu pertition and deleted the data off it but still not readable in my camera ,i am trying to think of another way to connect it to windows directly ,but not sure ,i know linux would see this no probs and give formatting options for the partitions.


mabe ill run my ubuntu desktop install and format the card in the format util ,but the pandora would be better for this. - on thinking ! that wont work becase the camera is still saying no to the card before it gets to the os.

Nope im in ubuntu now on my desktop but as i thought the camera doesn't send to the desktop so the card or device can't be seen.


I really need to format my card on the pandora as the pandora see's my card no probs as its directly connected but i don't know how to format ,any help guys.
 
Last edited by a moderator:
In Ubuntu? Okay.
Open a terminal.
Plugin the SD Card.
Find out which device it is by typing dmesg (the device name (probably something like sd*) will appear at the end).
If Ubuntu did an automount, unmount the card.

Type:
sudo fdisk /dev/sd* (replace the sd* with the card you found in dmesg).

Check that it REALLY is the card before continuing (fdisk will show the size of the medium, should be helpful finding the card).
Delete all partitions on the card using the "d" command.

Write the card with the "w" command.

Exit.

You should now be able to format the card in Windows. If not, you have changed some sector sizes, etc.
The Panasonic SD Formatter (Windows program) should be able to fix it though.
 
It should be "sudo mkfs.vfat /dev/mmcblk0p1" for your left slot, or "sudo mkfs.vfat /dev/mmcblk1p1" for your right slot.
I'd make sure you only have the one card in when doing this incase you get the slot wrong!

That's if you're wanting to do it on the Pandora, that is.
And that assumes your partition table is correct ;)

Or do what Ed suggests, which will work too if you replace it with /dev/mmcblk0 or /dev/mmcblk1
 
Ed ,will that work on the pandora ?


i am getting command not found on the pandora.
 
paddy said:
nope ,the card wont read as i have been using my camera to connect it up and then transfer files ,but now my camera doesn't detect the card
Wow, ok, I understand.
I don't know for sure if any of this will work, since I don't know if the necessary stuff is installed on the Pandora.
Code:
sudo umount /media/mmcblk0p1
sudo mkdosfs /dev/mmcblk0p1
I don't think mkdosfs is installed on the Pandora by default, though, and I don't know which package it is in. :(
 
Last edited by a moderator:
paddy said:
Ed ,will that work on the pandora ?


i am getting command not found on the pandora.

Eh? I thought you said you're on Ubuntu?
 
Last edited:
pandora:~$ sudo umount /media/mmcblk0p2
umount: /media/mmcblk0p2: not mounted

pandora:~$ sudo mkdosfs /dev/mmcblk0p2
sudo: mkdosfs: command not found

im on pandora and need to format card Ed.



mount command

pandora:/media/disk$ mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,bulk_read)
proc on /proc type proc (rw)
tmpfs on /mnt/.splash type tmpfs (rw,size=40k)
sysfs on /sys type sysfs (rw)
none on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /var/volatile type tmpfs (rw)
tmpfs on /dev/shm type tmpfs (rw,mode=777)
tmpfs on /media/ram type tmpfs (rw)
ubi1:boot on /boot type ubifs (rw)
/dev/mmcblk0p2 on /media/disk type vfat (rw,sync,nosuid,nodev,uid=1000,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=winnt)
pandora:/media/disk$

following Ed's instructions i get this,i have tried to unmount the sd but it wont let me.

Unable to open /dev/mmcblk0p1
pandora:/media/disk$ (seems to work on sd 2 nect to the volume)

ok now i am in ,if i type (d) i get (no partition is defined yet

I want to wipe the entire sd removing all partitions ,don't know if i can do that as it is asking for the manes of the partitions.

man gparted would have this sorted ages ago.
 
pandora:~$ sudo fdisk /dev/mmcblk0p1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb7c60014.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
pandora:~$ sudo fdisk /dev/mmcblk0p1

hell knows what to do now?

btw ,doesn't the pandora show on ubuntu if the usb cable is plugged in ? mabe i could see my card there and format ,but then again since i have been following Ed's commands my card no longer shows on the pandora as i don't think it has a file system anymore.

managed to create a new table and then format in gparted on ubuntu via the camera.

ps ,thanks WizardStan and Stuckie for your help ,Ed if you are going to help can you be a bit more specific as i have never used a command like formatting tool in my life and the prompts on the pandora were not so clear and just about killed my card but its ok now i think ,yep the card is fine and formatted in good ole fat32 showing full size.

i will personaly be trying to get gparted on the pandora ,it is needed big time.

ok i need more help ,my sd shows up as two partitons and wont access any of them but windows and ubuntu see one partition and can read write to it,formatting the pandora didn't fix this.

fuck :(
 
paddy said:
pandora:~$ sudo fdisk /dev/mmcblk0p1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb7c60014.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

...

Here's a problem - don't include the p1 (or p2) here. It should be

sudo fdisk /dev/mmcblk0

Now you can delete the partitions like ED suggests and then fix it with a normal re-formating (such as with the camera's own format option)
 
Last edited by a moderator:
Yeah, /dev/mmcblk* is the individual disks, which is, what you want to create partitions on (fdisk). All partitions on the disk should be unmounted before doing this.

/dev/mmcblk*p* are the partitions, which you format (fsck). Only the partition you wish to work on needs to be unmounted before doing this.

I'd honestly invest in a plain card reader. If you go through the camera, it might do some odd translation or something and while it may not cause problems, it may do things like waste space or have stuff not be written where you expect or other limitations (or like in this case, do something retarded when the card ends up being corrupt.).
 
Back
Top