Archive for February, 2010

How to fix “no space left on disk” error on iPhone

Posted in UMPC on February 12, 2010 by banpaca
I have been having trouble with installing apps for quite some time now. It started when I tried installing a few upgrades that showed up for some of my installed apps. 

I get several popup windows mentioning errors, "/var/cache/apt/archives/whatever.deb — failed in buffer_Write(fd) (8, ret=1" followed by "sub-process /usr/bin/dpkg returned an error code (1)" and then the lovely "/var/cache/apt/archives/whatever.deb — failed in buffer_Write(fd) (8, ret=1" and then several more "failed buffer writes" …

Terminal:
df -h 
/dev/disk0s1 100% use mount on /                         —
root partition’s size: default only 500M!!!
devfs 100% use mount on /dev
/dev/disk0s2 80% use mount on /private/var


Here’s what’s actually happening: the iPhone (or iPod Touch) places a low, artificial size limit on its /Applications directory, which is reached after installing a number of third-party apps. In order to get around that problem, you need to store your Applications in the Media directory, where much more space is allocated. To do so, follow that process: Warning: whether you don’t type these commands precisely, you may put your iPhone in a state where it repeatedly reboots, potentially forcing a restore or interaction via SSH (discussed at the end of these instructions):

Make certain you have at least 500 MB of free space on your iPhone/iPod Touch (via the indicator on iTunes).
Through Installer.app, download and install “Term-vt100,” located in the “System” category (if you don’t have sufficient space to install Term-vt100, delete some applications temporarily).
Launch Term-vt100 from your SpringBoard (home screen).
Type the following commands exactly on your iPhone’s keyboard, paying specific attention to spacing and capitalization, and press return after each:
cd /
cp -pr Applications /var/root
mv Applications Applications.old
ln -s private/var/root/Applications /Applications

Your Applications should now be stored in the Media (/var/root) directory. You can check that by typing the commands:
cd /
ls -la
Among the listed entries, you should see something like the following:
rwxr-xr-x 1 root admin […] Applications -> private/var/root/Applications
This shows that your /Applications directory is symlinked to /private/var/root/Applications
Now restart your iPhone or iPod Touch. whether everything works normally, launch Term-vt100 again and enter the following commands to delete your old Applications folder:
cd /
rm -rf Applications.old
If something goes wrong, and your iPhone/iPod Touch repeatedly reboots or there are no icons on the SpringBoard, do one of the following:
SSH into your device (if you have OpenSSH installed — see “Manually installing applications” on our Applications page for more info on how to SSH into your device) and re-enter that command: ln -s private/var/root/Applications /Applications
Restore your iPhone/iPod Touch using iTunes and try again (third-party applications will be lost).

Thanks http://www.iphonestalk.com/
http://www.iphonestalk.com/how-to-fix-low-disk-space-error-with-third-party-iphone-apps/