maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   How to download large maps with high resolution with mappero (https://talk.maemo.org/showthread.php?t=74415)

sup 2011-06-28 08:29

How to download large maps with high resolution with mappero
 
Say you want to go to a (large, as in Turkey for me) foreign country where mobile data is expensive, find out that Ovi maps (that can be downloaded like this - use the ones marked to work for 3.04) are of no use and turn to Mappero and Google Maps:cool:.

The problem is as follows. Mappero stores tiles by default in the folder /home/user/MyDocs/.maps/ which is a FAT32 partition. On N900, this means that each file takes up 64kB space no matter how small it is (some tiles Mapper downloads are just 177 bytes small, but they still take up 64kB). This information comes from here.

We will solve it by creating a loopback device (a filesystem in a file) that overcomes this limitation. We will be using ext2 filesystem - N900 wouldn't mount ext3 or ext4 for me. As we will be storing the file on N900 itself (and therefore on a FAT32 filesystem), the file can be only 4GB in size, but it should be hopefully enough. If you need more, buy a microsd card, use some saner filesystem then FAT32 on it and store the file there.

This can be (I guess) done on N900 itself, but I used my Ubuntu system (but any linux should do).
First create a file
Code:

touch .mappero_image
Then make it 4GB large (it is small enough to fit on FAT32)
Code:

dd if=/dev/zero of=.mappero_image bs=1024 count=4190208
Now create an ext2 filesystem on it:
Code:

mkfs.ext2 -i 1024 -L mappero_image_label -m 0 -b 1024 .mappero_image
(based on this and mkfs.ext2 man page)
-i switch specifies, that we will have one inode per each 1024 bytes. Since for every file we need one inode, this means we will be able to have around 4 million files in this device. This is needed because lots of files are smaller then 1024 bytes. The value could be set to 2048 or maybe even 4096 (to have 2M or 1M inodes respectively) which would probably free some more space, since inodes take up space too. You can play with that.

-L is a label, you can set it or ignore it

-m 0 specifies that superuser will not have any allocated space. He or she does not need the space anyway in this file, so we might as well use it.

-b specifies that a block size will be 1024. ext2 (or ext 3 or ext4) does not allow smaller block sizes.

Now copy .mappero_image (or whatever you call the file) to the device and mount it with
Code:

mount -o loop -t ext2 /path/to/.mappero_image /home/user/MyDocs/.maps
You may want to copy the files in .maps directory onto .mappero_image first - just mount it to some random directory, copy the things over and remount it. If mappero refuses to work, check permissions and that the file poi.db is present.

If everything works as it should, here is how we make it work automatically even after reboots. Since N900 recreates /etc/fstab on each boot, we cannot just put a line there. There are basically two ways - modify the script that autocreates fstab (which is scary, so we will not be doing that) or write a one-purpose upstart job, which is what we will do.
Create a file in /etc/event.d/ and put the following into it:
Code:

start on started rcS-late
script
        exec /etc/event.d/mount2
end script

This just starts script /etc/event.d/mount2, which we must create. The location and name of this script can of course be changed, that is what I used. Put this into the script:
Code:

#!/bin/sh
sleep 40
mount -t ext2 -o loop /home/user/MyDocs/.mappero_image /home/user/MyDocs/.maps

Do not forget to make the file executable!
The script just waits 40 seconds and then mounts the file. I am sure this can be done better, but I do not know hot to do actions in upstart based on what is mounted (ideally, it would work like "start when /home/user/MyDocs is mounted). But this works. If it does not, try to increase the sleep time (i.e. 30 did not work for me).


Now, we can proceed to downloading maps.
To download maps beforehand for later offline use, proceed as follows:
Quote:

It is indeed possible to load the maps in Mappero beforehand: while internet connectivity is available, start Mappero and scroll the map to the area you want to download the maps of. Try to zoom in/out so that only the area you are actually interested in is on the screen. Then, tap on the title bar, choose "Maps" -> "Manage Maps...", go to the "Zoom" tab and click the zoom levels you are interested in. If the number of maps is on the order of tens of thousands or more, you'd better deselect some zoom levels, or the operation might never end.

I usually download low resolution maps for the bigger areas, and the detailed maps (zoom levels 5 or 6) only for those areas where I know I'll actually be walking around.

If you already know your routes, you can also download the maps along the route (on the first tab of this dialog, on the bottom, you have a "Along route" option).
(by the author of mappero here)

If number of maps is large (more than 10 000 or so), N900 might start to be very unresponsive or appear to be dead. But it probably is not and just is very busy downloading the maps. You can check over SSH on how it is doing.

I found out that around 250 000 (most of Turkey on zoom 7, or area between 36° and 42° latitude and 30° and 45° longtitude) maps takes up about 450MB, which is about 15% of the file. It took 6 hours to download it (I think the bottleneck was N900 itself) so you might want to plug the device to an adapter because it is very battery intensive. So you could get around 1 500 000 maps onto single file I gues (but YMMV). If that is still not enough, I guess you can use more such files and symlink them in a smart way.

Please note that it seems at the moment that Google Satellite does not work with mappero in zooms below 8 r so. If it works for you, I would be very happy to hear about it. Also, if something does not work or could be done better, say so!

Update: fat filesystem allows lower block size so maybe it is actually better.

You create it with (dd command holds):
Code:

mkfs.vfat -I -n mappero_image_label -S 512 .mappero_image
Busybox mount is not smart enough to understand enough options to make the file writatable by mappero so download this, unpack it
(.debs are just archives) and put the file mount onto N900. Move it to /usr/bin/ and name it mount2 and make it executable (chmod +x mount2)

Put this instead of the version for ext2 to /etx/event.d/mount2 (I know, my naming sucks):

Code:

mount2 -t vfat -o gid=root,uid=user,loop,rw /path/to/.mappero_image /home/user/MyDocs/.maps

vi_ 2011-06-28 09:16

Re: How to download large maps with high resolution with mappero
 
Good idea, however did you perhaps consider the use of a sparse-file to keep the tile storage FS on? This would allow it to 'grow' upto 4GB without using unneeded space.

Something like:

Code:

dd if=/dev/zero of=.mappero_image bs=1024 seek=4190208 count=0
This would also save the need for creating a 4GB file THEN copying it to the device.

sup 2011-06-28 10:24

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by vi_ (Post 1040628)
Good idea, however did you perhaps consider the use of a sparse-file to keep the tile storage FS on? This would allow it to 'grow' upto 4GB without using unneeded space.

Something like:

Code:

dd if=/dev/zero of=.mappero_image bs=1024 seek=4190208 count=0
This would also save the need for creating a 4GB file THEN copying it to the device.

I did consider a growing file but did not know how to do it. I will try this and update original post if it works (I hope it will:-)). Thanks.

vi_ 2011-06-28 10:26

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by sup (Post 1040665)
I did consider a growing file but did not know how to do it. I will try this and update original post if it works (I hope it will:-)). Thanks.


