Posts: 259 | Thanked: 72 times | Joined on Dec 2007 @ Halifax, NS
#1
I sought and I searched. I looked. Couldn't find anything. So to avoid being disciplined by the forum cops, I did it myself.

This is with my OS2008 n800, so YMMV.

This requires some unix familiarity. If any of this is unfamiliar to you, you should probably not dive in here.

Most of my info came from these posts:
http://www.internettablettalk.com/fo...01&postcount=1
http://www.internettablettalk.com/fo...5&postcount=49

1) I used openssh, but becomeroot works well too. I needed the "Eko One" and "Maemo Extras" repositories - even though both of them were for OS2007.
2) install becomeroot, and e2fsprogs
3) Remove the external card, just to be safe. I didn't want to mux up my backed up data accidentally.
4) Turn off swap from your internal card. I did this from the control panel.
5) Log in as root, and umount the internal card! run "mount" to be sure it's not there.
6) repartition the card as explained here. I have a 4GB card, and I wanted 512MB so the one recipe there was perfect for me.
7) Save and sync. ("sync"). Do it again.
8) reboot the device
9) Get root again, and format the filesystems.
mkfs.vfat -L Internal /dev/mmcblk0p1
mkfs.ext2 -L Stretch /dev/mmcblk0p2
10) I rebooted at this point, just to make sure it was mounting and working correctly. At some point the vfat entry got inserted into /etc/fstab - I commented it out and it seemed to mount fine anyway.
11) Create a mountpoint and add the ext2 entry to fstab:
mkdir /mnt/internal
/dev/mmcblk0p2 /mnt/internal ext2 rw,noauto,noatime 0 0

Note: nodev, nosuid, and noexec are probably a good idea... though exec might come in handy.

12) Mount will fail at this point because ext2 module is not inserted. I decided to put this all in a init.d script, swiping liberally from the posts above:

Code:
#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          ext2fs
# Required-Start:    $local_fs
# Default-Start:     S
# Short-Description: setup and mount ext2 filesystem on the internal card
### END INIT INFO
#
# Load the ext2 modules

setBinDirectory ()
{
        BINDIR=/mnt/initfs/lib/modules/current
        [ ! -d $BINDIR ] && BINDIR=/mnt/initfs/lib/modules/2.6.18-omap1
        [ ! -d $BINDIR ] && BINDIR=/mnt/initfs/lib/modules/`uname -r`

        if [ ! -f $BINDIR/mbcache.ko ]; then
                echo "Unable to locate mbcache.ko - aborting"
                exit 1
        fi
}

case "$1" in
  start)
        echo -n "Installing ext2.ko module and mounting Internal partition #2..
        setBinDirectory
        [ "`lsmod|grep mbcache`" = "" ] && insmod $BINDIR/mbcache.ko
        [ "`lsmod|grep ext2`" = "" ] && insmod $BINDIR/ext2.ko
        [ "`grep "/opt " /etc/mtab`" = "" ] && mount /dev/mmcblk0p2 /mnt/internal
        ;;
  stop)
        echo -n "Stopping ext2 filesystems"
        umount /mnt/internal
        ;;
esac
13) I saved this as ext2fs and ran ./ext2fs stop and ./ext2fs start to make sure all was working fine. Once I was sure it wasn't going to hang up the system, I ran "update-rc.d ext2fs defaults".

All seemed to be well at this point!

14) As root, again, chmod the filesystem so user can get at it.
chmod -R gu+rw /mnt/internal
chown -R user:users /mnt/internal

Note: probably more proper to create a subdirectory for the user and chmod that, but I guess I'm not treating this like a real multiuser system...
15) As user (i.e. not root) I moved over my .gvm directory to the card, and made a symbolic link in its place in my home directory:
ln -s /mnt/internal/.gvm/ ~/.gvm

At this point I could run GarnetVM off the card - no more worrying about a 64MB memory file taking up all of my space!

Note I did not copy over all of my home directory... it should be possible though. I decided to risk only my Palm environment on this test.

Any thoughts/additions/corrections?

Last edited by BoxOfSnoo; 2007-12-21 at 20:38. Reason: Slight change for user context in #15
 

The Following 4 Users Say Thank You to BoxOfSnoo For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 05:32.