Active Topics

 


Reply
Thread Tools
Posts: 1 | Thanked: 0 times | Joined on Oct 2010
#1
So i just got a n800 and i have succesfully got i to boot from the memory card but i have a couple of problems and if anyone could help that would be great
1.the second partition on the memory card is not working i have tried mounting and unmounting and formating(btw i have a 16gb card for the internal one)
2.swap space i used the following information


Adding swap space is pretty easy. This will add more, but slower ram; helping you when dealing with large files. In general, linux likes to have twice the amount of swap space as RAM. Since the N800 has 128M memory, I’m adding 256M. We’ll see how this perform in the long run.

Before, no swap in use:

Nokia-N800-51-3:~# free
total used free shared buffers
Mem: 126828 87248 39580 0 1012
Swap: 0 0 0
Total: 126828 87248 39580

Performing commands to add swap file and use it on reboots:

Nokia-N800-51-3:~# cd /media/mmc2/
Nokia-N800-51-3:/media/mmc2# dd if=/dev/zero of=./.swap bs=1024 count=262144
262144+0 records in
262144+0 records out
Nokia-N800-51-3:/media/mmc2# mkswap /media/mmc2/.swap
Setting up swapspace version 1, size = 268431361 bytes
Nokia-N800-51-3:/media/mmc2# swapon /media/mmc2/.swap
Nokia-N800-51-3:/media/mmc2# echo "/media/mmc2/.swap none swap sw 0 0" >> /etc/fstab
Nokia-N800-51-3:/media/mmc2# cat /etc/fstab
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p1 /media/mmc1 vfat rw,noauto,nodev,noexec,nosuid,utf8,uid=29999 0 0
/media/mmc2/.swap none swap sw 0 0
Nokia-N800-51-3:/media/mmc2# vi /etc/init.d/rcS

-- add this line before exit 0: swapon -a

Nokia-N800-51-3:/media/mmc2# reboot

Broadcast message from root (pts/0) (Sat Mar 8 17:20:49 2008):

The system is going down for reboot NOW!

Swap file is now in use:

Nokia-N800-51-3:~# free
total used free shared buffers
Mem: 126828 98020 28808 0 1044
Swap: 262136 0 262136
Total: 388964 98020 290944

Also, you can add up to 128k by going into



when i enter the line Nokia-N800-51-3:/media/mmc2# vi /etc/init.d/rcS
i can no longer enter anything else and am not sure where to write
-- add this line before exit 0: swapon -a

thanks in advance to anyone the can help
 
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#2
"vi" is the name of a text editor. The command "vi /etc/init.d/rcS" calls on vi to open the file called "/etc/init.d/rcS" in order to edit it. The person who wrote those instructions must have assumed that readers are already familiar with vi, which has many non-intuitive features. It does not accept new code until you set it into "insert mode", for example. That is why you could not enter anything - it's supposed to work that way.

Before you use vi, I would suggest that you take a look at the file, to see what you are trying to edit. You can do this by typing "cat /etc/init.d/rcS" instead of "vi /etc/init.d/rcS". (The "cat" command merely displays the code. It does not allow any changes.) Your screen will show the last few lines of code in the file. (You can see the earlier part by scrolling up, but the end is what you are interested in.) The last line of code is "exit 0". The instructions tell you to add a line of code that says "swapon -a", immediately before "exit 0", i.e. on the next-to-last line.

Using the vi editor, you have to break this task into steps:
1. Move the cursor to the next-to-last line;
2. Activate "insert" mode;
3. Enter "swapon -a";
4. Get out of "insert" mode;
5. Save your changes;
6. Quit vi.

Before doing any of this, locate "Esc" above the keyboard. If at any time you think you might have made a mistake while in vi, press "Esc", then write ":q!" (colon-q-exclamation) and press the line-return symbol (also called the <enter> symbol). This will take you out of vi without making any changes to the file.

In vi, you can move the cursor up and down with the "up" and "down" navigation keys on the upper-left of the front of the N800. You can move it to the end of the file by typing "G", so long as you are not in "insert" mode. So here is what you do after entering the "vi /etc/init.d/rcS" command:

1. Type "G" and press the "up" navigation key to take the cursor to the next-to-last line;

2. Type "i" or upper-case"I" (not "1", not lower-case "l") to enter "insert" mode;

3. Type "swapon -a"; [for a better appearance, type line-return beforehand, creating a blank line]

4. Press "Esc" to get out of "insert" mode;

5. and 6. Type ":wq" (colon-w-q) followed by the line-return.

If you want to know more about the vi editor, google "using vi".

DISCLAIMER: I use a different approach for cloning, and I can not vouch for the instructions that have been given to you. I am merely telling you what the writer means by this one particular instruction. I strongly recommend that you make a backup copy of the /etc/init.d/rcS file before you edit it. I am surprised that the instructions do not mention this.

Last edited by scaler; 2010-11-20 at 03:42.
 
Posts: 263 | Thanked: 77 times | Joined on Jan 2009 @ Sigtuna, Sweden
#3
For editing files use leafpad.
Much simpler than vi, found in extras.

For cloning use Console Tools by Penguinbate.
Two menu driven apps for partitioning, formatting, cloning, bootmenu, backup etc.
http://talk.maemo.org/showthread.php?t=25714

( A very useful filemanager including a simple editor is emelfm2.)
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#4
Rather than using a swapfile alone, install ramzez (look for it in garage). You'll get better performance.
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:21.