<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=1lnxraider</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=1lnxraider"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/1lnxraider"/>
	<updated>2026-04-06T05:08:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=4049</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=4049"/>
		<updated>2009-08-08T03:33:21Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Workaround for USB/Media Sync: Start/Stop and Mount/Unmount Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual File System=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. The script needs to be run from a non-ssh terminal (ie novaproxy or novaterm). In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround for USB Drive/Media Sync: Start/Stop and Mount/Unmount Script==&lt;br /&gt;
&lt;br /&gt;
This script will start/stop (mount/unmount) the virtual file system, thus functioning as a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes. It is a work in progress and needs to be bullet-proofed. Ideally it should be wrapped around a WebOS GUI app—we are working on this. This script should be saved to a file (i.e. /home/root/vfs), made executable (i.e. chmod 750 /home/root/vfs and then run (i.e. with /home/root/vfs on or /home/root/vfs off). '''Do not save the script to an /opt path.''' Make sure you're running the script to toggle the virtual file system on or off when /media/internal is not mounted as a USB drive and the Media Sync mode is not enabled, otherwise the script will fail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS.&lt;br /&gt;
#&lt;br /&gt;
# Check to make sure /media/internal is&lt;br /&gt;
# mounted&lt;br /&gt;
FSINT=`/bin/df|/bin/grep &amp;quot;/dev/mapper/store-media&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$FSINT&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 echo &amp;quot;USB Drive not mounted. Exiting&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# OpenSSH and Dropbear are most common.&lt;br /&gt;
# Edit to suit environment.&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Devised the initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
             - Helped ultraBlack troubleshoot start/stop / mount/unmount script&lt;br /&gt;
NetWhiz      - Warned that this process disables USB Drive/Media Sync&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
             - Edited this page and the start/stop script to accommodate for /opt&lt;br /&gt;
               not being mounted and for issues people might have mounting/unmounting&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=4048</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=4048"/>
		<updated>2009-08-08T02:36:17Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Workaround for USB/Media Sync: Start/Stop and Mount/Unmount Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual File System=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. The script needs to be run from a non-ssh terminal (ie novaproxy or novaterm). In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround for USB/Media Sync: Start/Stop and Mount/Unmount Script==&lt;br /&gt;
&lt;br /&gt;
This script will start/stop (mount/unmount) the virtual file system, thus functioning as a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes. It is a work in progress and needs to be bullet-proofed. Ideally it should be wrapped around a WebOS GUI app—we are working on this. This script should be saved to a file (i.e. /home/root/vfs), made executable (i.e. chmod 750 /home/root/vfs and then run (i.e. with /home/root/vfs on or /home/root/vfs off). '''Do not save the script to an /opt path.''' Make sure you're running the script to toggle the virtual file system on or off when /media/internal is not mounted as a USB drive and the Media Sync mode is not enabled, otherwise the script will fail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS.&lt;br /&gt;
#&lt;br /&gt;
# Check to make sure /media/internal is&lt;br /&gt;
# mounted&lt;br /&gt;
FSINT=`/bin/df|/bin/grep &amp;quot;/dev/mapper/store-media&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$FSINT&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 echo &amp;quot;USB Drive not mounted. Exiting&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# OpenSSH and Dropbear are most common.&lt;br /&gt;
# Edit to suit environment.&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Devised the initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
             - Helped ultraBlack troubleshoot start/stop / mount/unmount script&lt;br /&gt;
NetWhiz      - Warned that this process disables USB Drive/Media Sync&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
             - Edited this page and the start/stop script to accommodate for /opt&lt;br /&gt;
               not being mounted and for issues people might have mounting/unmounting&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3838</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3838"/>
		<updated>2009-08-05T12:15:40Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Workaround: Start/Stop Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual file system=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt/ ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveat=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. The script needs to be run from a non-ssh terminal (ie novaproxy or novaterm). In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround: Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes. This script should be saved to a file (ie /home/root/vfs), made executable (ie chmod 750 /home/root/vfs and then run (ie /home/root/vfs on or /home/root/vfs off). '''Do not save the script to an /opt path.'''&lt;br /&gt;
&lt;br /&gt;
You may need to use novaproxy and execute some of the commands manually to get it to work. Instead of the variables (sequences of letters starting with $), you may need to use &amp;quot;/dev/loop0&amp;quot; or &amp;quot;/opt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
NetWhiz      - Gave additional warning that this process disables USB Drive/Media Sync&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3837</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3837"/>
		<updated>2009-08-05T12:13:06Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Caveat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual file system=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt/ ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveat=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. The script needs to be run from a non-ssh terminal (ie novaproxy or novaterm). In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround: Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes. This script in its entirety is meant to be saved to a file (ie /home/root/vfs), made executable (ie chmod 750 /home/root/vfs and then run (ie /home/root/vfs on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You may need to use novaproxy and execute some of the commands manually to get it to work. Instead of the variables (sequences of letters starting with $), you may need to use &amp;quot;/dev/loop0&amp;quot; or &amp;quot;/opt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
NetWhiz      - Gave additional warning that this process disables USB Drive/Media Sync&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3834</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3834"/>
		<updated>2009-08-05T10:31:12Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Workaround: Start/Stop Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual file system=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt/ ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveat=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround: Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes. This script in its entirety is meant to be saved to a file (ie /home/root/vfs), made executable (ie chmod 750 /home/root/vfs and then run (ie /home/root/vfs on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You may need to use novaproxy and execute some of the commands manually to get it to work. Instead of the variables (sequences of letters starting with $), you may need to use &amp;quot;/dev/loop0&amp;quot; or &amp;quot;/opt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
NetWhiz      - Gave additional warning that this process disables USB Drive/Media Sync&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3816</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3816"/>
		<updated>2009-08-05T03:54:51Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Workaround: Start/Stop Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap Linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root file system in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var file system in /var/usr/palm/applications. Also for so-called &amp;quot;rooted&amp;quot; Pre's the Optware Linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual Linux file system using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual file system on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual file system.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must have access to the Linux shell to perform this process. It is assumed that you followed the procedure to install Optware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
=Procedure for Creating a Linux Virtual file system=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in the USB Drive or Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all of your Optware packages to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual file system&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 file system&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual file system&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual file system.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual file system&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual file system on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img /opt/ ext3 loop,noatime 1 2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt bind defaults,bind 0 0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the Optware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveat=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
A method to safely unmount Virtual file system when selecting USB Drive and Media Sync modes is under development.&lt;br /&gt;
&lt;br /&gt;
See the start/stop script below for now. In the future this should be wrapped inside a homebrew GUI.&lt;br /&gt;
&lt;br /&gt;
==Workaround: Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
You may need to use novaproxy and execute some of the commands manually to get it to work. Instead of the variables (sequences of letters starting with $), you may need to use &amp;quot;/dev/loop0&amp;quot; or &amp;quot;/opt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist for the VFS&lt;br /&gt;
# Grab and parse entry&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point (ie /opt)&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS file system Type (ie ext3)&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Loopback device associated with VFS (ie /dev/loop0)&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         # Work-a-round to disassociate VFS from loopback device&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial, is working on fixing caveats&lt;br /&gt;
ultraBlack   - Found and had confirmed the major caveat that disables Media Sync and USB modes&lt;br /&gt;
NetWhiz      - Gave additional warning that this process disables USB Drive/Media Sync&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3770</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3770"/>
		<updated>2009-08-04T15:51:58Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: Modified Start/Stop Script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
==Creating Linux Virtual Filesystem==&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual filesystem&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 filesystem&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual filesystem&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual filesystem.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual filesystem&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual filesystem on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img     /opt/   ext3    loop,noatime    1       2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt  bind     defaults,bind          0       0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the opt-ware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop&lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# An entry in /etc/fstab must exist filename&lt;br /&gt;
FSVFS=`/bin/grep &amp;quot;/opt&amp;quot; /etc/fstab|grep loop`&lt;br /&gt;
if [ &amp;quot;$FSVFS&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 # Complete FileName of VFS to mount/unmount&lt;br /&gt;
 LVFSFN=`echo $FSVFS|/usr/bin/awk '{print $1}'`&lt;br /&gt;
 # VFS Mount Point&lt;br /&gt;
 LVFSMP=`echo $FSVFS|/usr/bin/awk '{print $2}'`&lt;br /&gt;
 # VFS Filesystem Type&lt;br /&gt;
 LVFSTP=`echo $FSVFS|/usr/bin/awk '{print $3}'`&lt;br /&gt;
else&lt;br /&gt;
 echo &amp;quot;**** No /etc/fstab entry&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Determine if VFS is mounted&lt;br /&gt;
VFSMTD=`/bin/df|/bin/grep &amp;quot;$LVFSMP&amp;quot;|/bin/grep &amp;quot;^/dev/loop&amp;quot;`&lt;br /&gt;
if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
then&lt;br /&gt;
 LVFSDV=`echo $VFSMTD|/usr/bin/awk '{print $1}'`&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        if [ -e &amp;quot;$LVFSFN&amp;quot; -a -d &amp;quot;$LVFSMP&amp;quot; -a &amp;quot;$VFSMTD&amp;quot; = &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Mounting Linux VFS'&lt;br /&gt;
         /bin/mount &amp;quot;$LVFSFN&amp;quot;&lt;br /&gt;
         echo '**** Starting Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Linux VFS Enabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error mounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        if [ &amp;quot;$VFSMTD&amp;quot; != &amp;quot;&amp;quot; -a &amp;quot;$LVFSDV&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
        then&lt;br /&gt;
         echo '**** Stopping Applications'&lt;br /&gt;
         for x in $APPS&lt;br /&gt;
           do&lt;br /&gt;
            if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
            then&lt;br /&gt;
            /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
            fi&lt;br /&gt;
         done&lt;br /&gt;
         echo '**** Unmounting Linux VFS'&lt;br /&gt;
         /bin/umount &amp;quot;$LVFSMP&amp;quot;&lt;br /&gt;
         /sbin/losetup -d $LVFSDV&lt;br /&gt;
         echo '**** Linux VFS Disabled'&lt;br /&gt;
        else&lt;br /&gt;
         echo '**** Error unmounting VFS'&lt;br /&gt;
         exit 1&lt;br /&gt;
        fi&lt;br /&gt;
        ;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;Usage: `/usr/bin/basename $0` on|off&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes (under development).&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3764</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3764"/>
		<updated>2009-08-04T09:27:52Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: Added Start/Stop Script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
==Creating Linux Virtual Filesystem==&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual filesystem&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum size should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 filesystem&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual filesystem&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual filesystem.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual filesystem&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual filesystem on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img     /opt/   ext3    loop,noatime    1       2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt  bind     defaults,bind          0       0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the opt-ware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Start/Stop Script==&lt;br /&gt;
&lt;br /&gt;
A work in progress. Needs to be bullet-proofed. Ideally should be wrapped around a WebOS GUI app. This script is a work-a-round to allow using the Palm Pre's USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#&lt;br /&gt;
# List of Optware applications to start/stop &lt;br /&gt;
# in conjunction with mounting/unmounting VFS&lt;br /&gt;
# Edit to suit environment&lt;br /&gt;
APPS=&amp;quot;optware-openssh optware-dropbear&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Complete FileName of VFS to mount/unmount&lt;br /&gt;
# An entry in /etc/fstab must exist filename&lt;br /&gt;
LVFS=&amp;quot;/media/internal/vfs/optware.img&amp;quot;&lt;br /&gt;
&lt;br /&gt;
case $1 in&lt;br /&gt;
  &amp;quot;on&amp;quot; )&lt;br /&gt;
        echo '**** Mounting Linux VFS'&lt;br /&gt;
        /bin/mount &amp;quot;$LVFS&amp;quot;&lt;br /&gt;
        echo '**** Starting Applications'&lt;br /&gt;
        for x in $APPS&lt;br /&gt;
          do&lt;br /&gt;
          if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
          then&lt;br /&gt;
          /sbin/initctl start &amp;quot;$x&amp;quot;&lt;br /&gt;
          fi&lt;br /&gt;
        done&lt;br /&gt;
        echo '**** Linux VFS Enabled'&lt;br /&gt;
        ;;&lt;br /&gt;
  &amp;quot;off&amp;quot; )&lt;br /&gt;
        echo '**** Stopping Applications'&lt;br /&gt;
        for x in $APPS&lt;br /&gt;
          do&lt;br /&gt;
          if [ -f /etc/event.d/&amp;quot;$x&amp;quot; ]&lt;br /&gt;
          then&lt;br /&gt;
          /sbin/initctl stop &amp;quot;$x&amp;quot;&lt;br /&gt;
          fi&lt;br /&gt;
        done&lt;br /&gt;
        echo '**** Unmounting Linux VFS'&lt;br /&gt;
        /bin/umount /opt&lt;br /&gt;
        /sbin/losetup -d /dev/loop0&lt;br /&gt;
        echo '**** Linux VFS Disabled'&lt;br /&gt;
	;;&lt;br /&gt;
  * )&lt;br /&gt;
        echo &amp;quot;$1 unknown argument.  Argument must be 'on' or 'off'&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes (under development).&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3762</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3762"/>
		<updated>2009-08-04T08:23:39Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: /* Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual filesystem&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust size (bs*count) as needed, the minimum should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 filesystem&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual filesystem&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual filesystem.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual filesystem&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual filesystem on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img     /opt/   ext3    loop,noatime    1       2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt  bind     defaults,bind          0       0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the opt-ware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes (under development).&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3733</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3733"/>
		<updated>2009-08-04T03:05:20Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: modified procedure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Create a directory on the USB drive portion to hold the virtual filesystem&lt;br /&gt;
mkdir /media/internal/vfs&lt;br /&gt;
&lt;br /&gt;
#  Create a 1GB file (adjust count as needed, the minimum should be 256MB)&lt;br /&gt;
dd if=/dev/zero of=/media/internal/vfs/optware.img bs=1024 count=1024k&lt;br /&gt;
&lt;br /&gt;
# Create linux ext3 filesystem&lt;br /&gt;
mkfs.ext3 -F /media/internal/vfs/optware.img&lt;br /&gt;
&lt;br /&gt;
# Create a temporary mount point&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Mount newly created virtual filesystem&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img  /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Populate new virtual filesystem.&lt;br /&gt;
# Must be in the source directory.&lt;br /&gt;
cd /opt&lt;br /&gt;
tar cvf - . |  (cd /tmp/opt; tar xf -)&lt;br /&gt;
cd /&lt;br /&gt;
&lt;br /&gt;
# Unmount virtual filesystem&lt;br /&gt;
umount /tmp/opt&lt;br /&gt;
&lt;br /&gt;
# Unbind /var/opt from /opt&lt;br /&gt;
umount /opt&lt;br /&gt;
&lt;br /&gt;
# If no errors, mount virtual filesystem on /opt&lt;br /&gt;
# otherwise skip&lt;br /&gt;
mount -o loop /media/internal/vfs/optware.img /opt/&lt;br /&gt;
&lt;br /&gt;
# Add the following line to /etc/fstab to automount (without the #).&lt;br /&gt;
# /media/internal/vfs/optware.img     /opt/   ext3    loop,noatime    1       2&lt;br /&gt;
#&lt;br /&gt;
# Comment out the /var/opt entry, should be similar to next line&lt;br /&gt;
#/var/opt /opt  bind     defaults,bind          0       0&lt;br /&gt;
#&lt;br /&gt;
# reboot your phone, if error noted when attempting to unmount /opt&lt;br /&gt;
reboot&lt;br /&gt;
&lt;br /&gt;
# If no errors noted with the opt-ware apps, &lt;br /&gt;
# remove files/directories from /var/opt&lt;br /&gt;
rm -r /var/opt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes (under development).&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3698</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3698"/>
		<updated>2009-08-03T14:33:56Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: Format changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
NOTE: The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/media/internal/optware.img bs=1024 count=1000k&lt;br /&gt;
mkfs.ext3 -F /media/internal/optware.img&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img  /tmp/opt&lt;br /&gt;
rm -rf /tmp/opt/lost\+found&lt;br /&gt;
mv /opt/* /tmp/opt/&lt;br /&gt;
umount /opt&lt;br /&gt;
umount /var/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img /opt/&lt;br /&gt;
echo '/media/internal/optware.img /opt ext3 defaults,loop 0 0' &amp;gt;&amp;gt;/etc/fstab&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3697</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3697"/>
		<updated>2009-08-03T13:28:11Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html Linux Online - Using a file instead of a partition]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
NOTE: The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/media/internal/optware.img bs=1024 count=1000k&lt;br /&gt;
mkfs.ext3 -F /media/internal/optware.img&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img  /tmp/opt&lt;br /&gt;
rm -rf /tmp/opt/lost\+found&lt;br /&gt;
mv /opt/* /tmp/opt/&lt;br /&gt;
umount /opt&lt;br /&gt;
umount /var/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img /opt/&lt;br /&gt;
echo '/media/internal/optware.img /opt ext3 defaults,loop 0 0' &amp;gt;&amp;gt;/etc/fstab&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3696</id>
		<title>Tutorials Linux opt on loopback</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Tutorials_Linux_opt_on_loopback&amp;diff=3696"/>
		<updated>2009-08-03T12:57:20Z</updated>

		<summary type="html">&lt;p&gt;1lnxraider: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background &amp;amp; Purpose=&lt;br /&gt;
&lt;br /&gt;
The Palm Pre's 8GB HD is configured with three partitions:&lt;br /&gt;
&lt;br /&gt;
1) /dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB&lt;br /&gt;
2) /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot&lt;br /&gt;
3) /dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB&lt;br /&gt;
&lt;br /&gt;
The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:&lt;br /&gt;
&lt;br /&gt;
/dev/store/root mounted on / (root) 456 MB&lt;br /&gt;
/dev/store/var mounted on /var 256MB&lt;br /&gt;
/dev/store/update mounts on /var/lib/update 56MB (not mounted)&lt;br /&gt;
/dev/store/log/ mounted on /var/log 40MB&lt;br /&gt;
/dev/store/media mounted /media/internal 6.69GB&lt;br /&gt;
/dev/store/swap linux swap 128MB&lt;br /&gt;
&lt;br /&gt;
It has been observed that if /var or / (root) usage is greater than or equal to 90% than the FAILED_NOT_ENOUGH_INSTALL_SPACE error is generated. &amp;quot;Builtin&amp;quot; applications reside on the root filesystem in /usr/palm/applications. Downloaded apps and those installed with palm-install reside on the /var filesystem in /var/usr/palm/applications. Also for rooted Pre's the opt-ware linux-based apps are stored in /var/opt.&lt;br /&gt;
&lt;br /&gt;
One fix for a rooted Pre is to create a virtual linux filesystem using a portion of the space allocated to /media/internal using a procedure similar to this one:&lt;br /&gt;
&lt;br /&gt;
[url=http://www.linux.org/docs/ldp/howto/Cryptoloop-HOWTO/filebased.html]Linux Online - Using a file instead of a partition[/url]&lt;br /&gt;
&lt;br /&gt;
Then mount the virtual filesystem on /opt vs binding /var/opt to /opt. Then relocating the files/directories under /var/opt to the new virtual filesystem.&lt;br /&gt;
&lt;br /&gt;
NOTE: The /dev/store/update is mounted when you run the Update process. It would seem that the updates are stored here (at least some of them) prior to installation.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
You must be root to perform this process. It is assumed that you followed the procedure to install opt-ware apps in /var/opt and linked /var/opt to /opt with the &amp;quot;mount -o bind /var/opt /opt&amp;quot; command and there is an equivalent entry in the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Procedure=&lt;br /&gt;
&lt;br /&gt;
Do '''NOT''' do this if you want to connect your Pre to your computer in USB Drive or MediaSync mode.&lt;br /&gt;
&lt;br /&gt;
The following commands will move all your optware to an ext3 1GB loopback image that resides on /media/internal.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/media/internal/optware.img bs=1024 count=1000k&lt;br /&gt;
mkfs.ext3 -F /media/internal/optware.img&lt;br /&gt;
mkdir /tmp/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img  /tmp/opt&lt;br /&gt;
rm -rf /tmp/opt/lost\+found&lt;br /&gt;
mv /opt/* /tmp/opt/&lt;br /&gt;
umount /opt&lt;br /&gt;
umount /var/opt&lt;br /&gt;
mount -o loop /media/internal/optware.img /opt/&lt;br /&gt;
echo '/media/internal/optware.img /opt ext3 defaults,loop 0 0' &amp;gt;&amp;gt;/etc/fstab&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Caveats=&lt;br /&gt;
&lt;br /&gt;
Currently this procedure will disable USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=To Do's=&lt;br /&gt;
&lt;br /&gt;
Create a method to safely unmount Virtual FileSystem when selecting USB Drive and Media Sync modes.&lt;br /&gt;
&lt;br /&gt;
=Credits=&lt;br /&gt;
&lt;br /&gt;
PuffTheMagic - Initial process&lt;br /&gt;
&lt;br /&gt;
NetWhiz      - USB Drive/Media Sync Warning&lt;br /&gt;
&lt;br /&gt;
1lnxraider   - Expanded and modified tutorial&lt;/div&gt;</summary>
		<author><name>1lnxraider</name></author>
	</entry>
</feed>