![]() |
2011-02-24
, 18:25
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#311
|
![]() |
2011-03-18
, 02:01
|
Posts: 23 |
Thanked: 9 times |
Joined on Feb 2010
|
#312
|
![]() |
2011-03-18
, 03:12
|
Posts: 5,795 |
Thanked: 3,151 times |
Joined on Feb 2007
@ Agoura Hills Calif
|
#313
|
![]() |
2011-04-04
, 21:17
|
Posts: 10 |
Thanked: 4 times |
Joined on Aug 2010
|
#314
|
![]() |
2011-04-04
, 22:10
|
Posts: 345 |
Thanked: 117 times |
Joined on Jan 2010
@ uk
|
#315
|
![]() |
2011-04-05
, 06:06
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#316
|
![]() |
2011-04-12
, 20:58
|
Posts: 64 |
Thanked: 42 times |
Joined on Jun 2009
|
#317
|
![]() |
2011-04-15
, 20:49
|
|
Posts: 565 |
Thanked: 618 times |
Joined on Jun 2010
@ Finland
|
#318
|
Ok here is my way to convert storage to ext3:
After this need make normal fstab. I am not sure is it used (fstab) some where on n900 or not but I prefer to have it clear...Code:sudo gainroot cd /home/user umount MyDocs sfdisk -d > sf nano sf # set 1st partition to 83 sfdisk --force /dev/mmcblk0 < sf mkfs.ext3 /dev/mmcblk0p1
You can modify /etc/event.d/rcS-late or /usr/lib/genfstab.awk.
I modified /usr/lib/genfstab.awk.
here my file:
For mounting it and make it work need make some small fix in ke-recv. First file probably more simple to just rewrite. This is "/usr/sbin/mmc-mount". I tried to make more universal. It could work now with ext3 and vfat. In case vfat it is require 3 (original amount of parameters) or 4 arguments.Code:#!/usr/bin/awk BEGIN { # states so that we don't end up having more than one # of home or MyDocs; we can have as many swaps as we find __home = 0 __fat = 0 print "# autogenerated" print "rootfs / rootfs defaults,errors=remount-ro,noatime 0 0" } /^\/dev\/mmc/ { start=1 } start == 1 && $6 == 82 { printf "%s none swap sw 0 0\n", $1 } start == 1 && $6 == 83 && !__home { printf "%s /home ext3 %s 0 0\n", "/dev/mmcblk0p2", home_opts __home++ } start == 1 && $6 == 83 && !__fat { printf "%s /home/user/MyDocs ext3 %s 0 0\n", "/dev/mmcblk0p1", home_opts __fat++ }
Second file which need to change is "/usr/sbin/osso-mmc-mount.sh"Code:#!/bin/sh # $1 - device # $2 - mount point # $3 - rw or ro mode for mounting # $4 - file system vfat or ext3. If it is absent mount vfat. . /etc/default/mount-opts #load standard parameters for mounting FAT and ext3 #home_opts="rw,noatime,errors=continue,commit=1,data=writeback" #fat_opts="noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir" case "$4" in ext3) SYS=ext3 PAR=$home_opts ;; *) SYS=vfat PAR="$3,$fat_opts" ;; esac COMMAND="mount -t $SYS -o $PAR "$1" "$2" > /dev/null" #echo $COMMAND eval $COMMAND #mount -t vfat -o $3,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir "$1" "$2" > /dev/null
Differences is here:
And full file:
After this modification I have 2gb mounted /home (ext3) and 27gb on /home/user/MyDocs (ext3). Camera is working. When I connect device to computer (linux) /home/user/MyDocs unmounted (on n900) and exposed to notebook. For have possibility edit files on 27Gb partition on computer (linux, ubuntu) need execute (only once):Code:#!/bin/sh # This file is part of ke-recv # # Copyright (C) 2005-2009 Nokia Corporation. All rights reserved. # # Author: Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA # Return codes: # 0 - mounted read-write # 1 - could not mount # 2 - mounted read-only PDEV=$1 ;# preferred device (partition) MP=$2 ;# mount point grep "$PDEV " /proc/mounts > /dev/null if [ $? = 0 ]; then logger "$0: $PDEV is already mounted" exit 0 fi if [ ! -d $MP ]; then mkdir -p $MP fi if ! [ $PDEV = /dev/mmcblk0 -o $PDEV = /dev/mmcblk1 ]; then # check the FAT magic number PNUM=$(echo $PDEV | sed "s#/dev/mmcblk[01]p##") DEV=$(echo $PDEV | sed "s#p[1234]##") PID=$(sfdisk -c $DEV $PNUM) case "$PID" in b | c | e | 4 | 6 | 14 | 16 | 1b | 1c | 1e) logger "$0: $PDEV partition type is '$PID'" FSys=vfat ;; 83) logger "$0: $PDEV type '$PID' is not FAT32 or FAT16" FSys=ext3 ;; *) logger "$0: $PDEV type '$PID' is not FAT32 or FAT16 or ext3" exit 1 ;; esac fi # time limited check #/sbin/dosfsck -I -n -T 10 $PDEV #if [ $? != 0 ]; then # logger "$0: $PDEV is corrupt, trying to mount it read-only" # mmc-mount $PDEV $MP ro $FSys # if [ $? = 0 ]; then # logger "$0: $PDEV mounted read-only" # exit 2 # else # logger "$0: Couldn't mount $PDEV read-only" # exit 1 # fi #fi #echo "mmc-mount $PDEV $MP rw $FSys" mmc-mount $PDEV $MP rw $FSys RC=$? logger "$0: mounting $PDEV read-write to $MP, rc: $RC" #echo $RC if [ $RC = 0 ]; then # 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 else # fallback for d in .sounds .videos .documents .images .camera; do mkdir -p $MP/$d done fi touch $MP elif [ "x$MP" = "x/home/user/MyDocs" ]; then logger "$0: '$MP' is not writable" elif [ "x$MP" = "x/media/mmc1" -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 "$NOKIA_MMC_CAMERA_DIR" if [ "$FSys" = "ext3" ]; then #chown -R user:users "$NOKIA_MMC_CAMERA_DIR" chown -R user:users "$MP" chmod -R ug+rwX "$MP" chmod -R 774 "$NOKIA_MMC_CAMERA_DIR" fi fi elif [ "x$MP" = "x/media/mmc1" ]; then logger "$0: '$MP' is not writable" fi fi exit $(($RC != 0))
After this you will be able to edit files on device. When you will disconnect device this partition will be remounted on" /home/user/MyDocs". Originally I had problem with files created on notebook. All this files had User and group from user and group on notebook. Now after mounting this partition back to n900 group and owner will be automatically changed to user:users (from n900).Code:sudo addgroup --gid 29999 n900 sudo adduser YourUserName n900
EDIT: modified file "/usr/sbin/osso-mmc-mount.sh" (I didn't change now differences). In new file improved permissions changes for files. It is more comfortable for using with other linux computer. Before last modification some files was read only on computer because my script provide access to files by group (user on n900 and computer different). Now all files will have permissions: rwXrwXnnn (n-don't changed).
Additional information could be found in bug: https://bugs.maemo.org/show_bug.cgi?id=8179
If you would like to have this modification by default in new release you can vote for this bug
![]() |
2011-08-29
, 20:11
|
Posts: 3 |
Thanked: 0 times |
Joined on Feb 2010
|
#319
|
![]() |
2011-10-05
, 19:38
|
Posts: 161 |
Thanked: 343 times |
Joined on Jul 2010
@ middle of nowhere
|
#320
|