How to REALLY gain memory into the System partition

Discussion in 'iPod touch Hacks' started by Lin, Nov 8, 2007.

  1. Lin macrumors member

    Joined:
    Sep 28, 2007
    Location:
    France
    #1
    Hi everybody :)
    I found some easy tricks which do work and may be useful...

    The symptom
    When you try to open large files with Safari, OSX raises warnings about the available space, advising you'd better delete some stuff around.

    The root cause
    The "mass memory unit" on the iPhone/IPT is partitioned in two:
    1-the system partition, 300MB, which holds initially about everything, including the /Applications folder
    2-the "data" partition, holding the rest of the space, with essentially the /var partition, where goes all your movies, musics and whatnots.

    Why?
    Separating the system and the data is a good and old trick. I have done in on my Macs since the early '90. It avoids mixing the data files with the system files (actually I have four partitions on my Macs: system, applications, data, and backup system).
    With the iPhone/IPT, it allows for easy system and applications updates, without impacting the datas.

    Troubles brewing
    For once, Apple wasn't forward-looking enough (had not considered the hackers our there ;).
    On a US-only iPhone with OSX 1.0.2, the standard System partition, with all the standard apps, leaves a bit over 100MB free, which is far enough for "standard use".
    However, an international iPod Touch with OSX 1.1.1 (non-hacked) goes down to 30MB free, which is much scarcer :(
    After jailbreaking and adding the iPhone apps plus some utilities like BSD Subsystem, MobileFinder and VT100, it leaves barely 24MB free.

    More troubles
    Some apps like the Apache server look for their data on the System partition :mad:

    Current solutions ?
    Moving the Applications folder to the largest partition seems a neat trick. However... just look around and you'll see it can head to troubles.
    And anyway, the Applications folder, with the standard apps plus the iPhone apps and a few others, is barely over 19MB. Not a big immediate improvement.
    I used MobileFinder (Finder in the following) to move some apps to the /var folder, and quickly noticed the gain was very limited. Plus I "bricked" the Maps.app, as the Apple apps DO NOT easily surrender to be moved around like that! (I had to reinstall Maps through sFTP).
    When noticing how limited was the improvement, I "dumped" all the IPT filesystem to a computer, and checked the size of the various files and folders.

    A new trick coming
    It happens Apple HAD to add lots of localized stuff to allow using the IPT internationally, and some do gobble "disk" space for breakfast :(
    Thankfully, we can easily "swap" some of them to the largest partition, and free valuable space on the System partition :D
    Basically, the trick uses the Finder (so no typing of arcane UNIX commands), and the process is this one:
    1-Move a specific file/directory into the /var folder
    2-Make a bookmark of it in the new location
    3-Paste or move the bookmark to the original location, and Voilà!

    A step by step How-to
    Of course, this assumes your IPT is jailbroken :rolleyes:
    You also have to install the BSD Subsystem, the MobileFinder (and optinally MobilePreview for convenience), and Term-vt100 (in case of emergency).
    Begin with something easy, the "Wallpaper" folder, which is about 9MB.
    1 Double-tap the Finder on the Springboard
    2 Tap "Settings" and activate the following options:
    -Show Hidden Files
    -Show ".." Entry
    -System File Access
    DE-activate the following:
    -Application Launch
    -Executable Launch
    Optionally, scroll down and reduce the "Row Size"
    Tap "Finder" to go out of the Settings
    3 Tap "Up" until you are at the topmost level, showing:
    Applications
    cores
    DCIM
    ...
    4 Double-tap "Library" and scroll down to see "Wallpaper"
    5 SINGLE-tap "Wallpaper"
    Tap the "File" button, down the screen
    Tap "Move" and WAIT until the rightmost buttons change to "Paste" and
    "Cancel"
    6 Tap the "~" button (right to the "Apple" button)
    Double-tap "Media"
    Tap the "Paste" button (should still be blue-enabled), which should move
    the "Wallpaper" folder here
    7 Tap the "Wallpaper" folder
    Tap the "Create" button
    Tap the "Bookmark" button (this creates a symbolic link into a special
    folder)
    8 Tap the "Apple" button
    Double-tap the "Bookmarks" folder, here is the "Wallpaper" folder,
    but is JUST the symbolic link (an alias)
    Tap "Wallpaper"
    Tap the "File" button
    Tap the "Move" button, WAIT until the rightmost buttons change
    9 Go back to the original "Library" folder (tap 6 times the "Up" button)
    Tap the "Paste" button
    -------there you are. The Wallpaper folder is now on the large partition, and you have an alias pointing to it.

    ****back in the afternoon, going to eat now :)
     
  2. Lin thread starter macrumors member

    Joined:
    Sep 28, 2007
    Location:
    France
    #2
    Let us go on

    Well, by swapping the "Wallpaper" folder, we spared 8.1MB. Now for the REAL stuff ;)

    You can swap in the same way the following files (special Unicode fonts).
    In the /System/Library/Fonts/
    arialuni.ttf (22MB+ !!!)
    In the /System/Library/Fonts/Cache/
    HiraginoKakuGothicProNW3.otf (7.2MB)
    HiraginoKakuGothicProNW6.otf (7.3MB)
    STHeiti.ttf (13.2MB)
    STXihei.ttf (15MB)

    Use the same process as described in the previous post.

    When you are done, launch the VT100 terminal and enter
    df

    Your "System" partition (disk0s1) should have more than 100000 1-K blocks free ;)
     
  3. cwolves macrumors regular

    Joined:
    Oct 11, 2007
    #3
    What's the point in this post? I've yet to see any program complain about low disk space and I do way more than your average user, even the average person that's hacked their touch. I have a whopping 22MB free on the primary partition.

    Oh, I also moved the apache root directory off. Short of that, nothing uses the root partition! That's why the application folder was moved off - so you could install NEW apps to your heart's content, not so that existing apps wouldn't take up room.
     
  4. PowerFullMac macrumors 601

    PowerFullMac

    Joined:
    Oct 16, 2006
    #4
    Could you use the symbolic link thing to symlink the Applications folder so we have more space for apps?
     
  5. agoo7 macrumors newbie

    Joined:
    Nov 25, 2007
    #5
    I installed arabic SMS program and by mistake overwrite arialuni.ttf file. Now my terminal vt100 lines overlaps when I type "ls -l" or "less" for example. I have uploaded a screen shot here:

    h**p://rapidshare.com/files/72155280/070306152051.jpg.html

    Unfortunatly I didn't make a copy of original file. Could someone please post download link or send it to me via email to ag_oo7@yahoo.com

    :(
     

Share This Page