Jump to content

Can't nandroid, oops


Guest tigris666

Recommended Posts

Guest tigris666

Hi Guys,

Hoping for some friendly advice with my phone. I was running custom r9 with a2sd+ on the stock standard 2gb card that came with my desire. But I got my new 32gb card in the mail today and wanted to upgrade.

Knowing I was going to be messing with junk, i ran a fresh nandroid backup.

After a bunch of googling, I found it wasn't going to be easy, so I just banged the card into my linux box, created the 3 partitions i needed with fdisk and used dd to copy the data from all 3 partitions from the old card to the new one. For non-linuxers dd is just a block device copier, it copies the data from one device to another as is, regardless of file system type.

Thinking all might be right in the world I just tried to boot the phone with the new card, since the partitions were in the same spots etc. It booted but no apps or anything. Oh well.

Boot to recovery, nandroid recover to see if that will work. But I get an error saying it can't write to /dev/block/mmcblk0p2, saying a file exists. From this point forth no roms will flash on, no data can be wiped, and even putting the old card back in won't boot either. Now it just sits on the HTC white screen and gets no further..

Some more googling says I can probably fix this by using adb to put parted on the desire and fix the above partitions manually on the device itself. Anyone got any other ideas I might be able to try? Never played with adb before and pretty scared it's going to do worse damage. I'm told as long as I can still get to recovery mode I should be ok?

Link to comment
Share on other sites

Guest tigris666

update: i am able to use the phone as per normal once i put the old 2gb card back in and nandroid from there, it's only the new card I can't seem to do anything

so i guess I am back to square one, how does one get a new card ready to go if you are using a2sd+?

obviously creating the partitions myself is a bad idea, since i've tried creating them and filling them with the old data, and also just creating empty partitions and booting recovery, and also tried creating partions and putting empty ext4 filesystem on the apps partition and empty fat32 on the main partition, none of these work, get the same error when trying to wipe data, saying cant wipe /sd-ext etc.

some people suggest formatting the entire card as just plain fat 32, put a standard r9 rom on with no a2sd, then download rom manager from market and use rom manager to partition the card while it's still in the phone, then once it's partitioned, copy the nandroid backups onto the fat partition and should be fine to nandroid from there... sounds like quite a long process? thoughts?

Link to comment
Share on other sites

Use a GParted Live CD to format the new SD card with the EXT3 partition you wish to use. Once done, take a nandroid using the old SD card (making sure you also backup the EXT)

Once complete, copy the contents of the FAT32 partition to your PC and swap SD cards.

Copy the data back to the FAT32 partition of the new SD card

Restore the nandroid backup in recovery

Should work that way

Edited by EddyOS
Link to comment
Share on other sites

Guest tigris666
Use a GParted Live CD to format the new SD card with the EXT3 partition you wish to use. Once done, take a nandroid using the old SD card (making sure you also backup the EXT)

Once complete, copy the contents of the FAT32 partition to your PC and swap SD cards.

Copy the data back to the FAT32 partition of the new SD card

Restore the nandroid backup in recovery

Should work that way

G'day Eddy

Thanks for the help. I had tried what you said after my last post. It didn't work either, and TBH i didn't have high hopes anyway as GParted wouldn't be doing anything different than what I am doing myself with fdisk on my ubuntu machine.

I have gotten sick of all the swapping of cards between machines and now just dealing with adb directly on the phone itself and partitioning whilst on there.

The problem seems to be that once the first partition FAT partition is greater than 2GB, the EXT partition created after that block is unmountable (not only by the phone, but even by linux). Something doesn't seem right here, as I am sure people are running a2sd with > 2GB FAT partitions. Perhaps it's my sdcard, i dunno. But if i create the FAT partition as just 1GB and then put my EXT partition directly after that, it will mount and boot fine. Kind of defeats the purpose of having a 32gb card though!

Link to comment
Share on other sites

Guest tigris666

Ok, literally at a loss now. Running off the gparted live cd. Put the card reader in. It sees my disk, I remove all partitions and apply.

From 32gb unallocated, i create a 2gb fat32, a 256mb ext2 and a 32mb swap. Apply. All good.

Refresh devices, bam, my ext2 and swap partitions are now "unknown" and unmountable. WTF!

I was going to try creating them all as logical partitions in an extended, thinking it's something to do with can't create ext2 partitions after a certain block, but gparted just craps out whenever i try and create an ext2 inside an extended.

