View Single Post
Posts: 58 | Thanked: 43 times | Joined on Aug 2010
#48
Read throught the sources for SwapSet and it's a great tool - was actually disappointed to find out I already had SwapSet installed, and thus I was already enjoying compcache on every start of the device ..

So, I'm trying to use Windows 7 or the N900 to do the repartitioning of the microSD. I have not been able to find a guide doing this, and I'm hoping to offer a solution without going the LiveCD->Gparted route. So, I'm trying to do this on the N900 using a script. That script could possibly be incorporated in SwapSet, and on installation or update the user could be requested whether or not the user wanted to use the micro-SD for this. I'm thinking something like: {PSEUDO-CODE ALERT}
Code:
If not swap_found_on_SD 
    offer question /* want to repartition the SD to create a swap partition yes/no
  if yes
    check for availability
    repartitioning
  end if
end if
swapset startup
So it seems this could be done using fdisk and rootsh. I'll try and write a proposal script for this later on. Would size=256mb be sufficient, or should this be larger?

Next topic, about unmounting the Swap partition before the whole microSD gets unmounted - what's the best route here? I was thinking either use dbus or any other event thing to unmount the swap and re-prioritize the swap, or to alter the behaviour so that the swap doesn't get unmounted. This last solution would require loads of big-text red lines screaming not to release the microSD before turning off the device. However, there's mixed reports on this issue, as sulu pointed out that the partition does not get unmounted when the cover is taken off. Anybody?