Page 1 of 4 1234 LastLast
Results 1 to 20 of 67
  1. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #1  
    I'm having to re-build my phone again, and figured why not explore the webos dr to see if I can have the phone setup larger /var and /usr partitions. (By default, they're small, with most of the space going to /media/internal for the usb drive.. hince why we keep getting out of memory warnings when installing too many applicaitons)

    I found the file castle.xml which handles exactly that. (the file is in webOSDoctor.jar/resources/webOS.tar/castle.xml)

    Here's the contents -

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Installer Rules for Castle Hardware -->
    <TrenchCoat>
    	<CPU type="OMAP34xx"/>
    	<Flash type="mmc" alignment="524288" device="/dev/mmcblk0">
    		<Entry type="mbr" size="512" align="false"/>
    		<Entry type="bootloader" size="192KB" file="${BOOTIE}"/>
    		<Entry type="nvram" size="4MB">
    			<Section name="env" type="env" size="16KB">
    				<Val name="installer" value="trenchcoat"/>
    				<Val name="autoboot" action="delete"/>
    				<Val name="bootfile" action="delete"/>
    			</Section>
    			<Section name="tokens" type="token" size="4KB">
    				<Val name="installer" value="trenchcoat"/>
    			</Section>
    			<Section name="logo-boot" type="image" file="BootLogo.tga"/>
    			<Section name="logo-chg" type="image" file="Charging.tga"/>
    			<Section name="logo-badchg" type="image" file="NoPower.tga"/>
    			<Section name="logo-nobatt" type="image" file="NoBatt.tga"/>
    			<Section name="logo-badsys" type="image" file="BadSys.tga"/>
    			<Section name="logo-nosys" type="image" file="NoSys.tga"/>
    			<Section name="logo-sync" type="image" file="Sync.tga"/>
    			<Section name="logo-panic" type="image" file="Panic.tga"/>
    			<Section name="logo-disk" type="image" file="Disk.tga"/>
    		</Entry>
    		<Entry type="ext3" size="32MB" mount="/boot"/>
    		<Entry type="lvm" id="pv" size="*" metadatasize="1532KB" metadatacopies="2"/>
    	</Flash>
    	<VolumeGroups>
    		<Group name="store" pv="pv" physicalextentsize="8MB">
    			<Volume id="root" type="ext3" size="456MB" mount="/"/>
    			<Volume id="var" type="ext3" size="256MB" mount="/var"/>
    			<Volume id="update" type="ext3" size="56MB" mount="/var/lib/update"/>
    			<Volume id="log" type="ext3" size="40MB" mount="/var/log"/>
    			<Volume id="media" type="fat32" size="*" mount="/media/internal"/>
    			<Volume id="swap" size="128MB"/>
    		</Group>
    	</VolumeGroups>
    	<Filesystem fstab="/etc/fstab">
    		<Mount device="rootfs" mount="/" type="ext3" options="ro,suid,dev,exec,auto,nouser,async,noatime" freq="1" passno="1"/>
    		<Mount id="var" options="noatime" freq="0" passno="0"/>
    		<Mount id="log" options="noatime" freq="0" passno="0"/>
    		<Mount id="update" options="noauto,noatime" freq="0" passno="0"/>
    		<Mount device="proc" mount="/proc" type="proc" options="defaults" freq="0" passno="0"/>
    		<Mount device="devpts" mount="/dev/pts" type="devpts" options="mode=0620,gid=5" freq="0" passno="0"/>
    		<Mount device="tmpfs" mount="/tmp" type="tmpfs" options="size=64M,mode=1777" freq="0" passno="0"/>
    		<Mount device="tmpfs" mount="/media/ram" type="tmpfs" options="defaults" freq="0" passno="0"/>
    		<Mount id="media" options="utf8,shortname=mixed" freq="0" passno="0"/>
    	</Filesystem>
    	<Images>
    		<File file="${NOVATGZ}" target="/"/>
    	</Images>
    	<PostInstall file="/sbin/tcpostflash.sh"/>
    </TrenchCoat>
    SO I think the fix is simple - just change these two lines to be bigger -
    <Volume id="var" type="ext3" size="256MB" mount="/var"/>
    <Volume id="root" type="ext3" size="456MB" mount="/"/>

    the rest of the remaining space will automatically be used by /media/internal

    I'm going to try this now and see how well it works. FYI - the actual changes I'm doing are -

    Code:
    <Volume id="root" type="ext3" size="1024MB" mount="/"/>
    <Volume id="var" type="ext3" size="640MB" mount="/var"/>
    -mark

    EDIT - this HELPS, but isn't the end solution more details and workaround - http://forums.precentral.net/web-os-...ml#post1958052 <-- I'm not using that script, but pointing it to /var/alt-apps (created alt-apps) instead of /media/internal.
    Last edited by diomark; 10/07/2009 at 02:49 PM.
  2. #2  
    Keep us up on what happens. Thanks!
  3. awrnsmn's Avatar
    Posts
    646 Posts
    Global Posts
    689 Global Posts
    #3  
    This looks promising, let us know!!
  4. #4  
    this should be pretty interesting. it is very simuliar with partitioning the sd card for rooted G1s to get apps to the sd. i was waiting for someone to possibly find a way to partition the memory for the pre.....good job and good luck!
  5. #5  
    I think the pre comes with lvm, you can resize partitions without doctor.
  6. GigaS27's Avatar
    Posts
    286 Posts
    Global Posts
    389 Global Posts
    #6  
    Quote Originally Posted by emoney_33 View Post
    I think the pre comes with lvm, you can resize partitions without doctor.
    Which is why everyone hopes the next update will fix this problem. My fingers are crossed but keep us posted mark!
    Sprint Palm Pre-
  7. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #7  
    I think the pre comes with lvm, you can resize partitions without doctor.
    Yes, it does.. and in the past what I do is shrink /media/internal, make /opt, symlink /usr/palm and /var/usr/palm to /opt

    ..but this is just cleaner and the /media/internal is DOS formatted.. I don't think it can handle being resized well (I've been re-formatting it after shrinking it..)

    -m
  8. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #8  
    Not having any luck with this the webos doctor doesn't get past 3% - and the phone is actually not changed at all..

    I think they might be signing their jar file - so any edits on it make the webos dr not run it (webOSDoctor.jar/META-INF has two files - jarkey.rsa and jarkey.sf that make me think this..)

    Perhaps someone with more knowledge of jar files can look into this.. I don't really think they're encoding - I just don't think they like the jar file that I'm creating (using both 7-zip and from linux command line) after modifying that file..
    -mark
  9. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #9  
    So here's the way that I solved this problem in the end. It does involve destroying your /media/internal (USB drive) - so back that up first.

    Let's borrow 1gb from the usb drive
    lvresize -L -1G /dev/mapper/store-media
    Code:
    lvresize -L -1G /dev/mapper/store-media
      WARNING: Reducing active and open logical volume to 5.69 GB
      THIS MAY DESTROY YOUR DATA (filesystem etc.)
    Do you really want to reduce media? [y/n]: y
    y
      Reducing logical volume media to 5.69 GB
      Logical volume media successfully resized

    Then let's give it to the /var and / partitions

    lvresize -L +512M /dev/mapper/store-root
    Code:
    root@castle:/# lvresize -L +512M /dev/mapper/store-root
    lvresize -L +512M /dev/mapper/store-root
      Extending logical volume root to 968.00 MB
      Logical volume root successfully resized
    lvresize -L +512M /dev/mapper/store-var
    Code:
    root@castle:/# lvresize -L +512M /dev/mapper/store-var
    lvresize -L +512M /dev/mapper/store-var
      Extending logical volume var to 768.00 MB
      Logical volume var successfully resized




    Let's mount / as read/write
    mount -o remount,rw /

    Let's online-resize those two partitions -

    resize2fs /dev/mapper/store-var
    Code:
    root@castle:/# resize2fs /dev/mapper/store-var
    resize2fs /dev/mapper/store-var
    resize2fs 1.41.4 (27-Jan-2009)
    Filesystem at /dev/mapper/store-var is mounted on /var; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 1
    Performing an on-line resize of /dev/mapper/store-var to 196608 (4k) blocks.
    The filesystem on /dev/mapper/store-var is now 196608 blocks long.

    resize2fs /dev/mapper/store-root
    Code:
    root@castle:/# resize2fs /dev/mapper/store-root
    resize2fs /dev/mapper/store-root
    resize2fs 1.41.4 (27-Jan-2009)
    Filesystem at /dev/mapper/store-root is mounted on /; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 1
    Performing an on-line resize of /dev/mapper/store-root to 247808 (4k) blocks.
    The filesystem on /dev/mapper/store-root is now 247808 blocks long.
    Next part is tricky - as you have to umont /media/internal and re-build it.. The problem is (at least under webos 1.2) it leaves it open so you can't unmount it. My solution was to leave out the /media/internal line from /etc/fstab, reboot, then rebuild the partition and restore the original fstab file.

    Code:
    root@castle:/etc# cp fstab fstab.bk
    cp fstab fstab.bk
    root@castle:/etc# cat fstab.bk | grep -v 'media/internal' > fstab
    cat fstab.bk | grep -v 'media/internal' > fstab
    root@castle:/etc# reboot
    Once you're rebooted, re-build that partition using this command -

    mkdosfs -F 32 /dev/mapper/store-media
    Code:
    root@castle:/# mkdosfs -F 32 /dev/mapper/store-media
    mkdosfs -F 32 /dev/mapper/store-media
    mkdosfs 3.0.2 (28 Feb 2009)
    unable to get drive geometry, using default 4/16
    root@castle:/#
    Then restore the original /etc/fstab file and reboot -
    Code:
    root@castle:/# mount / -o remount,rw
    mount / -o remount,rw
    root@castle:/# cd /etc
    cd /etc
    root@castle:/etc# mv fstab.bk fstab
    mv fstab.bk fstab
    root@castle:/etc# reboot
    ..and just like that, I now have an almost 1gb in /, and 761mb in /var (with 1gb less in /media/internal)

    Partition sizes originally -
    Code:
    root@castle:/# df -k
    df -k
    Filesystem           1k-blocks      Used Available Use% Mounted on
    rootfs                  452296    389616     62680  86% /
    /dev/root                31728     11368     20360  36% /boot
    /dev/mapper/store-root
                            452296    389616     62680  86% /
    /dev/mapper/store-root
                            452296    389616     62680  86% /dev/.static/dev
    tmpfs                     2048       152      1896   7% /dev
    /dev/mapper/store-var
                            253920     20856    233064   8% /var
    /dev/mapper/store-log
                             39664      5584     34080  14% /var/log
    tmpfs                    65536       268     65268   0% /tmp
    tmpfs                   122516         0    122516   0% /media/ram
    /dev/mapper/store-media
                           7011456     20832   6990624   0% /media/internal
    Partition sizes after our little workarounds -
    Code:
    root@castle:/# df -k
    df -k
    Filesystem           1k-blocks      Used Available Use% Mounted on
    rootfs                  961944    389840    572104  41% /
    /dev/root                31728     11368     20360  36% /boot
    /dev/mapper/store-root
                            961944    389840    572104  41% /
    /dev/mapper/store-root
                            961944    389840    572104  41% /dev/.static/dev
    tmpfs                     2048       164      1884   8% /dev
    /dev/mapper/store-var
                            761776     20980    740796   3% /var
    /dev/mapper/store-log
                             39664      6068     33596  15% /var/log
    tmpfs                    65536       116     65420   0% /tmp
    tmpfs                   122516         0    122516   0% /media/ram
    /dev/mapper/store-media
                           5952132      2904   5949228   0% /media/internal

    -mark
    Last edited by diomark; 09/17/2009 at 05:58 PM. Reason: Adding examples
  10. #10  
    Awesome work!! I wish I could hit the thanks button twice. Now if you could only figure out a way to do this without the reboots so it could be put in a script, you'd be golden.
    Palm III-->Handspring Visor-->Sony Clie PEG-NR70-->no PDA -->Palm Treo 755p-->Palm Pre-->HP Veer
  11. #11  
    diomark, mind if I include this in a future version of WebOS Quick Install?
  12. GigaS27's Avatar
    Posts
    286 Posts
    Global Posts
    389 Global Posts
    #12  
    Quote Originally Posted by Jason Robitaille View Post
    diomark, mind if I include this in a future version of WebOS Quick Install?
    Oo please let him!!!!
    Sprint Palm Pre-
  13. #13  
    Quote Originally Posted by GigaS27 View Post
    Oo please let him!!!!
    Since they are basic Linux commands, he can do this without asking. He was just being polite in doing so.
    I'm both super! ... and a doer!
  14. #14  
    Quote Originally Posted by Jason Robitaille View Post
    diomark, mind if I include this in a future version of WebOS Quick Install?
    This would be spectacular if possible. I have reached my limit with having to remove all homebrew and some App Catalog Apps, only to be told I still do not have enough memory. It is so frustrating to have less and less apps at my disposal on a daily basis. Especially since once I remove an app from the Catalog, I am unable to reinstall it! I have no idea what Palm was thinking with this partition limit.
    VisorPhone Clone
    (Please do not thank me - I find it scary)
  15. TCCCCnME's Avatar
    Posts
    85 Posts
    Global Posts
    86 Global Posts
    #15  
    @Diomark So to copy the media/internal USB drive what command would I give? Is post #9 each step from start to finish? If not could you include a command to backup the default media/internal file where we can simply copy and paste?
  16. spotter's Avatar
    Posts
    316 Posts
    Global Posts
    327 Global Posts
    #16  
    Palm can just fix the problem by having the apps stored to /media/internal instead of /var and /usr.

    there's no reason any app needs to be written to the /var and /usr partitions in reality. It just has to tell luna to look at the right place in /media/internal.
  17. #17  
    Quote Originally Posted by spotter View Post
    Palm can just fix the problem by having the apps stored to /media/internal instead of /var and /usr.

    there's no reason any app needs to be written to the /var and /usr partitions in reality. It just has to tell luna to look at the right place in /media/internal.
    True, but the App Catalog, palm-install script, FileCoaster, and Preload use a method of installation that specifically installs to /var
  18. #18  
    Well they better do something quick within WebOS 1.2 cause this is ridiculus when most apps are anywhere from 1-5MB each!!!!ouch...so only get like 4 installed and then have to delete...cant do that on apps you are storing data in, you might as well write it on paper!

    PLEASE PALM fix this
  19. spotter's Avatar
    Posts
    316 Posts
    Global Posts
    327 Global Posts
    #19  
    Quote Originally Posted by Jason Robitaille View Post
    True, but the App Catalog, palm-install script, FileCoaster, and Preload use a method of installation that specifically installs to /var
    correct, and its a bad design and has to be changed. only stuff that shipped with the phone should be stored on the smaller sized partitions. EVERYTHING else should go to the big *** "media/data" partition.

    while they might not want to depend on the resizability of partitions, it be a good thing to experiment with (and in the end if resize fails, no worse than requiring a backup initially)
  20. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
       #20  
    Quote Originally Posted by Jason Robitaille View Post
    diomark, mind if I include this in a future version of WebOS Quick Install?
    Please do.. Should make sure the user knows that this DESTROYS and RECREATES the /media/internal partition though.. They'd need to back that up/restore it manually.
    -m
    Last edited by diomark; 09/18/2009 at 11:17 AM.
Page 1 of 4 1234 LastLast

Posting Permissions