Holy ****, fat32 does not support sparse files!

GGGGAAARRRGGGHHHH screw fat32 back to the last century.

Sorry, no can do!

sup 2011-06-28 10:30

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by vi_ (Post 1040666)
Holy ****, fat32 does not support sparse files!

GGGGAAARRRGGGHHHH screw fat32 back to the last century.

Sorry, no can do!

Oh yeah, if it were not for FAT32, this would not be needed anyway...

peterleinchen 2011-07-04 04:04

Re: How to download large maps with high resolution with mappero
 
Oh man!

Why didn't You start this thread a few days earlier? :)

I fiddled around with that since last week and came to almost the same solution (on my own after long long heavy trials).

Here are some remarks:
I started also with ext3,then ext2 bs=4096, then 2048
but this was not ideal
du told me 4GB used and du --apparent-size said 2.5GB, so still 1.5GB lost
then I decided to use FAT (.maps is originally n a FAT drive and we do not need any rights) using a block size of 512
now du says 2.6G and du --apparent-size says 2.7G, so almost nothing lost

I had heavy problems with dd. My device always rebooted when making such heavy file transactions. Do not know why, but found using truncate helped me out (but still I had sudden reboots).

Yes, FAT does not support sparse files, a shame, right?

For the automatic start, this is absolutely perfect.
At first I also wanted to use rcS-late.
But I started using start on MOUNTS_OK, but this was triggered three times.
then switched to ke-recv, but also herein we do need some time delay, see
Code:

description "An upstart event file for Crash Reporter"
author "Eero Tamminen"

start on started ke-recv
stop on starting shutdown

pre-start script

# mmc(s) should be mounted after ke-recv has started, but currently
# started notification seems to be emitted before it's actually ready.
# this is a temporary workaround, we should fix this in ke-recv or c-r
# properly.

#        sleep 4
        sleep 30
end script

So, these are my 2 cents.

But nevertheless, thank You. ;)