Pulling my hair out now. Either don't use a2sd and limit myself to not many apps, or waste more money on another 32gb card and hope it works.

Link to comment
Share on other sites

Guest BashyUK
Ok, literally at a loss now. Running off the gparted live cd. Put the card reader in. It sees my disk, I remove all partitions and apply.

From 32gb unallocated, i create a 2gb fat32, a 256mb ext2 and a 32mb swap. Apply. All good.

Refresh devices, bam, my ext2 and swap partitions are now "unknown" and unmountable. WTF!

I was going to try creating them all as logical partitions in an extended, thinking it's something to do with can't create ext2 partitions after a certain block, but gparted just craps out whenever i try and create an ext2 inside an extended.

Pulling my hair out now. Either don't use a2sd and limit myself to not many apps, or waste more money on another 32gb card and hope it works.

Just a few things to note : Use ext3 partition rather than 2. Don't create a swap file. Just create one FAT32 and one ext3. That's it. Then just restore data to FAT and do a nandroid restore which will put your apps to ext. This has been answered all few times here so do a search and you'll find you are on the right track.

Otherwise check out Alex V wiki via his signature there's a step by step there but it's as I ssid. Have done this myself and it works fine. I think your issue was probably caused by the dd usage.

Link to comment
Share on other sites

Guest tigris666
Just a few things to note : Use ext3 partition rather than 2. Don't create a swap file. Just create one FAT32 and one ext3. That's it. Then just restore data to FAT and do a nandroid restore which will put your apps to ext. This has been answered all few times here so do a search and you'll find you are on the right track.

I tried EXT3. I've narrowed it down to something pretty simple that I don't think I'm going to be able to solve. In GParted, I create a 31gb FAT32, then a 512mb EXT3 at the end. That's all I do. I hit save. It goes ahead and does it all. I take the card reader out and put it back in. GParted reads the device again, I see my FAT32 partition there, but the EXT3 partition is now marked as UNKNOWN.

Of course from here the phone won't be able to do anything with it since it can't mount that partion as ext3.

Have tried everything from EXT2/3/4 and all kinds of sizes 128MB / 256MB / 512 MB. Have tried telling GParted to align to cylinder instead of MB. Nothing seems to make the EXT3 partition at the end readable.

IF i put the EXT3 at the START of the disk, then fill the rest out as FAT32 then GParted will see both partitions perfectly fine when plugged back in, and linux can mount the EXT3 partition fine as well. The droid however refuses to mount the sdcard from anything other than the first partition on the disk. When I boot to recovery and try to "apply update.zip from sdcard" to get into clockworkmod, it just says can't mount /dev/block/mmcblk0p0, which of course is the EXT3 partition in this particular situation.

Link to comment
Share on other sites

Guest tigris666

update: i managed to get it to work by creating the FAT32 at the end of the drive but creating it FIRST, i.e. leaving 512MB of free space. This means it sits at the end of the disk but it's the first thing written in the partition table, so it will be the first partition linux sees. I think create the EXT3 partition at the beginning of the drive as it seems to be the only place I can create it successfully.

Link to comment
Share on other sites

Guest BashyUK
update: i managed to get it to work by creating the FAT32 at the end of the drive but creating it FIRST, i.e. leaving 512MB of free space. This means it sits at the end of the disk but it's the first thing written in the partition table, so it will be the first partition linux sees. I think create the EXT3 partition at the beginning of the drive as it seems to be the only place I can create it successfully.

That's always been the basic rule of creating ext partitions for a2sd+ etc, create FAT32 first, then EXT3 :-) I didn't realise you were allocating space first then hitting create at the same time for both.

Glad you sorted it.

Link to comment
Share on other sites

Guest tigris666
That's always been the basic rule of creating ext partitions for a2sd+ etc, create FAT32 first, then EXT3 :-) I didn't realise you were allocating space first then hitting create at the same time for both.

I knew the FAT one had to be done first, but the peculiar problem for me was the the EXT partition had to live at the start of the disk, but be created second. My main gripe here is, if an EXT partition can't live past a certain block on the disk, then why don't partition tools tell you so when they create it?

When I plugged my old 2GB card in to see how it was done, it was partitioned as I expected, which was FAT at the front and the EXT at the end, with a small swap right at the very end. I tried to mimick this exactly with my new 32GB card.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.