maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   SD card ext2/3/4 multiple partitions mount problem (https://talk.maemo.org/showthread.php?t=89619)

Il_Principe 2013-03-26 21:28

SD card ext2/3/4 multiple partitions mount problem
 
Hi.
I've three partitions on my sd card: the first one is an ext4 and the others are swap.
I've a strange problem: in /media i can see two folder (mmc1 and mmc1p1) and normally the ext4 is mounted in the first one, but after a connection to pc with usb it's moved to second and of course everything goes wrong (tracker, etc.).
How can I solve it?
Thanks in advice.

Edit:
As reported in post 11, the problem occours only if there are multiple partitions on sdcard and the first one is an ext filesystem.

Wikiwide 2013-03-27 12:28

Re: SD partition mount problem
 
Bumping the thread...
Best wishes.

michaaa62 2013-03-27 14:45

Re: SD partition mount problem
 
Looks to me like the crippled maemo system does not recognize as the filesystem it had mounted before, but found a unknown new partition.
Did you ever create that mmc1p1 mount point manually?
Did you try to again export the partition via USB to your PC? Do you get just another mount point, is it reverting to your first mount point?
Did you consider or how did you expand /etc/fstab to know about that partition?

Il_Principe 2013-03-27 21:09

Re: SD partition mount problem
 
I didn't create any mount point.
I did all three partition directly on mmc with gparted then I put the card in the n900.
I've also deleted every partition and then created again (also only the ext4), but without results.
I didn't modify my /etc/fstab, because i didn't consider essential.
Today I realize that if I use the swap on sd, the ext4 sometimes moves on mmc1p1 mount point.
Tomorrow I'll try changing the partition to ext3.

dvb 2013-04-01 13:41

Re: SD partition mount problem
 
+1

I made 2 partitions on my microSD: ext2 + swap. Now I have the same behaviour: after reboot ext2 mounts to mmc1, but after connecting/disconnectingto a PC it is remounted at mmc1p1.

Is there any way to avoid that besides editing fstab generation script?

peterleinchen 2013-04-01 14:14

Re: SD partition mount problem
 
Afair the ke-recv has only support for auto mounting a vfat partiion on first partition.
There is some news in TMO about this and a newer version (probably from pali).

Il_Principe 2013-04-03 22:58

Re: SD partition mount problem
 
Looking for Pali's newer version (not found yet :( ), I noticed that with sd swap activated the ext4 partition moves from mmc1 to mmc1p1 also without usb connection giving a stability issue.

@dvb
I've found this guide for ext2, but i haven't yet tried it: http://wiki.maemo.org/Ext2_on_microSD_card
Maybe it can be the solution for our issue and a good improvement for next CSSU. ;)

Il_Principe 2013-04-04 15:17

Re: SD partition mount problem
 
Is it possible change thread's name from "SD partition mount problem" to a more meaningful "SD ext2/3/4 partition mount problem"?

sixwheeledbeast 2013-04-04 15:23

Re: SD partition mount problem
 
Quote:

Originally Posted by Il_Principe (Post 1334095)
Is it possible change thread's name from "SD partition mount problem" to a more meaningful "SD ext2/3/4 partition mount problem"?

The OP (you) can edit the title.
Click edit on the OP and update the title as you wish.

dvb 2013-04-05 05:37

Re: SD ext2/3/4 partition mount problem
 
The thread should be renamed to "SD with multiple partitions mount problem", beacause this doesn't matter what type of filesystem resides on the partition, vfat or ext2/3/4.

Il_Principe 2013-04-05 11:20

Re: SD ext2/3/4 partition mount problem
 
@ dvb
I don't encounter any problem with fat filesystem (with or without swap partitions).
But I agree for "multiple partitions": today I noticed that, if there's only one partition (fat or ext doesn't matter), it's mounted on /media/mmc1 also after a usb connection. But if there are multiple partitions on sd card and the first one is an ext filesystem then /media/mmc1p1 is created after that usb cable is disconnected.

pali 2013-04-05 14:00

Re: SD card ext2/3/4 multiple partitions mount problem
 
@Il_Principe: Support for any fileystem on any SD card partition is fixed in CSSU. Just install CSSU and it should work fine (maemo will automount all partitions)

Il_Principe 2013-04-05 16:13

Re: SD card ext2/3/4 multiple partitions mount problem
 
I have CSSU-thumb (version 7.2) on my phone...:(

pali 2013-04-05 16:30

Re: SD card ext2/3/4 multiple partitions mount problem
 
Ok, so this seems like bug in ke-recv.

Please attach syslog, maybe there will be something interesting.

How ke-recv should use mount dest:
* first FAT32 partition on SD card is mounted to /media/mmc1
* if there is no FAT32 partition, first partition (any FS) is mounted to /media/mmc1
* all other partitions are mounted to /media/mmc1p<number> where number is partition number
* max partitions on mmc devices (both eMMC and SD cards) are limited to 8 by kernel

peterleinchen 2013-04-05 22:29

Re: SD card ext2/3/4 multiple partitions mount problem
 
Hey pali,
good you stepped in here :)

