View Single Post
Posts: 561 | Thanked: 75 times | Joined on Jan 2010 @ Spain
#80
Edit the file "/etc/event.d/rcS-late"

seeks the following:
Code:
   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 below:
Code:
   sfdisk -l /dev/mmcblk1 | /bin/busybox awk \
        -f /usr/lib/genfstab2.awk >> $tmp_fstab
should look like:
Code:
   fstab=/etc/fstab
    tmp_fstab=/tmp/fstab

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

    sfdisk -l /dev/mmcblk1 | /bin/busybox awk \
        -f /usr/lib/genfstab2.awk >> $tmp_fstab

    cmp -s $tmp_fstab $fstab || cp $tmp_fstab $fstab
    rm -f $tmp_fstab
save changes and exit.

Now copy the file genfstab.awk:
Code:
cp /usr/lib/genfstab.awk / usr/lib/lib/genfstab2.awk
Edit "/usr/lib/genfstab2.awk" and leave it like this:
Code:
#!/usr/bin/awk

BEGIN {
    # states so that we don't end up having more than one
    # of home or MyDocs; we can have as many swaps as we find
    __home = 0
    __fat = 0
}

/^\/dev\/mmc/ { start=1 }
start == 1 && $6 == 82 {
    printf "%s none swap sw 0 0\n", $1
}
the rest delete it.

Now you can restart, each time you start to check that the microSD has a swap partition and if so will mount.

I'm seeing a more elegant and does not need extra partition or cards.

The manipulation of system files can leave the N900 unusable.
I take responsibility for the results.
I really worked.

Last edited by WhiteWolf; 2010-10-19 at 09:56.
 

The Following 2 Users Say Thank You to WhiteWolf For This Useful Post: