The Following 3 Users Say Thank You to Twilight For This Useful Post: | ||
![]() |
2015-06-11
, 08:10
|
|
Posts: 6,450 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#2
|
![]() |
2015-06-11
, 14:21
|
Posts: 11 |
Thanked: 16 times |
Joined on Jun 2015
|
#3
|
![]() |
2015-06-12
, 12:41
|
|
Posts: 6,450 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#5
|
The Following User Says Thank You to pichlo For This Useful Post: | ||
![]() |
2015-06-14
, 10:39
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#6
|
#!/bin/sh # N900 script to safely free space on rootfs # (c) 2010 by Thomas Tanner <maemo@tannerlab.com> # licensed under GPLv3 # version 0.5 (16. May 2010) if test "`id -u`" -ne 0; then echo "Error: This script must be run as root!" echo "Please make sure that the package rootsh from extras is installed" echo "and execute \"sudo gainroot\" and then \"$0\" in Terminal" exit 1 fi echo rootfs before: df -h / # move root stuff to /home dirs="usr/share/icons usr/share/nokia-maps usr/share/fonts usr/share/locale usr/lib/locale var/lib/apt usr/share/themes var/lib/dpkg" #optional: usr/share/themes var/lib/dpkg if test -d /home/var/cache/apt; then # keep existing apt cache rm -rf /var/cache/apt ln -s /home/var/cache/apt /var/cache/apt else dirs="$dirs var/cache/apt" fi (cd / && du -sc $dirs) for d in $dirs; do test -L /$d && continue echo moving /$d rm -rf /home/opt/$d mkdir -p /home/opt/$d cp -a /$d /home/opt/$d/.. mv /$d /$d.old ln -s /home/opt/$d /$d rm -rf /$d.old done sync echo "success" echo "rootfs after (after a reboot the actual free space will be shown):" df -h /
![]() |
2015-06-14
, 23:46
|
Posts: 11 |
Thanked: 16 times |
Joined on Jun 2015
|
#7
|
Why are you asking, by the way? Are you suffering any specific problems?
I tend to use this script for creating space in rootfs. It does not try to optify any packages, but moves the largest folders and their content to /opt, which is part of the sdcard's partition.
Copy and paste to a file, make it executable and run it from X-Terminal application as root.
I did not create the script, but modified it for easier reading
The Following User Says Thank You to Twilight For This Useful Post: | ||
![]() |
2015-06-15
, 07:48
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#8
|
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
2015-06-15
, 08:26
|
|
Posts: 6,450 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#9
|
The script fetches the folders usr/share/icons, usr/share/nokia-maps, usr/share/fonts, usr/share/locale, usr/lib/locale, var/lib/apt, usr/share/themes, var/lib/dpkg and /var/cache/apt and copies them one by one to the second partition of the internal card (by default 2GB) and creates links to the new place for the system to find them.
The Following User Says Thank You to pichlo For This Useful Post: | ||
![]() |
2015-06-15
, 11:17
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#10
|
Nokia-N900:~# cd /home/user/MyDocs/Recovery/
Nokia-N900:/home/user/MyDocs/Recovery# sh movetoopt.sh
rootfs before:
Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 136.0M 87.5M 61% /
0 usr/share/icons
7448 usr/share/nokia-maps
0 usr/share/fonts
12860 usr/share/locale
23352 usr/lib/locale
0 var/lib/apt
0 usr/share/themes
25648 var/lib/dpkg
0 var/cache/apt
69308 total
moving /usr/share/nokia-maps
moving /usr/share/locale
moving /usr/lib/locale
moving /var/lib/dpkg
success
rootfs after (after a reboot the actual free space will be shown):
Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 120.6M 103.0M 54% /
Nokia-N900:/home/user/MyDocs/Recovery# reboot & exit
Connection to 192.168.49.249 closed.
root@asterix:/home/micha# n900
BusyBox v1.23.1 (Debian 1.23.1power2+thumb0) built-in shell (ash)
Enter 'help' for a list of built-in commands.
Nokia-N900:~# cd /home/user/MyDocs/Recovery/
Nokia-N900:/home/user/MyDocs/Recovery# sh movetoopt.sh
rootfs before:
Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 111.5M 112.1M 50% /
0 usr/share/icons
0 usr/share/nokia-maps
0 usr/share/fonts
0 usr/share/locale
0 usr/lib/locale
0 var/lib/apt
0 usr/share/themes
0 var/lib/dpkg
0 var/cache/apt
0 total
success
rootfs after (after a reboot the actual free space will be shown):
Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 111.5M 112.1M 50% /
Nokia-N900:/home/user/MyDocs/Recovery#
Nokia-N900:~# du -Hs /usr/share/icons/ /usr/share/nokia-maps/ /usr/share/fonts /usr/share/locale /usr/lib/locale /var/lib/apt /usr
/share/themes /var/lib/dpkg /var/cache/apt/
6896 /usr/share/icons/
8296 /usr/share/nokia-maps/
3224 /usr/share/fonts
du: /usr/share/locale/it/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/nl/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/cs/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/pl/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/fr/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/de/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/sv/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/vi/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/ro/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
du: /usr/share/locale/zh_CN/LC_MESSAGES/libgpg-error.mo: Too many levels of symbolic links
15300 /usr/share/locale
23740 /usr/lib/locale
42028 /var/lib/apt
8892 /usr/share/themes
26004 /var/lib/dpkg
48564 /var/cache/apt/
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
Tags |
optification, optifying |
|
Also, I've tried ccooke's script, which just made the phone act crazy. I've read that some packages shouldn't be moved to opt with that script, but I'm no sure what is same to move and what not.
Is there some better solution than ccooke's script?
Thanks, everyone.