Reply
Thread Tools
Posts: 25 | Thanked: 0 times | Joined on Aug 2006
#1
It appears that ext2 is the format of choice, but

a. Is there a need for a vfat partition? If so, how much 32, 64 meg?

b. Some put on a linux swap partition. Why? Does the 770 just "find" it? How does this integrate with the virtual memory app in control panel? Is this limited to 64 mb, like the virtual memory app?

Then I assume the rest would be ext2.

sean
 
Posts: 264 | Thanked: 28 times | Joined on May 2006
#2
Here's what I did with my 2GB card.
The first partition is 256MB FAT32. I store my e-books and such here. This partition gets unmounted from the 770 and mounted on your PC when you connect with the USB cable.
The second partition is 1.6GB ext2. Here is where my maemo-mapper maps are stored along with a few videos and such.
The remaining 128MB or so is formated as linux swap.

Now, in order to use this setup, you need to edit a few files as root so make sure you can become root and get a # prompt. Also you'll need an editor that you know how to use. I like the built-in vi editor or the vim application but I've been using vi for 20 years. It's not the easiest editor to learn. Midnight Commander (mc) is a cool console file manager that has an editor and I think there's a leafpad for OS2006.

The first thing we'll do is tell the 770 how to mount the partitions by adding a few lines to /etc/fstab. Open xterm (or ssh in from your PC) and "switch user" (su) to root by typing
Code:
sudo su -
note the space and dash after su.
Your prompt should end in ~# If not, you're not root. fix this before continuing.

Open /etc/fstab in your editor of choice and add the folowing 2 lines:
Code:
/dev/mmcblk0p2  /media/mmc2 ext2 rw,noauto      0 0
/dev/mmcblk0p3  swap    swap    defaults        0 0
Next we want to load the ext2 kernel module and mount the ext2 partition and activate the swap partition. Open /etc/init.d/minircS in your editor. near the top, right after the PATH= line add this line:
Code:
insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko
Then at the end of the file, just before the exit 0 line, add:
Code:
swapon -a
mount /media/mmc2
Now to be nice, we want to unmount mmc2 and de-activate the swap when re-booting or shutting down so edit both /etc/init.d/minireboot and /etc/init.d/minishutdown. Find the line that starts: umount -r and add /media/mmc2 to that line and add swapoff -a so it looks like this:
Code:
echo "Unmounting filesystems... "
umount -r /media/mmc1 /media/mmc2 /mnt/initfs /
swapoff -a
echo "done."
reboot and that's it. You now have a 128MB swap, a big FAT32 partition at /media/mmc1 and a nice big ext2 partition at /media/mmc2.
 
Posts: 25 | Thanked: 0 times | Joined on Aug 2006
#3
Tremendous!

I really appreciate the detailed instructions.
 
Posts: 25 | Thanked: 0 times | Joined on Aug 2006
#4
Just finished this, after installing the new ( Nov 2 ) kernel.

One change:

insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko

becomes:

insmod /mnt/initfs/lib/modules/2.6.16.27-omap1/ext2.ko

It also took two reboots.

But it all works for me now.

BTW, your new swap partition will not show up in the Control Panel->Memory applet. To check it cat/proc/swaps.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#5
Using /mnt/initfs/lib/modules/current/ext2.ko should insulate you from kernel version changes.

This is what I'm doing in my init script which overlays a MMC-directory over /home/user so I don't need to backup/reflash.

Unfortunately it's more of an "override" than a "union", so it's not really suitable for much else other than /home/user.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
Now known as
Jaffa
 
Posts: 94 | Thanked: 6 times | Joined on Sep 2005 @ Bangkok, Thailand
#6
Originally Posted by BanditRider View Post
Here's what I did with my 2GB card.
The first partition is 256MB FAT32. I store my e-books and such here. This partition gets unmounted from the 770 and mounted on your PC when you connect with the USB cable.
The second partition is 1.6GB ext2. Here is where my maemo-mapper maps are stored along with a few videos and such.
The remaining 128MB or so is formated as linux swap.

