Reply
Thread Tools
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#311
Just install multiboot to do it, boot with keyboardt slid out, here you can export your internal memory card read/write and gparted will pick it up.
 
Posts: 23 | Thanked: 9 times | Joined on Feb 2010
#312
Hi all,

I searched the thread, but couldn't find anyone with similar problems..

I've repartitioned the flash to give one large /home and a loopback file for usb according to the wiki instructions. It's working well so far, except for 2 problems:
  • mmcblk1p1 is not exported for usb anymore
  • When saving, the file dialog no longer shows an N900 entry for the MyDocs directory or vfat loopback

So I'm guessing something that was changed in the osso-usb-mass-storage-enable.sh file has caused problem 1, but I can't work out what.

Problem 2 is also annoying, because some file dialogs don't give the option to access the full filesystem, so it makes it difficult to save to the /home partition.

Has anyone faced anything like this before? Any ideas where I can start to debug it?
 
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#313
I recall reading somewhere that a misstep would cause MyDocs to be deleted. I don't remember the details, though.
__________________
All I want is 40 acres, a mule, and Xterm.
 
Posts: 10 | Thanked: 4 times | Joined on Aug 2010
#314
Hi All,
How have you hacked your phone so you can save to /home/user/* and not MyDocs. The "HildonFileChooserDialog"(I think) only says Nokia N900(/home/user/MyDocs) or Memory Card. I'd like to change this as /home/user is the large ext3 and /home/user/MyDocs is the small vfat partition.

Alternatively I'm thinking of unmount MyDocs and simply mount /home/user/MyDocs/DCIM as the vfat partition, since I only need vfat for camera app I think.

Any thoughts?
 
Posts: 345 | Thanked: 117 times | Joined on Jan 2010 @ uk
#315
lookup 'parted'. that will do all that for you. You just create a bootable cd for your windows pc (or boot straight into linux if you have it) then connect your n900 and resize/repartition etc to your hearts content. Best thing is you wont lose any data. you can keep everything where it is (as long as theres not more stuff in there than the new partition size)
 
Posts: 2,102 | Thanked: 1,937 times | Joined on Sep 2008 @ Berlin, Germany
#316
Let it be gparted instead of parted!!! Parted is a partition table editor, while gparted is a graphical partition manager, which may help you preserve the content of the partition.
 
Posts: 64 | Thanked: 42 times | Joined on Jun 2009
#317
FWIW (YMMV -- just a heads up!), last time I used gparted together with backupmenu to change partition sizes, the geometry of all attached memory devices (internal 32GB + 8GB microSSD) was changed (from 4H/16S/*C to something like 64H/??S/*C). In addition, every time I ran sfdisk -l, it complained that the starting point of two of the partitions was other than expected.

Linux doesn't "care" about wrong head/sector count (since these are imaginary values in SSD memory anyway), but it does keep complaining (which some people might find annoying). Windows OTOH tends to be more finicky with wrong geometry values, which may or may not affect accessibility (at the worst future moment, probably). I just wanted it fixed because I was having other FS/IO problems at the time and thought the two might be related.

Also, at the time I couldn't think of a good way to return the values to their original settings without losing all data in the process (essentially, doing something like "sfdisk -H4 -S16 /dev/mmcblk0").

I have not tried this again since then, but I wonder if this happened because I used the wrong settings in gparted while modifying the partition sizes (by using cylinder offsets to redefine the boundary points, rather than the other option (whole MiBs?) -- or vice versa).

At any rate, you can fix it all by doing a complete re-flash (which I didn't know at the time, as it happened within the first three weeks after having purchased it).
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#318
Originally Posted by mikhmv View Post
Ok here is my way to convert storage to ext3:
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
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...
You can modify /etc/event.d/rcS-late or /usr/lib/genfstab.awk.
I modified /usr/lib/genfstab.awk.
here my file:
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++
}
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:
#!/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
Second file which need to change is "/usr/sbin/osso-mmc-mount.sh"
Differences is here:

And full file:
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 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:
sudo addgroup --gid 29999 n900
sudo adduser YourUserName n900
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).

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
I used this to create ext4 partition for MyDocs. Everything went great until I tried to reboot and got in to reboot loop

I'm using kernel-power and CSSU. Any ideas?

EMMC works great with ext4

Last edited by laasonen; 2011-04-15 at 20:51.
 
Posts: 3 | Thanked: 0 times | Joined on Feb 2010
#319
Oh! my God !
its unbeleaveable.........!!!!!!!
wooooooooooooooooooooooooooooow

I did it in very first attempt. I am very very very relaxed now.

Thankyou so much. You really genius. You made my N900 on the top of all. I don't know how to thank you.......

it works.
T H A N K Y O U S I R !
 
Posts: 158 | Thanked: 340 times | Joined on Jul 2010 @ middle of nowhere
#320
I trieed to increase applications memory from 2gb to 10 gb following the instructions from here http://talk.maemo.org/showpost.php?p...&postcount=188
Something went wrong and now i have 18.99 gb in nokia n900 and 77.9 mb memory for installable applications.
The problem is when i try to flash with vanilla i get this error:
C:\Program Files\maemo\flasher-3.5>
C:\Program Files\maemo\flasher-3.5>flasher-3.5.exe -F RX-51_2009SE_10.2010.13-2.
VANILLA_PR_EMMC_MR0_ARM.bin -f
flasher v2.5.2 (Sep 24 2009)

Image 'mmc', size 255947 kB
Version RX-51_2009SE_10.2010.13-2.VANILLA
USB device found found at bus bus-0, device address \\.\libusb0-0001--0x0421-0x0
105.
Found device RX-51, hardware revision 2101
NOLO version 1.4.14
Version of 'sw-release': RX-51_2009SE_20.2010.36-2_PR_MR0
Booting device into flash mode.
Suitable USB device not found, waiting.

When i flash fiasco image it goes ok, but with vanilla i get that error.
What do i have to do now?
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:50.