User talk:Westwallpoma
westwallpoma (Talk | contribs) (→Flash eMMC and firmware 1.3) |
westwallpoma (Talk | contribs) (→I hate FAT32 - and you should too) |
||
(4 intermediate revisions not shown) | |||
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. | ||
+ | |||
+ | === Disabling eMMC Swap on boot === | ||
+ | |||
+ | sfdisk -c /dev/mmcblk0 3 0 | ||
+ | |||
+ | === Enabling eMMC Swap on boot === | ||
+ | |||
+ | sfdisk -c /dev/mmcblk0 3 82 | ||
+ | |||
+ | |||
+ | === Example /etc/fstab === | ||
+ | |||
+ | Nokia-N900:~# cat /etc/fstab |grep swap | ||
+ | /dev/mmcblk1p2 none swap sw 0 0 | ||
+ | Nokia-N900:~# | ||
+ | |||
+ | == I hate FAT32 - and you should too == | ||
+ | |||
+ | Let's be honest here. What use is FAT32? Unless you are lumbered with a Windows machine and *absolutely* have to be able to mount your N900. Infact - don't do that. Set up USB networking and transfer files by SSHD (FileZilla or something similar). It's utter guff. | ||
+ | |||
+ | Change MyDocs to ext3. While you are at it, change your sdcard to ext3. Even ext4 if you like! LVM is pushing the boat, but don't imagine for a minute somebody hasn't tried it. | ||
+ | |||
+ | Note that ext4 has been shown to be a little bit faster ; but I'm still a touch wary, so I'm sticking with ext3. What we need to do is tell the N900 that we're cool with ext3, via it's mmc-mount suite. The following talk thread has the details: | ||
+ | |||
+ | http://talk.maemo.org/showthread.php?t=73478 | ||
+ | |||
+ | The appropriate bits we want are: | ||
+ | |||
+ | sed -i '1d' /usr/sbin/mmc-mount | ||
+ | echo -e '#!/bin/sh\ncase "$(sfdisk -c $(echo $1 | cut -c1-12) $(echo $1 | cut -c14))" in\n 43|83)\n mount -t auto -o $3,noauto,nosuid,noatime,nodiratime "$1" "$2" > /dev/null\n ;;\n *)\n '$(cat /usr/sbin/mmc-mount)'\n ;;\nesac' > /usr/sbin/mmc-mount | ||
+ | sed -i 's/\(| 1e\)/\1 |43|83/' /usr/sbin/osso-mmc-mount.sh | ||
+ | umount /home/user/MyDocs | ||
+ | sfdisk -c /dev/mmcblk0 1 43 | ||
+ | mkfs.ext3 -m 0 -L "Nokia N900" /dev/mmcblk0p1 | ||
+ | osso-mmc-mount.sh /dev/mmcblk0p1 /home/user/MyDocs | ||
+ | chown -R user:users /home/user/MyDocs | ||
+ | |||
+ | == Manually Adding Catalogues to HAM / apt == | ||
+ | |||
+ | I like Faster Application Manager a lot, but I also like apt and it frustrates me that I can't have access to apt via the usual method. | ||
+ | |||
+ | Adding catalogues to HAM is easy enough though. The following, saved as a file extras.install will, when loaded through file manager, will launch in HAM and add the repos to your system. Danger though - here be dragons. If you don't know what you are doing, you don't know what you are doing. | ||
+ | |||
+ | <pre> | ||
+ | [catalogues] | ||
+ | catalogues = extras-testing ; extras-devel | ||
+ | |||
+ | [extras-testing] | ||
+ | name = maemo Extras Testing catalogue | ||
+ | uri = http://repository.maemo.org/extras-testing | ||
+ | dist = fremantle | ||
+ | components = free non-free | ||
+ | |||
+ | [extras-devel] | ||
+ | name = maemo Extras Development catalogue | ||
+ | uri = http://repository.maemo.org/extras-devel | ||
+ | dist = fremantle | ||
+ | components = free non-free | ||
+ | </pre> | ||
+ | |||
+ | Better option - install FAPMAN and work from the very sexy gui. |
Latest revision as of 22:35, 27 September 2011
Contents |
[edit] Clean Install of N900
[edit] 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.
[edit] Let's Begin at the Beginning
[edit] 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.
[edit] 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.
[edit] 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.
[edit] Disabling eMMC Swap on boot
sfdisk -c /dev/mmcblk0 3 0
[edit] Enabling eMMC Swap on boot
sfdisk -c /dev/mmcblk0 3 82
[edit] Example /etc/fstab
Nokia-N900:~# cat /etc/fstab |grep swap /dev/mmcblk1p2 none swap sw 0 0 Nokia-N900:~#
[edit] I hate FAT32 - and you should too
Let's be honest here. What use is FAT32? Unless you are lumbered with a Windows machine and *absolutely* have to be able to mount your N900. Infact - don't do that. Set up USB networking and transfer files by SSHD (FileZilla or something similar). It's utter guff.
Change MyDocs to ext3. While you are at it, change your sdcard to ext3. Even ext4 if you like! LVM is pushing the boat, but don't imagine for a minute somebody hasn't tried it.
Note that ext4 has been shown to be a little bit faster ; but I'm still a touch wary, so I'm sticking with ext3. What we need to do is tell the N900 that we're cool with ext3, via it's mmc-mount suite. The following talk thread has the details:
http://talk.maemo.org/showthread.php?t=73478
The appropriate bits we want are:
sed -i '1d' /usr/sbin/mmc-mount echo -e '#!/bin/sh\ncase "$(sfdisk -c $(echo $1 | cut -c1-12) $(echo $1 | cut -c14))" in\n 43|83)\n mount -t auto -o $3,noauto,nosuid,noatime,nodiratime "$1" "$2" > /dev/null\n ;;\n *)\n '$(cat /usr/sbin/mmc-mount)'\n ;;\nesac' > /usr/sbin/mmc-mount sed -i 's/\(| 1e\)/\1 |43|83/' /usr/sbin/osso-mmc-mount.sh umount /home/user/MyDocs sfdisk -c /dev/mmcblk0 1 43 mkfs.ext3 -m 0 -L "Nokia N900" /dev/mmcblk0p1 osso-mmc-mount.sh /dev/mmcblk0p1 /home/user/MyDocs chown -R user:users /home/user/MyDocs
[edit] Manually Adding Catalogues to HAM / apt
I like Faster Application Manager a lot, but I also like apt and it frustrates me that I can't have access to apt via the usual method.
Adding catalogues to HAM is easy enough though. The following, saved as a file extras.install will, when loaded through file manager, will launch in HAM and add the repos to your system. Danger though - here be dragons. If you don't know what you are doing, you don't know what you are doing.
[catalogues] catalogues = extras-testing ; extras-devel [extras-testing] name = maemo Extras Testing catalogue uri = http://repository.maemo.org/extras-testing dist = fremantle components = free non-free [extras-devel] name = maemo Extras Development catalogue uri = http://repository.maemo.org/extras-devel dist = fremantle components = free non-free
Better option - install FAPMAN and work from the very sexy gui.
- This page was last modified on 27 September 2011, at 22:35.
- This page has been accessed 3,198 times.