A bit offtopic question to you here:
do I understand your comment about limitation of 8 partitions (in fact 7, as mmcblkx also counts as one) right this way that we have a limit of 8 per device (so 16 for N900 with SD) or is it a total limit of 8 for eMMC and SD together?
I just ask as I stumbled upon this limit with N9 partitioning where I tried to make 9 partitions (on internal and only mmcblk device). and sfdisk reported everything fine. but I could only see up to mmcblk0p7...

pali 2013-04-05 22:34

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by peterleinchen (Post 1334378)
I just ask as I stumbled upon this limit with N9 partitioning where I tried to make 9 partitions (on internal and only mmcblk device). and sfdisk reported everything fine. but I could only see up to mmcblk0p7...

This limit is in kernel mmc driver which can assign only 8 minor numbers to mmc devices. But this magic constant 8 can be changed when configuring kernel, so you can recompile kernel with for example 16 partitions limit.

peterleinchen 2013-04-05 22:54

Re: SD card ext2/3/4 multiple partitions mount problem
 
Yep, I know about that. But this does not answer my question.
Does the kernel limit is an overall limit (i.e. with 4 partitions on eMMC there is only space for another 4 on SD)?
Or is this limit per mmc device (so with eMMC and SD we have max 16)?

dvb 2013-04-08 09:18

Re: SD card ext2/3/4 multiple partitions mount problem
 
Do I understand it right, that one should install sysklogd package to attach syslog? If so, I receive the following:

WARNING: The following packages cannot be authenticated!
sysklogd klogd
Install these packages without verification [y/N]?

Is there any fix or I'd agree with unauthenticated installation? Is that because of nokia repos certificate expiration?

pali 2013-04-08 09:51

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by dvb (Post 1334795)
Is that because of nokia repos certificate expiration?

Yes, because Nokia GPG key (which signed Nokia APPS repo) expired.

Il_Principe 2013-04-08 09:52

Re: SD card ext2/3/4 multiple partitions mount problem
 
2 Attachment(s)
This is my syslog (activated before the usb connection then stopped after disconnection).
Hope this can help. ;)

Edit:
Added also syslog2.txt (started at boot, connected/disconnected with usb, then stopped).
In both I removed SSID, BSSID and IMEI

dvb 2013-04-08 11:59

Re: SD card ext2/3/4 multiple partitions mount problem
 
1 Attachment(s)
My syslog after reboot, attach USB to a PC, detach it.

Il_Principe 2013-04-08 12:26

Re: SD card ext2/3/4 multiple partitions mount problem
 
Added a new syslog to previous post: http://talk.maemo.org/showpost.php?p...4&postcount=20

dvb 2013-04-10 08:02

Re: SD card ext2/3/4 multiple partitions mount problem
 
As a temporary solution I suggest (under root):

ln -s /media/mmc1 /media/mmc1p1

dvb 2013-08-05 06:13

Re: SD card ext2/3/4 multiple partitions mount problem
 
Well, is there any bugfix for the bug with mmc1p1 mount location?

Il_Principe 2013-08-08 11:16

Re: SD card ext2/3/4 multiple partitions mount problem
 