zazuge 2011-07-06 08:25

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1044210)
so still 1.5GB lost
then I decided to use FAT

the lost freespace is something a lot of people forget is due to reserved blocks
use to tune2fs to reduce the reserved blocks percentage
tune2fs -m 0 <your partition>

Joseph.skb 2011-07-06 12:48

Re: How to download large maps with high resolution with mappero
 
Folks, how do we use Mappero???

I was travelling last weekend and was in desperate need for a GPS device and my N900 FAILED!!! I had both the Ovi maps and Mappero and both couldn't work. The GPS could not even locate me (I was on a highway, and not in some desert or jungle).

Please, someone, how do we setup Mappero and some simple user guide to create destinations? Thanks.

woody14619 2011-07-06 12:57

Re: How to download large maps with high resolution with mappero
 
I've been using ModRana for the past year, since Mappero (last I looked) was no longer being maintained. It supports multiple download sources, and can store things in sqlite database format, which is both compressed, and gets around losing chunks of space on every tile based on FS granularity.

Also: Google has become quite a pain when it comes to tile cacheing. If it detects you're doing it (too many too quickly) it cuts you off. Silly, since it means you're probably going to lessen the load on their servers over time, but then they want to control when/where/if tiles update. :P

Thanks for the refresher/tutorial on creating loopback file systems though. I'm sure several people have uses for such things!

sup 2011-11-29 22:05

Re: How to download large maps with high resolution with mappero
 
Modrana looks nice, that is true and sqlite seems sweet. Just checking it out.

sup 2011-11-29 22:52

Re: How to download large maps with high resolution with mappero
 
Hm, I do not know. It does not download from google (mappero does), it cannot download based on gps coordinates (ie.e from 42° to 56° or something) and the interface is not as powerful (even though zooming with volume keys is nice, I miss that in mappero).

vir3us 2011-11-29 23:56

Re: How to download large maps with high resolution with mappero
 
Whats the best gps software please? (with voice nav)

sup 2011-11-30 00:45

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1044210)
Oh man!

Why didn't You start this thread a few days earlier? :)

I fiddled around with that since last week and came to almost the same solution (on my own after long long heavy trials).

Here are some remarks:
I started also with ext3,then ext2 bs=4096, then 2048
but this was not ideal
du told me 4GB used and du --apparent-size said 2.5GB, so still 1.5GB lost
then I decided to use FAT (.maps is originally n a FAT drive and we do not need any rights) using a block size of 512
now du says 2.6G and du --apparent-size says 2.7G, so almost nothing lost

I had heavy problems with dd. My device always rebooted when making such heavy file transactions. Do not know why, but found using truncate helped me out (but still I had sudden reboots).

Yes, FAT does not support sparse files, a shame, right?

For the automatic start, this is absolutely perfect.
At first I also wanted to use rcS-late.
But I started using start on MOUNTS_OK, but this was triggered three times.
then switched to ke-recv, but also herein we do need some time delay, see
Code:

description "An upstart event file for Crash Reporter"
author "Eero Tamminen"

start on started ke-recv
stop on starting shutdown

pre-start script

# mmc(s) should be mounted after ke-recv has started, but currently
# started notification seems to be emitted before it's actually ready.
# this is a temporary workaround, we should fix this in ke-recv or c-r
# properly.

#        sleep 4
        sleep 30
end script

So, these are my 2 cents.

But nevertheless, thank You. ;)

I read your message properly only today as I was travelling already when you posted it:-).

Dow did you mount a vfat file so that mappero could write on it?
I am trying to mess up with uid and guid options but I think N900's mount does not understand them:-(.

Mike Fila 2011-11-30 01:10

Re: How to download large maps with high resolution with mappero
 
if i understand correctly this will just give you access to the maps but without routing ...i have never used it but but marble uses monav i believe which will also give access to offline routing as well as offline maps

sup 2011-11-30 01:11

Re: How to download large maps with high resolution with mappero
 
Mappero does routing, but must be online (it uses google).

sup 2011-11-30 01:19

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by sup (Post 1130812)
I read your message properly only today as I was travelling already when you posted it:-).

Dow did you mount a vfat file so that mappero could write on it?
I am trying to mess up with uid and guid options but I think N900's mount does not understand them:-(.

Oh forget it. One must get mout command from elsewhere. I am updating the head post.

Mike Fila 2011-11-30 02:11

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by sup (Post 1130817)
Mappero does routing, but must be online (it uses google).

lol i know that i use it all the time ..the point was not to have to use any data roaming at all

