maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N810 (https://talk.maemo.org/forumdisplay.php?f=28)
-   -   Internal Memory Card: Can you 'cat /proc/partitions' for me? (https://talk.maemo.org/showthread.php?t=14416)

janozaurus 2008-01-05 00:47

Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
I'm worried that something with my built-in memory card is wrong. Can someone who owns a N810 do me a favour:

Open a Terminal on the tablet and type
Code:

cat /proc/partitions
On my device mmcblk0p1 is bigger than mmcblk0, which is strange.

Optionally, if you're on a linux computer, attach the tablet via USB and do the same on the host computer. If you're as confused as I am, read dmesg.

Thank you.

brendan 2008-01-05 01:00

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
n800

major minor #blocks name

31 0 128 mtdblock0
31 1 384 mtdblock1
31 2 2048 mtdblock2
31 3 2048 mtdblock3
31 4 257536 mtdblock4
254 0 3979776 mmcblk0
254 1 3975680 mmcblk0p1
254 8 7902720 mmcblk1
254 9 7902712 mmcblk1p1

lma 2008-01-05 03:41

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
N810:

Code:

major minor  #blocks  name

  31    0        128 mtdblock0
  31    1        384 mtdblock1
  31    2      2048 mtdblock2
  31    3      2048 mtdblock3
  31    4    257536 mtdblock4
 254    0    1966080 mmcblk0
 254    1    1966072 mmcblk0p1
 254    8    7977472 mmcblk1
 254    9    7973376 mmcblk1p1

The internal memory "card" is mmcblk0 and contains only one partition (mmcblk0p1) which is slightly smaller than the whole device here. In more detail:
Code:

Nokia-N810-50-2:~# sfdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 61440 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          0+  61439  61440-  1966072    b  W95 FAT32
/dev/mmcblk0p2          0      -      0          0    0  Empty
/dev/mmcblk0p3          0      -      0          0    0  Empty
/dev/mmcblk0p4          0      -      0          0    0  Empty

You should be able to fix it by unmounting it, running sfdisk on it to delete and recreate the first partition and finally using mkfs.vfat -F 32 to "format" the partition as FAT32.

Moonshine 2008-01-05 03:54

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
@Ima - Looks like you have an 8gb card in the external slot. Can I ask what you are using? Sandisk 8gb micro with a mini converter?

lma 2008-01-05 11:34

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
Yes, with the adapter reported working in https://bugs.maemo.org/show_bug.cgi?id=2672

janozaurus 2008-01-05 18:10

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
Quote:

Originally Posted by lma (Post 121145)
You should be able to fix it by unmounting it, running sfdisk on it to delete and recreate the first partition and finally using mkfs.vfat -F 32 to "format" the partition as FAT32.

EDIT
This can be done from the GUI as well. JFTR:
  1. Open File Manager
  2. Click Memory Card
  3. Select Format Memory Card from Menu
(My device speaks German. Translations guessed)
And it worked.
/EDIT

But..., does this mean Nokia sold me (and others) an internal card with a broken partition table? Don't they ever test anything? (I read people lost data on USB sticks in similar situations. IMHO, any sane system should refuse to mount this, but, of course, no one asked for MHO.)

fanoush 2008-02-14 13:28

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
Quote:

Originally Posted by janozaurus (Post 121433)
But..., does this mean Nokia sold me (and others) an internal card with a broken partition table?

Yes, looks like they did :-) Same error here with two brand new N810 devices, reported as http://bugs.maemo.org/show_bug.cgi?id=2940

kilroy155 2008-02-14 21:52

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
If I am understanding this correctlt,it appears I have the same problem:

Code:

~ $ cat /proc/partitions
major minor #blocks name

31  0    128 mtdblock0
31  1    384 mtdblock1
31  2    2048 mtdblock2
31  3    2048 mtdblock3
31  4  257536 mtdblock4
254 0 3932160 mmcblk0
254 1 3928064 mmcblk0p1
254 8 1966080 mmcblk1
254 9 2007032 mmcblk1p1
~ $

I have a 4GB removable card, so I assume that in my case the mmcblk1 is the internal card. The p1 partition appears to be larger than the card size.

I haven't noticed any problems yet, but would like to resolve this before I do. I am a newbie to this so what is the best way to solve this and lose as little as possible. Is there a way to backup or copy everything that is on the internal memory card before reformatting it, and then to copy/restore it back? It is my understanding that the internal backup utility doesn't backup everything.

Thanks

fanoush 2008-02-15 08:49

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
Quote:

Originally Posted by kilroy155 (Post 142589)
Is there a way to backup or copy everything that is on the internal memory card before reformatting it, and then to copy/restore it back?

Yes, open X terminal and run
Code:

cp -r /media/mmc2 /media/mmc1/
This should create folder named mmc2 or your external card with everything copied from internal card. To be sure, check it with
Code:

find /media/mmc1/mmc2
You should see all file names. Also output of
Code:

du -sk /media/mmc2
du -sk /media/mmc1/mmc2

should give similar number. Also after copy, check kernel log via running 'dmesg' to see if there are any i/o errors, this may be sign of data corruption in some files you copied.

After formatting copy it back via
Code:

cp -r /media/mmc1/mmc2/* /media/mmc2/
.

kilroy155 2008-02-16 06:29

Re: Internal Memory Card: Can you 'cat /proc/partitions' for me?
 
Thanks, thats what I needed. I followed those steps and the partition size looks good now.

I appear to have all the files back, but there were about seven I/O errors reported by 'dmesg' so perhaps something is corrupted. I was initially unable to format the card until I removed the virtual memory space I had allocated to it. That was still activated when I performed the copy so maybe that had something to do with the I/O errors (?)


All times are GMT. The time now is 08:52.

vBulletin® Version 3.8.8