Until this time no bugfix...:(

pali 2013-08-08 12:36

Re: SD card ext2/3/4 multiple partitions mount problem
 
@Il_Principe: I still do not know where can be problem. I compiled debug version of ke-recv with more debug messages. Can you try to use it and provide syslog after booting system (where partitions are OK) and after you unplug usb cable (when partitions are not OK)? I think this is only what I can do. Store ke-recv binary to /usr/sbin/ke-recv, make it executable and reboot phone. Link: http://atrey.karlin.mff.cuni.cz/~pali/ke-recv

dvb 2013-08-15 06:57

Re: SD card ext2/3/4 multiple partitions mount problem
 
1 Attachment(s)
Attaching my syslog. I rebooted, then plugged and unplugged the cable. It can be seen, that it uses new mountpoint because it thinks it can't unmount /media/mmc1 location due to missing gnome-mount executable.

pali 2013-08-15 07:40

Re: SD card ext2/3/4 multiple partitions mount problem
 
@dvb: no it is not because of missing gnome-mount executable.

At startup ke-recv detect one partition on your SD card. In this case when only one partition is there, it mount it directly to /media/mmc1.

When you inserted SD card again, it detected two partitions. In this case all partitions are mounted to /media/mmc1p<num> but if there is FAT partition it is mounted to /media/mmc.

So first I'd like to know how many partitions do you have on your SD card? In first or second case it badly detect number of partitions, so it does not work consistant.

And second, maybe ke-recv should mount first partition to /media/mmc1 if there is no FAT partition.

dvb 2013-08-15 12:44

Re: SD card ext2/3/4 multiple partitions mount problem
 
Code:

Nokia-N900:~# parted /dev/mmcblk1 unit b p
Model: SD SD32G (sd/mmc)
Disk /dev/mmcblk1: 32107397120B
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start        End          Size          Type    File system    Flags
 1      1048576B      29959913471B  29958864896B  primary  ext2
 2      29959913472B  32107397119B  2147483648B  primary  linux-swap(v1)


dvb 2013-08-22 10:02

Re: SD card ext2/3/4 multiple partitions mount problem
 
2Pali: So, any else info I could tell you to fix the bug?

pali 2013-08-22 10:10

Re: SD card ext2/3/4 multiple partitions mount problem
 
@dvb: now I know what is bad (look previous post), so I will try to fix or provide another debug version for more info. But wait, becuase I do not have time for it now.

freemangordon 2013-08-22 11:23

Re: SD card ext2/3/4 multiple partitions mount problem
 
@pali: https://gitorious.org/community-ssu/...769375b1b46623

Maybe not the best solution, I guess we can just keep the mountpoint for first vfat partition in mmc structure, but it works fine that way too.

There is another problem - now you can't use uSD in mass storage mode if there is a swap partition used. I am writing a patch that will unmount the first vfat partition (if any) and export it as mass storage.

pali 2013-08-22 11:37

Re: SD card ext2/3/4 multiple partitions mount problem
 
@freemangordon: in above log I see big problem: At startup it detected only one partition (this is maybe OK, because partitions without detected filesystems could be ignored - e.g. swap). But after inserting SD card again, it reported two partitions which are mountable. And because of that, path was changed... And another missing feature: Ke-recv should mount first partition to /media/mmc1 if there is no FAT partition.

freemangordon 2013-08-22 11:46

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by pali (Post 1368684)
@freemangordon: in above log I see big problem: At startup it detected only one partition (this is maybe OK, because partitions without detected filesystems could be ignored - e.g. swap). But after inserting SD card again, it reported two partitions which are mountable. And because of that, path was changed...

Could be, but that doesn't mean we're not trying to unmount /media/mmc1pN instead of /media/mmc1 for the first VFAT partition.

Quote:

And another missing feature: Ke-recv should mount first partition to /media/mmc1 if there is no FAT partition.
No, no, we can't do that, camera-ui and a couple of others will explode in our faces if we mount anything but VFAT as /media/mmc1

pali 2013-08-22 11:57

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by freemangordon (Post 1368686)
Could be, but that doesn't mean we're not trying to unmount /media/mmc1pN instead of /media/mmc1 for the first VFAT partition.

Maybe, but why after inserting second time SD card (with one ext partition) ke-recv see that SD card has two (ext) partitions?

Quote:

Originally Posted by freemangordon (Post 1368686)
No, no, we can't do that, camera-ui and a couple of others will explode in our faces if we mount anything but VFAT as /media/mmc1

What? What? What? There is bug in kernel non fat drivers? Or bugs in camera-ui app?

I do not understand how application can crash if filesystem is not vfat. I can imaginate that app crash because kernel report "you do not have permission to create new file"...

dvb 2013-08-22 12:09

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by pali (Post 1368668)
@dvb: now I know what is bad (look previous post), so I will try to fix or provide another debug version for more info. But wait, becuase I do not have time for it now.

I just wanted to be sure I supplied all the needed info. I don't demand the immediate fix, of course. Thanks!

Quote:

Originally Posted by freemangordon (Post 1368680)
There is another problem - now you can't use uSD in mass storage mode if there is a swap partition used. I am writing a patch that will unmount the first vfat partition (if any) and export it as mass storage.

Why can't it be used in mass storage? /dev/mmcblk0p1 is somehow exported as mass storage having other partitions used.

freemangordon 2013-08-22 12:13

Re: SD card ext2/3/4 multiple partitions mount problem
 
Quote:

Originally Posted by pali (Post 1368688)
Maybe, but why after inserting second time SD card (with one ext partition) ke-recv see that SD card has two (ext) partitions?

Broken card/partition table? Someone changed partition table between insertions? No idea, but it is unrelated to the wrong unmount bug.

Quote:

What? What? What? There is bug in kernel non fat drivers? Or bugs in camera-ui app?

I do not understand how application can crash if filesystem is not vfat. I can imaginate that app crash because kernel report "you do not have permission to create new file"...
Take https://bugs.maemo.org/show_bug.cgi?id=7160 for example. And I bet this is not the only application which is hardcoded to believe that /media/mmc1 is vfat and user writable. I am thinking modest, osso-backup, who knows what else. I think it will be too much of a risk to implement that.

freemangordon 2013-08-22 23:04

Re: SD card ext2/3/4 multiple partitions mount problem
 
@Pali: https://gitorious.org/community-ssu/...fa5fd381492453

Maybe it is time to release a new version in cssu-devel.

dvb 2014-02-21 11:07

Re: SD card ext2/3/4 multiple partitions mount problem
 
SOrry for opening an old thread, but is there any hope for fixing wrong mounting?

pali 2014-02-25 17:03

Re: SD card ext2/3/4 multiple partitions mount problem
 
@dvb: Support for any partition type supported by kernel should work with CSSU. There is only problem if you have multiple partitions on SD card - but this is partialy fixed in ke-recv git (do not remember what exactly and what is already pushed to CSSU).


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

vBulletin® Version 3.8.8