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)

Graham Cobb 2010-01-06 14:39

Re: Repartition the internal drive
 
Quote:

Originally Posted by emesem (Post 455178)
The directory where ovi maps stores it maps is also in MyDocs (/cities).
...
Or could it be, that there is another solution? E.g. a config file to tell ovi maps that the cities directory can be found elsewhere?

A config file would be great but an alternative might be to bind-mount a directory from a larger partition into MyDocs/cities. However, that would require further work to unmount and remount the bind when exporting MyDocs to USB.

Does anywhere know where MyDocs normally gets unmounted to handle the USB access?

Graham

emesem 2010-01-07 07:59

Re: Repartition the internal drive
 
I guess what you are looking for is:
/usr/sbin/osso-usb-mass-storage-disable.sh
/usr/sbin/osso-usb-mass-storage-enable.sh

kwotski 2010-01-07 08:08

Re: Repartition the internal drive
 
Quote:

Originally Posted by soeiro (Post 446606)
What do we do about /usr and /etc? Do you think symlinking or mounting them on the MMC would slow down the device?

Just a quick note for anyone skim-reading this thread and considering this:

Don't!

/usr can be done (see earlier in the thread) but you need to modify the startup files, or else the device will not boot successfully..

/etc - I don't see how this could work. You need /etc on the root partition so that /etc/fstab can be read in order to know how to mount the other partitions! I think this would come under "impossible", and certainly shouldn't be tried by anyone who hasn't got a plan to deal with /etc/fstab

(ok, you could have a skeleton /etc/ in place on root partition and mount the full blown one over it.. Good luck! :) )

Graham Cobb 2010-01-07 15:44

Re: Repartition the internal drive
 
Quote:

Originally Posted by emesem (Post 456868)
I guess what you are looking for is:
/usr/sbin/osso-usb-mass-storage-disable.sh
/usr/sbin/osso-usb-mass-storage-enable.sh

No, I know about those. They do not unmount anything. Something must be unmounting MyDocs before calling those.

I guess it is /usr/sbin/ke-recv -- is that open source?

Graham

Graham Cobb 2010-01-07 16:22

Re: Repartition the internal drive
 
Quote:

Originally Posted by Graham Cobb (Post 457446)
Something must be unmounting MyDocs before calling those.

Ah. Found it: /usr/sbin/osso-mmc-umount.sh

If you mount anything into /home/user/MyDocs you need to edit /usr/sbin/osso-mmc-umount.sh to unmount them before it tries to unmount the MyDocs device itself.

And then remount them in /usr/sbin/osso-usb-mass-storage-disable.sh.

Actually, we really need to create an infrastructure for handling additional mounts which would handle the /etc/fstab manipulation and the mounting at boot time, and the unmounting and remounting of anything which is using the VFAT partition before exporting it.

Graham

titan 2010-01-12 20:09

Re: Repartition the internal drive
 
FYI: I've started fixing ke-recv and system-services, and porting GNU parted.
see my post http://talk.maemo.org/showpost.php?p...5&postcount=48

nightfire 2010-01-16 07:38

Re: Repartition the internal drive
 
This feels so familiar...

I was an avid Zaurus c760 hacker back in the day, building a custom debian, then using pdaXrom, openzaurus, angstrom, etc.

I'm very happy Nokia's gone the honorable (and long-term inevitable, I believe) route of open, transparent and empowering design... and as I said in the hello thread .. a well supported debian-in-pocket system is like a dream come true to me.

But, it is a shame Maemo doesn't use a cleaner fs layout. It really should be based on initrd for initial booting ("flash rom" .. 16mb or so), that mounts 32gb root (/) from the MMC. That's it, that's all.

IMHO there's no real performance argument... if program data keeps flushing executable/lib cache, tune the VM to flush buffers earlier, etc. If worse comes to worst, add another 32mb physical RAM (I know, too late for that, but still).

Then give the user an option of creating a loopback VFAT fs off the mmc (of whatever size), or let them choose the SD card exclusively if they want.

So much simpler, and no space restrictions.

Updates shouldn't be flashed to the device .. they should be distributed with apt, so they don't need to rewrite /.

A soft restore procedure could wipe everything except /home and unpack a fresh system without damaging user files. A hard restore could wipe and reinit the mmc.

Minor complaints aside, go Nokia! You guys rock! :) Can't wait for my n900 to get here.

mankir 2010-01-16 09:44

Re: Repartition the internal drive
 
Is it possible, to use the eMMC as rootfs and the NAND as swap?
Maybe someone already tested, would be interesting for me if there are differences in performance...

titan 2010-01-17 09:59

Re: Repartition the internal drive
 
Quote:

Originally Posted by mankir (Post 475848)
Is it possible, to use the eMMC as rootfs and the NAND as swap?
Maybe someone already tested, would be interesting for me if there are differences in performance...

AFAIK a hidden NAND is already used as swap.
PR1.1 seems to have made it easier to integrate a boot menu (and to boot from eMMC)
http://mer-project.blogspot.com/2010...e-in-pr11.html

mankir 2010-01-17 15:53

Re: Repartition the internal drive
 
No, swap is on mmcblk0p3 by default.

Already installed the bootmenu, but how to boot into debian partition or clone rootfs to eMMC?

mikhmv 2010-01-18 04:20

Re: Repartition the internal drive
 
I resolve CAMERA's problem!!!!
Now my camera can took pictures on ext3 and vfat!!!!

I resolved it by modification ke-recv (I will try too put patch somewhere...).
But camera has bug too.....

Bug is:
When camera start it is checking on presence folder DCIM on target partition. If it doesn't exist camera create folder DCIM. Here is a bug!
DCIM created with root:root (group and user) but should be user:users.

Like way around (until nokia will fix it) could be change owner:group by command:

chown -R user:users DCIM
chmod -R 664 DCIM

After this camera make picture on ext3 partition!!!
Quality of pictures absolutely same!

full script for this:
1. Turn on Camera
2. Change Location for saving picture on internal memory
3. Make picture. Camera will be closed with error message.
4. in terminal type:
chown -R user:users DCIM
chmod -R 664 DCIM

After this camera will work.

白い熊 2010-01-18 06:30

Re: Repartition the internal drive
 
Please post the diff here.

mikhmv 2010-01-19 02:04

Re: Repartition the internal drive
 
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:
Quote:

max@max-lap:~$ diff -b '/home/max/TEMP/n900/Scratchbox/ke-recv/ke-recv-3 (fixed).19/src/osso-mmc-mount.sh' '/home/max/TEMP/n900/Scratchbox/ke-recv/ke-recv-3.19/src/osso-mmc-mount.sh'
40d39
<
49,53d47
< FSys=vfat
< ;;
< 83)
< logger "$0: $PDEV type '$PID' is not FAT32 or FAT16"
< FSys=ext3
56c50
< logger "$0: $PDEV type '$PID' is not FAT32 or FAT16 or ext3"
---
> logger "$0: $PDEV type '$PID' is not FAT32 or FAT16"
66c60
< # mmc-mount $PDEV $MP ro $FSys
---
> # mmc-mount $PDEV $MP ro
76,78c70
< #echo "mmc-mount $PDEV $MP rw $FSys"
<
< mmc-mount $PDEV $MP rw $FSys
---
> mmc-mount $PDEV $MP rw
81d72
< #echo $RC
96,101d86
< 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"
< fi
<
118,122d102
< if [ "$FSys" = "ext3" ]; then
< #chown -R user:users "$NOKIA_MMC_CAMERA_DIR"
< chown -R user:users "$MP"
< chmod -R 774 "$NOKIA_MMC_CAMERA_DIR"
< fi
max@max-lap:~$
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

ruskie 2010-01-19 06:47

Re: Repartition the internal drive
 
Hmm so all it was is a stupid permissions error... gah... Time to remove MyDocs from the mount... I'll still keep it around somewhere else in case I need to share something with a win system.

ruskie 2010-01-19 07:43

Re: Repartition the internal drive
 
Gah... not even that... The camera app expects a volume... this is just anal.

白い熊 2010-01-24 15:09

Re: Repartition the internal drive
 
Where do you get that it needs a volume from?

Hmmm... so maybe, you're right. Removed the vfat partition completely, just made a MyDocs/DCIM subdir with the appropriate permissions in /home/user

The cam won't take pics there... WTF?

Ahhh, do I really have to have a volume mounted in MyDocs ? Why are the perms allowing read/write in MyDocs and DCIM not enough?

ruskie 2010-01-24 15:42

Re: Repartition the internal drive
 
Quote:

Originally Posted by 白い熊 (Post 491968)
Where do you get that it needs a volume from?

From testing it. I umounted MyDocs and camera refused to work without a volume. It clearly states it wants a volume to store images. And you can basically select 2 volumes... SD card or eMMC partition.

白い熊 2010-01-24 16:36

Re: Repartition the internal drive
 
Oh man, this really is an anal solution.

Created a tiny volume, mounted as ext3 in /home/user/MyDocs

It takes pics fine, duh...

How to get rid of this volume thingie?

白い熊 2010-01-24 16:38

Re: Repartition the internal drive
 
Quote:

Originally Posted by ruskie (Post 492012)
From testing it. I umounted MyDocs and camera refused to work without a volume. It clearly states it wants a volume to store images.

