As all of you might be aware by now, after installing quite a few applications, installer.app starts complaining how you’re running out of space. The fix is simple, all you do is move applications to a bigger disk (/dev/disk0s2) and point a symlink to it. This process involves moving the /Applications directory to the Media partition to give you more space to install apps and themes from Installer. This includes creating a symlink in the root directory, much like you do during the jailbreak process.
NOTE: If you did this on 1.1.1 and then upgraded to 1.1.2, you may notice as you are looking through your ssh program that the symlink is no longer there. You have to be logged in through an SCP session, not an SFTP session(you can do this by installing OpenSSH through Installer.app), and you can recreate this. Delete the ROOT_Applications directory you created, and then follow the steps again. You will have to reinstall all your apps from Installer, but this is the safest way to do this. You won’t have to reinstall themes and the like, only the actual applications themselves.
Needed:
– 1.1.1 or 1.1.2 firmware installed
– an SSH program of your choice(WinSCP…the username is root and the password is dottie on 1.0.2, and on 1.1.1 the password is alpine)
– BSD Subsystem
Step 1:
First we have to make sure that the noexec command is not set in the /etc/fstab file. So, connect via SSH however you’d like, and navigate to your /etc directory. If you are using WinSCP you can double-click the file and view it straight from WinSCP and edit it. If you are using a command-line ssh program, such as Putty, you’ll need to pull it from the iPhone and look at it, then put it back. Simply run this command:
getfile /etc/fstab fstab
And you’ll have the fstab file on your computer wherever Putty happens to be stored.
Open up the fstab file. Notice in the red circle that it says “noexec”? We need to get that out of there. So, delete it, and save it.
Again if you are using a command-line ssh program you’ll have to put it back. Run this command:
Code:
putfile /etc/fstab fstab
Step 2:
Now that we are able to run the commands that we need to run, we need to actually move the /Applications directory. In WinSCP hit Ctrl+T to bring up the terminal window(I’m not sure what the command is in other programs). Using a command-line terminal you won’t need to do this step, obviously
Now type this command and hit Execute:
Code:
cp -R /Applications /private/var/root/ROOT_Applications
Note that, for some reason, after running this command WinSCP reported a connection lost error. If something similar happens to you, simply reconnect and you should be OK.
Notice that now, in the /private/var/root directory, ROOT_Applications now shows up! That was easy, wasn’t it?
Step 3:
Now we need to create the symlink which will trick the iPhone into thinking we never moved the /Applications directory. Go back to your terminal, and type in this command:
Code:
rm -rf /Applications && ln -s /private/var/root/ROOT_Applications /Applications
This does two things in one step. First it removes the /Applications directory, and then it recreates it as a shortcut to the new one we just made before. If you look in the root directory, you’ll see the /Applications folder, only now it has the shortcut arrow on it. Opening it up will show you all your Applications, as normal. If not, something got botched somewhere along the line. Restart your iPhone and you should be good to go!
Removing the symlink:
If something happened to your iPhone, reversing the process is easy to do. Go back in through ssh and type the following three commands into the terminal:
Code:
rm /Applicationscp -R /private/var/root/ROOT_Applications /Applications rm -rf /private/var/root/ROOT_Applications
And everything should be alright. You might want to do this before doing any future upgrades, as I’m not sure if this will affect the upgrade or not.
-Thanks scr4p and rianbattle
Or Follow the iPhone Elite Instructions:
connect to your iPhone via SSH and execute the following command:
# cat /etc/fstab /dev/disk0s1 / hfs rw 0 1 /dev/disk0s2 /private/var hfs rw 0 2
note the rw in: /dev/disk0s2 /private/var hfs rw 0 2
If your /dev/disk0s2 line looks like the following
# cat /etc/fstab /dev/disk0s1 / hfs rw 0 1 /dev/disk0s2 /private/var hfs r 0 2
or like the following
# cat /etc/fstab /dev/disk0s1 / hfs rw 0 1 /dev/disk0s2 /private/var hfs rw,noexec 0 2
then you will have to download /etc/fstab via SCP and change it to look like the following:
/dev/disk0s1 / hfs rw 0 1 /dev/disk0s2 /private/var hfs rw 0 2
once that’s settled..
# mkdir /private/var/Applications # cp -Rp /Applications/* /private/var/Applications # mv /Applications /Applications.backup && ln -s /private/var/Applications/ /Applications # reboot
once your iphone has rebooted, the problem should no longer persist.
Ryan Worrell // Dec 12, 2007 at 9:01 AM
Yeah with these new firmwares taking up tons of space this is pretty much a must for any iphone now.
truehybridx // Dec 12, 2007 at 4:14 PM
yay cheating like a fool lol
soo is it all apps that you have to reinstall or can you exclude system catagory such as BSD, Installer, Dock???
hmm ill start on this right away after i get my barrings streight
Laurent // Dec 16, 2007 at 1:45 PM
Thanks, very useful.
I don’t understand why it is so comlicated and sometime “illegal” to customize an iphone.
Need More App Space?: Guide To Move /Applications To Free Up Space | Iphonerz.net // Dec 17, 2007 at 9:13 AM
[…] NOTE: If you did this on 1.1.1 and then upgraded to 1.1.2, you may notice as you are looking through your ssh program that the symlink is no longer there. You have to be logged in through an SCP session, not an SFTP session(you can do this by installing OpenSSH through Installer.app), and you can recreate this. Delete the ROOT_Applications directory you created, and then follow the steps again. You will have to reinstall all your apps from Installer, but this is the safest way to do this. You won’t have to reinstall themes and the like, only the actual applications themselves. (more…) […]
Need More App Space?: Guide To Move /Applications To Free Up Space | iPhone - Blog // Dec 19, 2007 at 6:29 AM
[…] You won’t have to reinstall themes and the like, only the actual applications themselves. (more…) […]
Cracker102 // Jan 2, 2008 at 12:47 PM
Ok thats cool. But can you do it on 1.1.2 Because im mixed up some say to do it on 1.1.1 then they say to upgrade after donig it on 1.1.1 then upgrade to 1.1.2. ( I HAVE 1.1.2)
Limited Edition iPhone // Jan 2, 2008 at 1:27 PM
Yes do it on 1.1.2
fateman // Mar 21, 2008 at 2:30 PM
does anyone know if it works for FW1.1.4 as well?
Limited Edition iPhone // Mar 21, 2008 at 3:48 PM
yes it still works. Bosstool will do it automatically for you.
fateman // Mar 21, 2008 at 4:04 PM
thanx.. I already did it using BossTool. its a very good app. especialy for me, novice with the iPhone
Drifter // Aug 13, 2009 at 11:31 AM
Let me ask, if I do this will this affect my present applications? Will I need to reinstall them? And what about new apps, will they be moved automatically to the media partition? Thx & cheers.