sup 2011-11-30 09:06

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by Mike Fila (Post 1130831)
lol i know that i use it all the time ..the point was not to have to use any data roaming at all

Well, afaik you need to be online just for route creation (so you could make that at home or an internet cafe with wifi or so) and then it can be offline.

jaromrax 2011-11-30 15:31

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by sup (Post 1040580)
First create a file
Code:

touch .mappero_image
Then make it 4GB large (it is small enough to fit on FAT32)
Code:

dd if=/dev/zero of=.mappero_disk bs=1024 count=4190208

Hi, just a small question - why do you touch mappero_image and then fill in a mappero_disk?

sup 2011-11-30 16:12

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by jaromrax (Post 1131140)
Hi, just a small question - why do you touch mappero_image and then fill in a mappero_disk?

Because it is a mistake, thanks, will correct:-).

peterleinchen 2011-11-30 16:20

Re: How to download large maps with high resolution with mappero
 
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:

echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps

first line adds loop device to fstab
second line mounts with Maemo standrad mount (busybox enhanced installed. but I think I installed it later and it worked with default bb mount also)

But hey, if your mount2 works too ...


Here is my full automatic start/mount in /etc/event.d/
Code:

description "starting my own mounts and python server for Nokia Maps"

author "peterleinchen"

#start on MOUNTS_OK
start on started ke-recv
stop on starting shutdown

console output

pre-start script

# mmc(s) should be mounted after ke-recv has started, but currently
# started notification seems to be emitted before it's actually ready.
# this is a temporary workaround, we should fix this in ke-recv or c-r
# properly.

#        sleep 4
        sleep 30

end script


script

  echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
  mount /home/user/MyDocs/.maps

end script

with MyDocs/.maps.vfat.img as the 4GB file and MyDocs/.maps as the mount point.

sup 2011-11-30 16:23

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1131175)
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:

echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps

first line adds loop device to fstab
second line mounts with Maemo standrad mount (busybox enhanced installed. but I think I installed it later and it worked with default bb mount also)

But hey, if your mount2 works too ...

Well that strange, I tried echoing fstab too. Maybe that I had uid=user instead of uid=29999, but as you said, mount2 works too. Thanks for replying!

vi_ 2011-11-30 16:24

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by woody14619 (Post 1045753)
I've been using ModRana for the past year, since Mappero (last I looked) was no longer being maintained. It supports multiple download sources, and can store things in sqlite database format, which is both compressed, and gets around losing chunks of space on every tile based on FS granularity.

Also: Google has become quite a pain when it comes to tile cacheing. If it detects you're doing it (too many too quickly) it cuts you off. Silly, since it means you're probably going to lessen the load on their servers over time, but then they want to control when/where/if tiles update. :P

Thanks for the refresher/tutorial on creating loopback file systems though. I'm sure several people have uses for such things!

You can move your maps to /opt. Just move the folder and bind mount it to ../MyDocs/maps.

All you have to do is add a line to ke-recv to remount it when you disconnect a USB mass storage mode.

jaromrax 2011-12-01 08:32

Re: How to download large maps with high resolution with mappero
 
Hi,
I was just thinking about reformating /home/user/MyDocs/ partition to ext* because of the tile's size (also because of directory linking, permissions...).
On n900 I have 9.4G of OSM tiles (du -h)
the same on my PC with ext3 takes 1.4G
and apparent size on PC is 1.1G
And my PC has 4096 block size. Interesting.
I did all in the first post on my PC (with 1024 blocks) and the first thing I see is that the empty 4G file reports 3G free space after mount (on PC).
After tile-files copy - du says 1.2G and apparent size is 1.1G.
So - (before copying this 4G file to n900), the main problem is the size 3 out of 4G. This I dont understand. It looks like one block takes 256bytes?
EDIT: 4096 block says 3.8G free.... man page says inode takes 256bytes, you can change with I=128...testing it
EDIT2: test of different block sizes, all with -I 128 inodes:
4096 block : avail 3.9G; size 1.4G apparent 1.1G (0.1G;+~30% waste; tot=~38%)
2048 block : avail 3.7G; size 1.2G apparent 1.1G (9%;+ 16% waste; tot=23.6%)
1024 block : avail 3.5G; size 1.2G apparent 1.1G (15%; +10% waste; tot=23.5%)
For me, the 1024 or 2048 blocks are the same and I simply prefer 2048.
After copy to n900 it seems to work.

