I saw many posts describing how to change your sd card while preserving link2sd functionality, but I saw most of them relying on Titanium Backup or other backup methods... my solutions has been a bit different and, I think, quicker so I'll explain it here.
Premises:
- I've got a rooted android phone, with Android 4.2.2 cyanogenmod installed
- my phone has got a 4Gb sd card, with two partitions: the first partition is FAT32, the second one EXT4
- I used link2sd to migrate most programs to the second sd card partion
- I bought a bigger sd card, 16Gb, and I want to migrate everything from the old sd card to the second one
- pick the first card, and using your PC, make a backup of all the files of the two sd card partitions, separately. As I used Linux to do it, I suggest making a backup using tar, as it also takes care of file permissions and ownership, even if you use a FAT32 or NTFS disk to hold the backup
- pick the second card, and partition it in two, using regular utilities like fdisk or gparted, as usual
- format the first partition in FAT32, the second one in EXT4. Remember to avoid using the journal, make use of some great post like this to make a good job
- restore all files from the backup from the old FAT32 filesystem, to the new one
- restore all files from the backup from the old EXT4 filesystem, to the new one
- insert the second sd card on your phone
- start link2sd - it will prompt you for the second partition's filesystem, answer "EXT4"
- link2sd will suggest you to reboot to mount the new sdcard correctly - say yes, wait, and everything will work