Guide Released Shows How to Update to 4.2 Without Losing SD Card Formattingon November 27, 2012 at 9:00 pm
Every new version of Android brings changes. Not only visible changes, but also under the hood changes. Sometimes they can be pretty big too. Just ask the folks in the Samsung Epic 4G forums, who had to switch to the MTD Partition Map. Android 4.2 saw the addition of multi-user support (on tablets), and some people, specifically those with a Samsung Galaxy Nexus, have faced SD Card formatting issues as a result.
XDA Senior Member k786 explains the problem more in depth:
After upgrading to 4.2 the sdcard format changed due to the addition of the multi-user feature, and because of this users were having issues with many “0″ folders being created in their sdcard when they flashed new roms in recovery, the recoveries were updated but the problem existed for many users. so this guide is a way to keep the internal storage as data/media instead of the new format data/media/0
As mentioned, k786 wrote a guide that helps get you to Android 4.2 without changing the SD card formatting. The method isn’t difficult, but it does take a while. Users have to backup, and subsequently restore, their entire /data/media. That could be several gigs, depending on what is on your Nexus. From there, users install a 4.2 Google image, restore the backup made earlier, check to see if there are any discrepancies, and then finally flash TWRP. After that, users should be able to flash any 4.2 ROM without their virtual SD card data moving from /data/media.
To learn more, check out the original thread.