Yep, you're right...
Where's the conf for the camera that mandates this volume stuff though?
You'd think the proper directory structure would be enough... But no...

ruskie 2010-01-24 16:53

Re: Repartition the internal drive
 
I'm assuming the camera app follows some digital camera specification that states that in needs to use a volume.

A simple solution would be: replace the camera app with an alt one.

白い熊 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

ruskie 2010-02-05 21:43

Re: Repartition the internal drive
 
One "s" less :)

But yeah this is exactly what this thread is primarily about :)

dthoaforum 2010-02-06 04:28

Re: Repartition the internal drive
 
What different between: create
1) Separate FAT 2GB partition
2) FAT image which is expandable (Titan's method).
Is the second way more convenient since the image size is actual need and sometime we store maps and pictures from camera more than 2GB (just in case).
Is there any different performance between them?
Thanks.

titan 2010-02-08 19:52

Re: Repartition the internal drive
 
the second one is slower, but more flexible.
Camera and maps don't require a FAT partition (anymore),
i.e. MyDocs can be a normal folder on ext3.
you can loopmount the FAT image on another folder (e.g $HOME/Extern)
and export it via USB.
Quote:

Originally Posted by dthoaforum (Post 512745)
What different between: create
1) Separate FAT 2GB partition
2) FAT image which is expandable (Titan's method).


ruskie 2010-02-09 06:46

Re: Repartition the internal drive
 
Well found some new limitation. Maemo5 expects /usr available early init(/sbin/preinit relies on it). So if you do offload /usr and then rm the old /usr your device will stop booting up.

I guess I'll modify my script to use /usr/local for storage now.

白い熊 2010-02-09 06:55

Re: Repartition the internal drive
 
Yep, you can only move parts of /usr

I've been experimenting, with frequent reflashes due to moving some parts of /usr that were needed early on and it wouldn't boot, haven't gotten around to getting rescue menu working, so that I could jump to rescue shell when not booting and move stuff back. I've had about hundred reflashes already, no BS...

Anyhow, I've moved and symlinked the following from /usr/ and it boots:

doc
games
include
local
man
src
var

and the following from /usr/share/

autoconf
fonts
games
icons
lbreakout2
libtool
locale
mc
microb-engine
mime
nokia-maps
perl
perl5
pixmaps
sounds
themes
tutorial-applet
zoneinfo


ruskie 2010-02-09 07:00

Re: Repartition the internal drive
 
Well rescue shell wouldn't help much since it relies on things in /usr/lib and /usr/bin

libcal* and text2screen and awk and cut from what I can tell.

Sad that M5 doesn't follow the FHS :(

I guess I'll keep / as is and rebuild stuff to use /usr/local

Should be a better solution than symlinking stuff all over the place.

A nice way of a rescue shell would be an initramfs. But I haven't been able to generate a small enough initramfs(needs to be ~200kb since the kernel is 1.7MB and apparently the max size that can be flashed into the kernel part is 2MB :(

白い熊 2010-02-09 07:07

Re: Repartition the internal drive
 
Quote:

Originally Posted by ruskie (Post 517290)
I guess I'll keep / as is and rebuild stuff to use /usr/local

Should be a better solution than symlinking stuff all over the place.

You mean not touch root and rebuild all user progs to use /usr/local ? What's the difference between this and optifying?

ruskie 2010-02-09 07:25

Re: Repartition the internal drive
 
Quote:

Originally Posted by 白い熊 (Post 517294)
You mean not touch root and rebuild all user progs to use /usr/local ? What's the difference between this and optifying?

Optifying - doing a symlink forest
/usr/local - just add /usr/local/bin and keep on running

白い熊 2010-02-09 07:46

Re: Repartition the internal drive
 
True.

I have a better solution even, which I've been getting around to posting for these couple of weeks.

Anyhow, what I've done is created a shell script wrapper via dynamically exporting paths etc. which enables you to what I call optlink any package installed anywhere.

The benefit of this is, it doesn't require root privileges, I just optlink all the apps into a ~/root and ~/links directories and it enables you to have multiple instances/different versions of the package installed, to remove just optunlink it, it just removes the symlinks in these directories all the paths get reexported and your system is clean, you don't mess with anything...

I've been using it some time now, works great, also on a PC.

Need to post a complete guide on this.

You then install apps just by unpacking anywhere, again no root privs, and optlinking it...

I've got all the GNU tools installed this way, not messing with busybox etc.

ruskie 2010-02-09 07:50

Re: Repartition the internal drive
 
Sounds like GNU Stow or some other such tool.

I just built my own gcoreutils and gtar. Might even do the same for the others. Just prefixed with g. Like it more than the gnu-* packages in extras which install inte $PREFIX/bin/gnu


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

vBulletin® Version 3.8.8