Thursday, May 31, 2018

backup - How to switch sd cards when using a data2whatever (d2w) custom ROM?



I'm currently running MIUI XJ (Gingerbread 2.3.5) with d2w on my HTC Desire with the 4GB sd card it was shipped with, but as I found the joy of the occasional ROM-switch, I found myself running out of storage on the sd card, which was filling up with alternate roms, flashable updates for said roms, nandroid backups of different roms, titanium backups, miui backups and, well, the stuff I'd actually like to use (photos, music).


So my question is: How can I safely replace an sd card with a bigger one, even if the original one is partitioned in a special way to make use of d2w? I realize I could simply partition the bigger sd card similarly to the original one, but what if I need a bigger sd-ext partition? (Which I, indeed, need for some Gingersense ROMs). Will the system simply accept the bigger partition or do I have to make a nandroid backup with the original sd card and reflash that backup once the bigger, partitioned sd card is mounted? Would the partitions remain untouched?
Would there be any considerable loss if I boot the system with the partitioned sd card with an empty ext-partition? As you can see, I don't even really know what sort of data is stored there.


EDIT:


So, I did it. My solution (not optimal, but worked. Keep in mind: With the HTC Desire, you can't switch SD cards while the battery is in, so no "on the fly" way. Also, I have no proper card reader lying around.):



  1. Backup of ALL the things (Nandroid backup, just in case, MIUI/Titanium Backup for apps+system settings (things stored on the sd-ext partition) and a full copy of the previous FAT32 partition)

  2. Put the new SD card in the phone and partition it (I used 4EXTRecovery so I could do it in the phone and increased the sd-ext partition from 256 to 1024mb)

  3. Mount the sd card on a computer, copy the contents of the old FAT32 to the new one (FAT32 partition should now be the same as before and it has your MIUI/TitaniumBackup on it)

  4. Boot the system (may be slow since there is now an empty data partition), when the system is up, you can restore your backups via MIUI Backup and/or Titanium Backup. I used Google to sync contacts and messages etc were synced with MIUI Backup, if you are not running a MIUI then you can use SMS Backup+ for messages.


  5. System is now the same as before, but the partitions are bigger :)


Recommended solution I stumbled upon that seems easier to me:




  1. Mount the sd card on a pc, open in the partitioning tool of your choice (I was told partition wizard would do the trick)




  2. Clone the sd card as a whole





  3. Apply that clone to the new sd card




  4. Increase the partitions as you like




  5. Put the new sd card in your phone. Should work exactly like before.






Answer



AFAIK the different partitions are identified by their ordering on the SD card. Therefore the standard FAT32 partition comes first, followed by the app/data partition (usually ext3 or ext4). Sometimes a swap partition follows as third partition.


If you use the same partition pattern (number of partitions and partition types) on the new sd-card there should be no problem. The partition sizes should not play a role - as long as you don't reduce the size. Just partition the sd-card, format the partitions and copy your data from your old sd-card over to the new.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...