sup 2011-12-01 09:20

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by jaromrax (Post 1131496)
Hi,
I was just thinking about reformating /home/user/MyDocs/ partition to ext* because of the tile's size (also because of directory linking, permissions...).
On n900 I have 9.4G of OSM tiles (du -h)
the same on my PC with ext3 takes 1.4G
and apparent size on PC is 1.1G
And my PC has 4096 block size. Interesting.
I did all in the first post on my PC (with 1024 blocks) and the first thing I see is that the empty 4G file reports 3G free space after mount (on PC).
After tile-files copy - du says 1.2G and apparent size is 1.1G.
So - (before copying this 4G file to n900), the main problem is the size 3 out of 4G. This I dont understand. It looks like one block takes 256bytes?

I assume 1GB is taken by the filesystem - with 1024 block size, you have got four millions of them in the file and they must be stored somehwere (even though it seems strange that you need 250B to store one block, hm:-/).

peterleinchen 2011-12-02 23:51

Re: How to download large maps with high resolution with mappero
 
You see why I came to use vFAT? I did/do not see any advantages here for an ext FS. Just for storing map tiles.

4GB file ~ 4294967296 bytes

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 4129759 3199535 930225 77% /home/user/MyDocs/.map
so available are:
1k*4129759 ~ 4228873216 bytes
Overhead seems to be only
66094080 bytes ~ 64MB


My disk usage:
du -xsh MyDocs/.maps
3.1G MyDocs/.maps
du -xsh --apparent-size /home/user/MyDocs/.maps
2.9G /home/user/MyDocs/.maps
to be more precise:
du -xs MyDocs/.maps
3199535 MyDocs/.maps ~ 3276323840
bytes
du -xs --apparent-size /home/user/MyDocs/.maps
3008856 /home/user/MyDocs/.maps ~3081068544
bytes
So loss for storing around 3GB map tiles is only about 191MB.


On ext there needs to be stored the inodes and also there is some space reserved for the super-user (man mkfs.ext2):
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user.
This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.
5% of 4GB is quite much (204MB) space lost on ext (excluding inodes space).

--edit
About blocks and inode size:
1k block size and
-i bytes-per-inode
Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode
bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer
inodes will be created. This value generally shouldn’t be smaller than the
blocksize of the filesystem, since in that case more inodes would be made than
can ever be used. Be warned that it is not possible to expand the number of
inodes on a filesystem after it is created, so be careful deciding the correct
value for this parameter.
-i 1024 (and, the default, -I 256) will lead to this huge amount (1GB) of inode storage.

sup 2011-12-02 23:54

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1132396)
You see why I came to use vFAT? I did/do not see any advantages here for an ext FS. Just for storing map tiles.

4GB file ~ 4294967296 bytes

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 4129759 3199535 930225 77% /home/user/MyDocs/.map
so available are:
1k*4129759 ~ 4228873216 bytes
Overhead seems to be only
66094080 bytes ~ 64MB


My disk usage:
du -xsh MyDocs/.maps
3.1G MyDocs/.maps
du -xsh --apparent-size /home/user/MyDocs/.maps
2.9G /home/user/MyDocs/.maps
to be more precise:
du -xs MyDocs/.maps
3199535 MyDocs/.maps ~ 3276323840
bytes
du -xs --apparent-size /home/user/MyDocs/.maps
3008856 /home/user/MyDocs/.maps ~3081068544
bytes
So loss for storing around 3GB map tiles is only about 191MB.


On ext there needs to be stored the inodes and also there is some space reserved for the super-user (man mkfs.ext2):
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user.
This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.
5% of 4GB is quite much (204MB) space lost on ext (excluding inodes space).

Yes, I am using it now too with simiral results.

daniel_m 2011-12-06 16:44

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1131175)
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:

echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps

...

Hm, I tried your script but it doesn't do anything. Could you re-write it so that I can try out in x-term? I'm still a n00b when it comes to Linux :(

peterleinchen 2011-12-06 20:53

Re: How to download large maps with high resolution with mappero
 
Hey,

which "script" do you refer to?
The two lines you posted above?

Of course you need to be root to be allowed to edit/modify /etc/fstab and also you need to be root for mount/umount.

Install rootsh or sudser from extras-devel, but be aware that these kinds of modifications may brick your device (if you are a noob, as you described yourself ;)).

If you are already root, then maybe you do not have created the file /home/user/MyDocs/.maps.vfat.img (the vfat storage file) and/or the directory /home/user/MyDocs/.maps (the mount point).

daniel_m 2011-12-08 13:07

