maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Repartitioning 16GB SDHC back to FAT (https://talk.maemo.org/showthread.php?t=15746)

ghoonk 2008-01-27 04:55

Repartitioning 16GB SDHC back to FAT
 
After spending a whole night trying to get the latest OS2008 to boot from my MMC and failing miserably, I've decided to go back to booting from flash

However, I'm now stuck with a 16GB SDHC that Windows only recognizes as 14GB since there's a LINUX partition in there.

How do I repartition the SD back to a full FAT system?

I tried

sudo gainroot
umount /media/mmc2
sfdisk /dev/mmcblk0 -uM
1,,0C
<enter>
<enter>
<enter>

Then I get a message saying

Warning: No primary partition is marked bootable (active). This does not matter for LILO, but the DOS MBR will not boot this disk.

At which point I chickened out.

Rather than risk corrupting my SD beyond repair, what is the correct command to use to get this SD back to a full FAT system?

Johnx 2008-01-27 05:45

Re: Repartitioning 16GB SDHC back to FAT
 
That message is normal and expected. All that it means is that you can't install windows on it and expect to be able to boot your desktop off of it until you mark the partition as bootable.

-John

nhanquy 2008-01-27 06:22

Re: Repartitioning 16GB SDHC back to FAT
 
I think maybe there is an easy way to re-partition it under windows.

1. Put the SD to the external slot of the N8x0
2. Connect the supplied cable from the windows PC and the N8x0
3. Right click on "My Computer" choose "Manage"
4. Click "Disk Management" to find the SD
5. Pay attention to the SD label,size,.... then select it to re-partion, format, ...

ghoonk 2008-01-27 06:37

Re: Repartitioning 16GB SDHC back to FAT
 
Problem is, Windows Vista absolutely REFUSES to acknowledge the card. I tried it with another SD card that i use for trackday datalogging and that turned up fine.

John, if i proceed to format the card using those commands, then run mkdosfs on that partition, it should be readable from Windows again, right?

ghoonk 2008-01-27 06:49

Re: Repartitioning 16GB SDHC back to FAT
 
Just ran the commands in my first post.

Internal memory card is no longer recognized by the tablet. How do I get it working again?

Urgent advise required, HELP!

Johnx 2008-01-27 08:03

Re: Repartitioning 16GB SDHC back to FAT
 
Put the card into your internal slot and do:
mkdosfs -F32 /dev/mmcblk0p1

If that doesn't work post the error message.

ghoonk 2008-01-27 08:42

Re: Repartitioning 16GB SDHC back to FAT
 
Hi John

That seems to work -- the Memory applet now shows that i have 492.8MB available as 100% of my 16GB SDHC.

I have run an sfdisk -ls and it shows that /dev/mmcblk0p4 has somehow grabbed the remaining storage. Info from sfdisk is as follows:

/home/user # sfdisk -ls
/dev/mmcblk0: 15694336

Disk /dev/mmcblk0: 490448 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 1 15800 15800 505600 c W95 FAT32 (LBA)
/dev/mmcblk0p2 0+ 0 1- 31+ 83 Linux
/dev/mmcblk0p3 15801 490447 474647 15188704 83 Linux
/dev/mmcblk0p4 0 - 0 0 0 Empty
/dev/mmcblk1: 123008

Disk /dev/mmcblk1: 3844 cylinders, 4 heads, 16 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/8/32 (instead of 3844/4/16).
For this listing I'll assume that geometry.
Units = cylinders of 131072 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk1p1 0+ 960 961- 122959+ 6 FAT16
/dev/mmcblk1p2 0 - 0 0 0 Empty
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
total: 15817344 blocks


My external card is 128 MB and the internal is a 16GB SDHC

Thanks for the advice. Looking forward to getting things back to the way they were before I got ambitious.

qwerty12 2008-01-27 09:18

Re: Repartitioning 16GB SDHC back to FAT
 
I had the same problem first time; I just did:

sudo gainroot
umount /media/mmc1 (I was using removable)
sfdisk /dev/mmcblk1
1,,6 (Or I think it was 1,6)

Sfdisk still listed a linux partition but it was only like 32KB so it wasn't worth the trouble trying to delete it.

I then did mkdosfs /dev/mmcblk1p1.

ghoonk 2008-01-27 09:31

Re: Repartitioning 16GB SDHC back to FAT
 
That seems to work (it's 1,,6, btw), and I now have 14.63 GB back out of my 16GB Transcend SDHC card.

/home/user # sfdisk -ls
/dev/mmcblk0: 15694336

Disk /dev/mmcblk0: 490448 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 1 490447 490447 15694304 6 FAT16
/dev/mmcblk0p2 0+ 0 1- 31+ 83 Linux
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
/dev/mmcblk1: 123008

Disk /dev/mmcblk1: 3844 cylinders, 4 heads, 16 sectors/track
Warning: The partition table looks like it was made
for C/H/S=*/8/32 (instead of 3844/4/16).
For this listing I'll assume that geometry.
Units = cylinders of 131072 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk1p1 0+ 960 961- 122959+ 6 FAT16
/dev/mmcblk1p2 0 - 0 0 0 Empty
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
total: 15817344 blocks


Is anyone else using this Transcend SDHC card? If so, how much free space do you have off a freshly-formatted 16GB SDHC?

If you're ever in Dubai, I'm buying you a round!

ghoonk 2008-01-27 09:41

Re: Repartitioning 16GB SDHC back to FAT
 
Hang on, it's saying FAT16.

It was LBA before -- do I need to reformat it for LBA or will a FAT16 be more efficient? Which is a more efficient filesystem?


All times are GMT. The time now is 14:28.

vBulletin® Version 3.8.8