maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Repartition the internal drive (https://talk.maemo.org/showthread.php?t=35122)

白い熊 2010-01-24 17:09

Re: Repartition the internal drive
 
Could someone post the output of ls -al /home/user/MyDocs
I deleted the original directory, want to symlink it through the mounted volume to some SD storage place and know some apps put stuff there, like OVI maps etc., so just to create the dirs...

白い熊 2010-01-24 17:11

Re: Repartition the internal drive
 
Quote:

Originally Posted by ruskie (Post 492101)
I'm assuming the camera app follows some digital camera specification that states that in needs to use a volume.

How does it know that a volume is mounted there though? I tried bind mounting a dir to /home/user/MyDocs and didn't work...

mikhmv 2010-01-24 17:34

Re: Repartition the internal drive
 
Quote:

Originally Posted by 白い熊 (Post 492135)
How does it know that a volume is mounted there though? I tried bind mounting a dir to /home/user/MyDocs and didn't work...

You should try to mount by (even bind) through ke-recv. otherwise camera will refuse to take pictures.
If you will mount by ke-recv it will create all necessary folder on mounting. Here is the code for creation additional folders:
Code:

# create some special directories for user's partition
  if [ "x$MP" = "x/home/user/MyDocs" -a -w $MP ]; then
    # use global folder names
    USERDIRS="/home/user/.config/user-dirs.dirs"
    if [ -f "$USERDIRS" ]; then
      HOME='/home/user'
      source "$USERDIRS"
      mkdir -p "$XDG_DOCUMENTS_DIR"
      mkdir -p "$XDG_PICTURES_DIR"
      mkdir -p "$XDG_MUSIC_DIR"
      mkdir -p "$XDG_VIDEOS_DIR"
      mkdir -p "$NOKIA_CAMERA_DIR"
      if [ "$FSys" = "ext3" ]; then
              #chown -R user:users  "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR"
              chown -R user:users "$MP"
              chmod -R 774 "$XDG_DOCUMENTS_DIR" "$XDG_PICTURES_DIR" "$XDG_MUSIC_DIR" "$XDG_VIDEOS_DIR" "$NOKIA_CAMERA_DIR" 
              chmod -R ug+rwX "$MP"         
      fi

You will need only this directories:
Code:

max-n900:~# cat /home/user/.config/user-dirs.dirs
XDG_DOCUMENTS_DIR="$HOME/MyDocs/.documents"
XDG_MUSIC_DIR="$HOME/MyDocs/.sounds"
XDG_PICTURES_DIR="$HOME/MyDocs/.images"
XDG_VIDEOS_DIR="$HOME/MyDocs/.videos"
NOKIA_CAMERA_DIR="$HOME/MyDocs/DCIM"
NOKIA_MMC_CAMERA_DIR="/media/mmc1/DCIM"

I am using 774 permissions for them.

白い熊 2010-01-24 18:23

Re: Repartition the internal drive
 
What's the proper syntax for bind mounting a dir somewhere through ke-recv

Also, unrelated, but where does ovi maps save it's data? It should also be in MyDocs

j.s 2010-01-24 21:51

Re: Repartition the internal drive
 
Quote:

Originally Posted by 白い熊 (Post 492226)
Also, unrelated, but where does ovi maps save it's data? It should also be in MyDocs

Seems to be in a directory tree below Mydocs/cities/diskcache/

delaroca 2010-01-25 09:40

Re: Repartition the internal drive
 
Quote:

Originally Posted by mikhmv (Post 481181)
Ok here is my way to convert storage to ext3:

Thanks! It is working quite nice so far. Reflashing the N900 doesn't touch this partition, But one must restore your code for MyDocs now an ext3 fs to mount successfully.

What I didn't test was doing an eMMC reflash. It should work ok over an ext3 partition, no?

As a side question, if one were to manage to mangle the partition table badly, what's the standard procedure to recover?

Besides easing the use of the Camera app, a nice side effect of having MyDocs be an ext3 volume is that you can define the links,

Code:

ln -s / Root
ln -s /home/user Home

which has the effect of making these directory trees visible in the Hildon File Manager display.

These links, create circular references in the file system and sure enough they make Tracker spin on its wheels... but this can be easily fixed by configuring those two directory references in the "exclude" list of Tracker. Recursive searches such as
"find / -name foo.bar" work without problem. Anyway, can you think of other situations where this could prove harmful?

--denis

Edit 6/17/10: The conversion of ~/Mydocs to ext3 as per mikhmv recipe doesn't survive the update to PR1.2 via OTA/NSU. I had to reflash my N900 with both PR1.2 Fiasco and eMMC images. Then applying the recipe works quite well... but first the modified genfstab.awk needs a new mod to generate the /home/optmounting in /etc/fstab. If any mishaps occur that brick the N900, flashing as above gets the device back to the partitioning defined by Nokia.

delaroca 2010-01-25 09:49

Re: Repartition the internal drive
 
Quote:

Originally Posted by 白い熊 (Post 492226)
Also, unrelated, but where does ovi maps save it's data? It should also be in MyDocs

I seem to recall it was in a directory called "cities" in MyDocs or else in /media/mmc1. The tracker configure file references those paths in its exclude list. I too lost my MyDocs... did an eMMC reflash to restore the contents of MyDocs but that restore doesn't include the maps!

--denis

ruskie 2010-01-25 12:45

Re: Repartition the internal drive
 
Quote:

Originally Posted by mikhmv (Post 492176)
You should try to mount by (even bind) through ke-recv. otherwise camera will refuse to take pictures.
If you will mount by ke-recv it will create all necessary folder on mounting. Here is the code for creation additional folders:

The fault is that I already have those directories there. So it shouldn't be needed to create.

rooted 2010-02-02 20:42

Re: Repartition the internal drive
 
Has anybody managed to resize existing 3 partitions (w/o swap is 2) to custom sizes. Let's say 4 GB /home (for apps) and the rest for /MyDocs?

mikhmv 2010-02-05 20:47

Re: Repartition the internal drive
 
Quote:

Originally Posted by rooted (Post 507456)
Has anybody managed to resize existing 3 partitions (w/o swap is 2) to custom sizes. Let's say 4 GB /home (for apps) and the rest for /MyDocs?

It is possible. you can look for post from russkie in current thread.
any way, last my re flash change it to 4GB for /home


All times are GMT. The time now is 19:13.

vBulletin® Version 3.8.8