Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
Like Tree1Likes

Thread: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partition

  1. Default Grrr, Hard to find info!! HOWTO: Mount TF Swap Partition

    Ok, for those of you who already know this, shutup! I had to dig through the source for the mmc drivers (that Motorola released thankfully) for my answer I have a 1GB TransFlash and I decided that I want a 64MB swap partition (I don't like the idea of a swap file). Couldn't figure out how to create a device for the damn thing!!

    Ok, so for any newbies that run across this:

    Code:
    fdisk /dev/mmca
    Use m for help, you want to create 2 "primary partitions", one for your normal data (a big one) and one for your swap partition. Each block is 1k, so do some math. Oh yea, and make sure you don't have any data you want on this thing...

    Then format your main partition, let's say that's partition 1:
    Code:
    mkfs.ext3 -b 1024 /dev/mmca1
    Then you gotta create a device for the blasted mmca2 device and format it as well.
    Code:
    mknod /tmp/mmca2 b 243 2
    mkfs.ext2 /tmp/mmca2
    mkswap /tmp/mmca2
    The major device value can be found in e680-a780/linux-2.4.17/drivers/mmc/mmc_media.c:50 of the Motorola-release kernel src. Also, it has to go in tmp (or something) because /dev is read-only. I imagine you can stick it somewhere else so you don't have to create it each time you boot, but I'm planning doing a flash that'll let me get into init.d anyway, so I don't really care where you stick it!

    After you run mkswap, you'll discover that the bastard STOLE 4096 precious bytes from you. You'll be left feeling empty and alone with nobody to listen to your pathetic whining. Sad huh?

    Mount the goddam things:
    Code:
    mount /dev/mmca1 /mmc/mmca1
    swapon /tmp/mmca2
    Grats, now you can feel like you're cool, cause I don't. I hope this helps somebody cause it was a pain finding that major device number. Happy geeking!

    Daniel
    MetalWanderer likes this.

  2. #2
    Join Date
    Nov 2005
    Location
    Pakistan
    Posts
    860

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    too good daniel i never knew it. this also can make ways for ppl who want multiple partitions in MMC.

    btw, how to make it continue to work after reboot? is modding of CG33 only solution?
    --------------------
    -->E680i... ROX.
    --------------------

  3. Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    HAH! I haven't gotten that far yet. But now I know where to start --- search for CG33 on the forum!

    I'm tyring to figure out where I downloaded the binaries for the ext2/3 and jbd drivers. I'm writing up a wiki on it on wiki.openezx.org.

    But yea, that's my next step. I would like to have my phone boot to where /etc is in flashdisk. I'm thinking about tearing up my /diska and making an 8MB partition that I mount in /etc at startup so I can screw things up better (I don't want an important file system like that mounted on a removable drive).

    I'll post my wiki page when I'm done.

    Daniel
    <pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
    mkswap -v0 /ram/awesomeswap 16384
    sync
    swapon /ram/awesomeswap</pre>

  4. #4
    Join Date
    Nov 2005
    Location
    Brazil
    Posts
    308

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    you can create special devices on /ezxlocal (i'm using /ezxlocal/dev) ... better than /tmp ....

  5. #5
    Join Date
    May 2005
    Location
    Northern Malaysia
    Posts
    790

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    sorry to interupting, just wondering is this way is same with the memexpand and the swap script that found in the forum? just want to know..
    * Malaysian User? let's chat here *

    Previous Phone:
    Motorola - e680i/V3/V3i/V3x/Rokr e2, Dopod 818/d810i/900, SE w810i/K810i, Nokia 5210/6510/3310/9300i, O2 Xphone IIm, Eten X500.
    Current Phone:
    Rokr E6, HTC TYTN & TYTN II
    Next Phone: HTC TYTN III / Nokia N97

  6. #6
    Join Date
    Nov 2005
    Location
    Pakistan
    Posts
    860

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    no. that uses a swapfile.
    --------------------
    -->E680i... ROX.
    --------------------

  7. #7
    Join Date
    May 2005
    Location
    Northern Malaysia
    Posts
    790

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    so this one exactly work like the linux swap is it? i would like to try it if it can make change in perfomance.. the memexpand make my phone fast sometime, and sometime slow.. i dont know why..
    * Malaysian User? let's chat here *

    Previous Phone:
    Motorola - e680i/V3/V3i/V3x/Rokr e2, Dopod 818/d810i/900, SE w810i/K810i, Nokia 5210/6510/3310/9300i, O2 Xphone IIm, Eten X500.
    Current Phone:
    Rokr E6, HTC TYTN & TYTN II
    Next Phone: HTC TYTN III / Nokia N97

  8. Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    Quote Originally Posted by benjat
    so this one exactly work like the linux swap is it?
    Yar, that's the real deal.

    Quote Originally Posted by epinter
    you can create special devices on /ezxlocal (i'm using /ezxlocal/dev) ... better than /tmp ....
    Yea, but until you have your ext2 drivers loaded, it's not going to help. Currently, i have the a script named modules in my /ezxlocal/download/QTDownLoad/Startup directory that performs all of these steps. NEO-Installer runs all scripts in this dir when it's initiated.

    Code:
    #!/bin/bash
    
    # Load modules for ext2 and ext3
    cd /ezxlocal/modules
    insmod /ezxlocal/modules/jbd.o
    insmod /ezxlocal/modules/ext2.o
    insmod /ezxlocal/modules/ext3.o
    
    # Mount our very fucking awsome ext3 device!
    mount -t ext3 -o noatime /dev/mmca1 /mmc/mmca1
    
    # Create a device for our fucking awsome ext2 swap partition!
    mknod /tmp/mmca2 b 243 2
    swapon /tmp/mmca2
    Pardon the comments, that's the actual file!

    One more thing, I've hard some people raise concerns that a jornaling filesystem (ext3 as opposed to ext2) will reduce the life expectancy of a flash card and I've also heard the argument that the wear of an ext3 file system is nothing compared to FAT16. Personally, I'm sticking with ext3. This is highly stable in the event of a crash.

    Next step is for somebody to mount the 40GB hard drive on a hacked iPod via bluetooth. Any takers?

    Daniel

  9. #9
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    Not write access time to the filesystem can reduce r/w operation (faster, longer lifetime).
    mount -t ext3 -o noatime /dev/mmca1 /mmc/mmca1
    You can read default /dev/mmca1 mount options in /etc/init.d/mountfs.sh, uid and gid can be important for file permission. Congrat, you can write a symbolic link on /mmc/mmca1 right now
    eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6

  10. Default Re: Grrr, Hard to find info!! HOWTO: Mount TF Swap Partitio

    Thanks, I changed my script and my previous code snippet
    <pre>dd if=/dev/zero of=/ram/awsomeswap bs=1024 count=16384
    mkswap -v0 /ram/awesomeswap 16384
    sync
    swapon /ram/awesomeswap</pre>


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. swap partition on windows mobile
    By bpratap in forum Windows Mobile
    Replies: 3
    Last Post: 12-07-2008, 12:32 PM
  2. INFO: Mounting EXT3 partition by DONGA
    By aksd in forum E6 Applications
    Replies: 3
    Last Post: 10-22-2007, 01:44 AM
  3. How i can activate the SWAP partition?
    By Kamihacker in forum A1200 General Chat
    Replies: 8
    Last Post: 05-14-2007, 09:49 PM
  4. Ext3 support and swap partition on Micro SD card
    By younker in forum A1200 General Chat
    Replies: 2
    Last Post: 10-13-2006, 04:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1