Re: How to download large maps with high resolution with mappero
 
Yes, I was referring to that one ... but you fixed it anyways :-)
I deliberately deleted the folder .maps because I thought it would interfere with mounting the image file to that directory.
Btw., how can I see that everything worked and .maps is a mounted file instead of an ordinary folder?

And one other thing: Now that everything probably works as expected I cannot access MyDocs via USB any more. Only my SD card gets mounted on my windows machine :-(
Apart from that I'm very happy that people like you come up with crazy ideas ;-)

peterleinchen 2011-12-08 21:50

Re: How to download large maps with high resolution with mappero
 
OK, as you confirmed my problem with the USB mass storage mode, I do know that it is the mounted file on a (also) mounted device.
I am afraid we have to live with that, But there is a workaround:
before putting N900 into mass storage mode, type in x-term
Code:

sudo umount -l /home/user/MyDocs
afterwards (MyDocs will get mounted automatically) we have to mount the maps file again with
Code:

sudo mount /home/user/MyDocs/.maps
But vi_ has another thread open with a hint to do that automatically, I did not have time to check/test that myself.

sup 2011-12-08 21:53

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1135203)

But vi_ has another thread open with a hint to do that automatically, I did not have time to check/test that myself.

Would you care to point to that thread?

sup 2011-12-08 21:54

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by daniel_m (Post 1134988)
Btw., how can I see that everything worked and .maps is a mounted file instead of an ordinary folder?

run df. You should see something like

/home/user/MyDocs/.mappero_disk 4182016 1685044 2496972 40% /home/user/MyDocs/.maps

peterleinchen 2011-12-08 22:07

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by sup (Post 1135204)
Would you care to point to that thread?

Yes,of course:
Power Search with "mount vi_" lead the way ;j
http://talk.maemo.org/showthread.php?t=80562

Quote:

Originally Posted by sup (Post 1135205)
run df. You should see something like
/home/user/MyDocs/.mappero_disk 4182016 1685044 2496972 40% /home/user/MyDocs/.maps

I just put a plain file named 'mount_point' or any other meaningful into the mount point directory. To be checked easily with 'ls'. But 'df' is also good idea.

sup 2011-12-08 22:10

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1135214)
Yes,of course:
Power Search with "mount vi_" lead the way ;j
http://talk.maemo.org/showthread.php?t=80562


Thanks. It is strange I did not come across this thread when first doing this setup... :-).

peterleinchen 2011-12-08 22:45

Re: How to download large maps with high resolution with mappero
 
No, not strange at all.
Just look at the first post's date
sup 28th Jun 2011 , 10:29
vi_ 2nd Dec 2011 , 11:23

So, only "little" chance for you to detect that ;)

sup 2011-12-08 22:46

Re: How to download large maps with high resolution with mappero
 
Oh yeah, I saw 12-02-11 - that crazy american way of indicating time will always puzzle me:-).

daniel_m 2011-12-10 12:17

Re: How to download large maps with high resolution with mappero
 
I get /dev/loop0 4086976 8276 4078700 0% /home/user/MyDocs/.maps
Looks like it is working pretty well :)

Hm, I think I will just copy things to my SD card and move it to internal memory if necessary :)

jaromrax 2011-12-19 09:38

Re: How to download large maps with high resolution with mappero
 
Quote:

Originally Posted by peterleinchen (Post 1132396)
You see why I came to use vFAT? I did/do not see any advantages here for an ext FS. Just for storing map tiles.

Surely, 5% and 23% - there is an advantage of ~700M free. But anyway I see two more reasons to use ext FS. Maybe you can reduce my number:
1/ the rights - I want to have all odd-numbered subdirs for mappero readonly - to keep only every second zoom tile - with the actual zoom level the maps details are too faint to view (I didnt manage? under fat).
2/ I can imagine to link some more map directories from SD card anytime when needed.

peterleinchen 2011-12-19 14:35

Re: How to download large maps with high resolution with mappero
 
OK.
Point 1 is not to beat (at all).
If you like/need read/write access to set explicitly, there is no other chance than ext (1024 bs ?). The vFat image itself may be mounted write protected, but only the complete imgae (not down to single directories).
And I do not mind anyone to use ext, my personal favorite is vFat.

Point 2 may also be achieved with whatever file system you use.
)ust map the single Map Providers as storage files (e.g. OSMI and OSMII) to as many directories you need under /home/user/MyDocs/.maps/xxx.


All times are GMT. The time now is 01:48.

vBulletin® Version 3.8.8