Now, in order to use this setup, you need to edit a few files as root so make sure you can become root and get a # prompt. Also you'll need an editor that you know how to use. I like the built-in vi editor or the vim application but I've been using vi for 20 years. It's not the easiest editor to learn. Midnight Commander (mc) is a cool console file manager that has an editor and I think there's a leafpad for OS2006.

The first thing we'll do is tell the 770 how to mount the partitions by adding a few lines to /etc/fstab. Open xterm (or ssh in from your PC) and "switch user" (su) to root by typing
Code:
sudo su -
note the space and dash after su.
Your prompt should end in ~# If not, you're not root. fix this before continuing.

Open /etc/fstab in your editor of choice and add the folowing 2 lines:
Code:
/dev/mmcblk0p2  /media/mmc2 ext2 rw,noauto      0 0
/dev/mmcblk0p3  swap    swap    defaults        0 0
Next we want to load the ext2 kernel module and mount the ext2 partition and activate the swap partition. Open /etc/init.d/minircS in your editor. near the top, right after the PATH= line add this line:
Code:
insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko
Then at the end of the file, just before the exit 0 line, add:
Code:
swapon -a
mount /media/mmc2
Now to be nice, we want to unmount mmc2 and de-activate the swap when re-booting or shutting down so edit both /etc/init.d/minireboot and /etc/init.d/minishutdown. Find the line that starts: umount -r and add /media/mmc2 to that line and add swapoff -a so it looks like this:
Code:
echo "Unmounting filesystems... "
umount -r /media/mmc1 /media/mmc2 /mnt/initfs /
swapoff -a
echo "done."
reboot and that's it. You now have a 128MB swap, a big FAT32 partition at /media/mmc1 and a nice big ext2 partition at /media/mmc2.
I did the things above with the -14 and had no problems. But since upgrading to the -49 firmware, Audioplayer, VideoPlayer. File Manager, etc, cannot see the mmc2 partition. df sees the partition and I can cp to it via xterm. I've flashed to the -49 firmware, three times and checked for editor errors in the files above.

Any suggestions for correcting this problem.

thaibill
 
Posts: 264 | Thanked: 28 times | Joined on May 2006
#7
What I do is put a symbolic link to the directory in ~/MyDocs
One for root so I can browse the whole filesystem and one for mmc2 to save me a few clicks when looking there.

ln -s / ~/MyDocs/root
ln -s /media/mmc2 ~/MyDocs/mmc2
 
Posts: 94 | Thanked: 6 times | Joined on Sep 2005 @ Bangkok, Thailand
#8
Originally Posted by BanditRider View Post
What I do is put a symbolic link to the directory in ~/MyDocs
One for root so I can browse the whole filesystem and one for mmc2 to save me a few clicks when looking there.

ln -s / ~/MyDocs/root
ln -s /media/mmc2 ~/MyDocs/mmc2
Mucho thanks. I vaguely remember the second link but can't find it in my notes. The first link definitely is useful.

thaibill
 
Posts: 103 | Thanked: 10 times | Joined on Feb 2007
#9
I had a 1GB MMC card working fine. I thought that since I had the gregale firmware installed, a 2GB card would work automatically. But something is not right with my 770 since I started using the 2GB card. When I check the space left on the card from within the 770, it says the card is nearly full at only ~990MB. The 770 also seems to slow down and/or lock up often now. I made a point of formatting the card in the 770 to it's full capacity before writing to it.

What did I miss?
 
Karel Jansens's Avatar
Posts: 3,220 | Thanked: 326 times | Joined on Oct 2005 @ "Almost there!" (Monte Christo, Count of)
#10
Originally Posted by revwillie View Post
I had a 1GB MMC card working fine. I thought that since I had the gregale firmware installed, a 2GB card would work automatically. But something is not right with my 770 since I started using the 2GB card. When I check the space left on the card from within the 770, it says the card is nearly full at only ~990MB. The 770 also seems to slow down and/or lock up often now. I made a point of formatting the card in the 770 to it's full capacity before writing to it.

What did I miss?
I'd suggest formatting it on a pc (cardreader or 770 connected through USB). The Internet Tablet's file manager is notoriously stupid.
 

The Following User Says Thank You to Karel Jansens For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 11:42.