User talk:Westwallpoma

(Flash eMMC and firmware 1.3)
Line 25: Line 25:
Enter your new root password when asked and, assuming your beast is connected to the network, you can now SSH and no longer suffer finger cramp.
Enter your new root password when asked and, assuming your beast is connected to the network, you can now SSH and no longer suffer finger cramp.
 +
 +
== Swap Space ==
 +
 +
The N900 benefits greatly from shifting swap to your sdcard.  Reservations aside from the cost of this (card swapping could be a little unpleasant, increased power usage), this makes a huge difference to high load operations - e.g. disk I/O and will turn your N900 experience from wading through treacle to greased lighting of a well-oiled shovel.  Do it.  Seriously, just do it.
 +
 +
So, this assumes you have done the following:
 +
 +
* Inserted an SD card
 +
* Partitioned some swap space on the card (I did 1GB just for the hell of it but 756MB is the assumed minimum (as per the eMMC card).
 +
 +
Edit the following file:
 +
 +
/etc/event.d/rcS-late
 +
 +
Comment out the lines:
 +
 +
#    sfdisk -l /dev/mmcblk0 | /bin/busybox awk \
 +
#      -v home_opts="$home_opts" -v fat_opts="$fat_opts" \
 +
#      -f /usr/lib/genfstab.awk > $tmp_fstab
 +
 +
Add the following:
 +
 +
    find /dev -maxdepth 1 -name 'mmcblk?' | \
 +
    sfdisk -l | /bin/busybox awk  -v \
 +
    home_opts="$home_opts" -v fat_opts="$fat_opts" \
 +
    -f /usr/lib/genfstab.awk > $tmp_fstab
 +
 +
Essentially, this is the section that builds the fstab entry at boot time.  We're telling it to check all mmc devices (both the eMMC and the SD card) and thus it will add fstab entries for the swap space on both devices.  Later, we simply mark the partition of the swap on the eMMC as a different type and it will be ignored at boot time ; only the eMMC is kept.
 +
 +
Note - you want to retain the swap on your eMMC in the case where you need to remove your SD card ; otherwise your N900 will get upset.

Revision as of 22:12, 27 September 2011

Contents

Clean Install of N900

What's this all about?

For the past few months I've had a tendancy to reflash my n900, in a search for the holy grail of reflashes to end all reflashes. As I stagger my way to the goal, I'll be using this as a scratch pad to note all my findings, cack-handed or otherwise.


Let's Begin at the Beginning

Flash eMMC and firmware 1.3

Download the images from the usual place. Flash and bring the beast to life.

  • You can be cool and groovy and customise your eMMC to save having to fiddle later. I like to have my /home ext3 partition to be 16GB so, using a hex editor, I change the size of this partition from 2048 to 16384.
  • Add wifi connection, unless you have an understanding service provider and you are in a 3.5G area (2g here - you'd be crazy to attempt that).
  • Open HAM and install rootsh ; you are no longer constrained by the PC brigage and have access to the box of matches and petrol.

Launch Terminal and install essentials

In terminal, enter the following:

root
apt-get install openssh

Enter your new root password when asked and, assuming your beast is connected to the network, you can now SSH and no longer suffer finger cramp.

Swap Space

The N900 benefits greatly from shifting swap to your sdcard. Reservations aside from the cost of this (card swapping could be a little unpleasant, increased power usage), this makes a huge difference to high load operations - e.g. disk I/O and will turn your N900 experience from wading through treacle to greased lighting of a well-oiled shovel. Do it. Seriously, just do it.

So, this assumes you have done the following:

  • Inserted an SD card
  • Partitioned some swap space on the card (I did 1GB just for the hell of it but 756MB is the assumed minimum (as per the eMMC card).

Edit the following file:

/etc/event.d/rcS-late

Comment out the lines:

#    sfdisk -l /dev/mmcblk0 | /bin/busybox awk \
#       -v home_opts="$home_opts" -v fat_opts="$fat_opts" \ 
#       -f /usr/lib/genfstab.awk > $tmp_fstab

Add the following:

    find /dev -maxdepth 1 -name 'mmcblk?' | \
    sfdisk -l | /bin/busybox awk  -v \
    home_opts="$home_opts" -v fat_opts="$fat_opts" \
    -f /usr/lib/genfstab.awk > $tmp_fstab

Essentially, this is the section that builds the fstab entry at boot time. We're telling it to check all mmc devices (both the eMMC and the SD card) and thus it will add fstab entries for the swap space on both devices. Later, we simply mark the partition of the swap on the eMMC as a different type and it will be ignored at boot time ; only the eMMC is kept.

Note - you want to retain the swap on your eMMC in the case where you need to remove your SD card ; otherwise your N900 will get upset.