Internal memory structure - what are those hidden partitions? - Fire HD 6 and 7 Q&A, Help & Troubleshooting

I've been digging around the memory of a 8Gb device, and have a couple of outputs, slightly edited for clarity (df and parted). See below.
Now, follow up questions:
1) there is significant mismatch in size between df and parted, is there some heavy error correction included in sizes reported by parted?
2) It seems that /cache is this large in order to store OTA updates. But if we are done with OTAs in order to keep root, should not one be able to shrink /cache, and add the space to /data even from within a working system (one could backup /data first, unmout it and /cache, resize both, etc) ?
3) with boot and recovery partitions, how does one boot into Amazon "recovery" then? Has this ever been discovered in terms of how to use it? I assume the regular boot happens from "boot" ?
4) cannot one just write custom recovery into "recovery" via a simple "dd" command ?
Thoughts?
Update: Of course, there is recovery mode! Pressing "Power" and "Volume up" buttons from off state will boot into a very limited Amazon recovery giving 2 options, Reboot, and Reset to factory defaults. So could not we jam something into that "recovery" partition, and try to boot it?
[email protected]:/ # df
df
Filesystem Size Used Free Blksize
/system 1.1G 1.1G 31.9M 4096
/cache 852.4M 1.2M 851.2M 4096
/data 5.0G 3.3G 1.7G 4096
/persistbackup 10.8M 196.0K 10.6M 4096
[email protected]:/ #parted /dev/block/mmcbkl0 print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 32.8kB 164kB 131kB PRO_INFO
2 1049kB 5243kB 4194kB PMT
3 5243kB 10.5MB 5243kB TEE1
4 10.5MB 15.7MB 5243kB TEE2
5 15.7MB 16.3MB 524kB UBOOT
6 16.3MB 24.6MB 8389kB boot
7 24.6MB 33.0MB 8389kB recovery
8 33.0MB 34.1MB 1049kB KB
9 34.1MB 35.1MB 1049kB DKB
10 35.1MB 35.7MB 524kB MISC
11 35.7MB 52.4MB 16.8MB ext4 persisbackup
12 52.4MB 1311MB 1258MB ext4 system
13 1311MB 2233MB 923MB ext4 cache
14 2233MB 7808MB 5574MB ext4 userdata

bibikalka said:
2) It seems that /cache is this large in order to store OTA updates. But if we are done with OTAs in order to keep root, should not one be able to shrink /cache, and add the space to /data even from within a working system (one could backup /data first, unmout it and /cache, resize both, etc) ?
Click to expand...
Click to collapse
Thats highly dangerous. Unmounting /data while booted might cause an immediate reset. Not to sure. But messing with /cache and partition changes on a booted system is a HUGE risk
bibikalka said:
3) with boot and recovery partitions, how does one boot into Amazon "recovery" then? Has this ever been discovered in terms of how to use it? I assume the regular boot happens from "boot" ?
4) cannot one just write custom recovery into "recovery" via a simple "dd" command ?
Click to expand...
Click to collapse
Bootloader is locked.

If we got fastboot, could we use fastboot oem unlock? Or is that only for certian devices

ryanyz10 said:
If we got fastboot, could we use fastboot oem unlock? Or is that only for certian devices
Click to expand...
Click to collapse
And where would you get the oem unlock code? The fastboot is available, but so what ...
Btw, given how large and empty /cache is, one could use something like *Directory Bind* to redirect some of the app folders from /data to /cache.

Related

[Q] Encrypted Villain ICS now can't factory reset

Hi - I have a rooted Galaxy Nexus running 4.0.3 ICS and decided to connect up to my work Exchange server. They enforce a security policy that requires the phone to be encrypted. I ran the hour long encryption process and it all runs fine. Now I want to remove work email and do a factory reset. This is where I run into problems.
I run the gui factory reset, the phone reboots but never resets. I boot into recovery mode and attempt the reset but it can't mount /sdcard so the reset doesn't happen.
Any ideas to assist would be appreciated.
OK, so after an entire day at work (!!) I managed to work out that I needed to blow away my /data/media (/sdcard on Galaxy Nexus) partition which was encrypted and recreate. That was no mean feat ! But now I am well versed in the use of ADB and Fastboot !
So I managed to push up the 'parted' tool to remove and create my partition 12. I then recreated it and converted to ext3 then ext4. So now I have a working phone again and will not be encrypting it again !
The problem I have is that I can not remember the original partition size. What I have recreated is shown below.
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC VYL00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 524kB 4194kB 3670kB sbl
3 4194kB 25.2MB 21.0MB ext4 efs
4 25.2MB 33.6MB 8389kB param
5 33.6MB 37.7MB 4194kB misc
6 37.7MB 41.9MB 4194kB dgs
7 41.9MB 50.3MB 8389kB boot
8 50.3MB 62.8MB 12.5MB recovery
13 62.8MB 62.9MB 65.5kB metadata
9 62.9MB 79.7MB 16.8MB radio
10 79.7MB 765MB 686MB ext4 system
11 765MB 1218MB 453MB ext4 cache
12 1218MB 15.4GB 14.2GB ext4 userdata
(parted)
Can someone please tell me what their Galaxy Nexus partition table looks like ? I am not sure if it makes any difference, but I am with Telstra here in Australia and have a 16GB Nexus.
Any help is appreciated.

[Q] Backing up entire tablet partitions

I want to make sure I understand this. I know cwm will backup the OS, but what if I wanted to backup my entire nook? More specifically, what if I wanted to take a picture of my nook as when it was a fresh install. Here is my theory:
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/backup.img
Will this work? Obviously I'd need an sdcard with a lot of storage, but will it backup everything so that, say, in the case all my tablet partitions get destroyed, I can just use dd to dump the img of the whole disk back onto the nook, and give me a squeaky clean nook? And how big would my sdcard have to be? at least 8gb? or at least 16gb? But yeah, my whole hypothesis behind this is to create a bootable sdcard that will do just that, backup everything from a complete stock, so that in the future if I messup my partitions, (like I did before), I can just dump images onto it, that will make it flawless.
At least I hope. Give me your thoughts. Thanks!
That would work, technically, but the CWM backup option does do a full backup AFAIK, at least, I have never had any issues with the backup missing something. Using dd is a way to ensure you get a bit for bit copy, I worry about size though. It has been a long time since I used that, if memory serves you get every bit even if that bit is free space. When I did this for backup on my Ubuntu box ages ago I had to run it through gzip or bzip2 to get the size reasonable. I'm not sure if that is possible on the Nook Tablet.
No is better if you backup partition one by one not the whole partition table. Anyways i don't recommend you to use dd as a "backup" method if there are other ways.
If you are looking for fresh install there are other ways to do it. like a normal standar user will do to "start-from-scratch" and root then boot into CWM from sdcard and backup your ROM. If you're advance user you will know how to pack it as a CWM flashable zip
I have a thread and use dd commands but for UNBRICK purposes not for "backup".
Be careful with what you do, just an advice.
~ Veronica
I would have to agree, I have personally also had issues restoring a partition table to a flash based device. You could end up with a useless backup.
Well, the reason I ask, is because for some weird reason, my partition table got corrupted. It was useless. i wish I would have backed up /rom. I got the serial number on the rom partition back, just not the mac address. but anyway, I had to clear the entire partition table and start anew. But I can't seem to get the partition table looking exactly like this:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 2684MB 1074MB fat32 media
11 2684MB 15.6GB 12.9GB ext4 userdata
Click to expand...
Click to collapse
It never gets aligned correctly. And that's why xloader won't ever load. I can get into clockworkmod backup. But that's the reason why I want that backup of the table. Whatever type of table it is, you can't recreate it in gnuparted.
soshite said:
Well, the reason I ask, is because for some weird reason, my partition table got corrupted. It was useless. i wish I would have backed up /rom. I got the serial number on the rom partition back, just not the mac address. but anyway, I had to clear the entire partition table and start anew. But I can't seem to get the partition table looking exactly like this:
It never gets aligned correctly. And that's why xloader won't ever load. I can get into clockworkmod backup. But that's the reason why I want that backup of the table. Whatever type of table it is, you can't recreate it in gnuparted.
Click to expand...
Click to collapse
Actually you can recreate the partition table but that is very advanced.
About the command would be better:
Code:
# dd if=/dev/block/mmcblk0pX of=/sdcard/mmcblk0pX
* where X is a number 1 to 11 (partition #) but partitions 10 and 11 are media and userdata too big don't worry about those yet they can be recreated so backup from partition 1 to 9 better.
For big partitions like system, cache, factory, etc is better if you add bs=4096 at the end of the code:
Example: backing up SYSTEM partition
Code:
# dd if=/dev/block/mmcblk0p8 of=/sdcard/mmcblk0p8 bs=4096
INTERNAL PARTITIONS
xloader = mmcblk0p1
bootloader = mmcblk0p2
recovery = mmcblk0p3
boot = mmcblk0p4
rom = mmcblk0p5
bootdata = mmcblk0p6
factory = mmcblk0p7
system = mmcblk0p8
cache = mmcblk0p9
Click to expand...
Click to collapse
~ Veronica
lavero.burgos said:
Actually you can recreate the partition table but that is very advanced.
About the command would be better:
Code:
# dd if=/dev/block/mmcblk0pX of=/sdcard/mmcblk0pX
* where X is a number 1 to 11 (partition #) but partitions 10 and 11 are media and userdata too big don't worry about those yet they can be recreated so backup from partition 1 to 9 better.
For big partitions like system, cache, factory, etc is better if you add bs=4096 at the end of the code:
Example: backing up SYSTEM partition
Code:
# dd if=/dev/block/mmcblk0p8 of=/sdcard/mmcblk0p8 bs=4096
​
~ Veronica
Click to expand...
Click to collapse
How do you recreate the repartition table?
Code:
(parted) mklabel gpt
Because apparently Adam said it was different. But I dunno. I tried a gpt table. It didn't seem to work
soshite said:
How do you recreate the repartition table?
Code:
mklabel gpt
Because apparently Adam said it was different. But I dunno. I tried a gpt table. It didn't seem to work
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1562130
... @meghd00t is the man for that, check last 2 pages of that thread.
If you really have f&%# up your device then that is your thread for support
~ Veronica
lavero.burgos said:
http://forum.xda-developers.com/showthread.php?t=1562130
... @meghd00t is the man for that
~ Veronica
Click to expand...
Click to collapse
Eh... I tried that one. It didn't seem to fix anything.. I know it said it fixed the partitions but it actually didn't do anything. I was pretty surprised.
But the strangest part is this:
Code:
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
/recovery ends at 16.3mb and /boot starts at 16.8mb. And I can't recreate this at all. parted automatically places the boot partition at 16.3mb. Have any clue on that?
how did you "clear the entire partition table" ?
... so you're device is bricked right? and if you really wiped all the partitions you will need high level support.
A story of what exactly you have done so far will be helpful and i would suggest not to try anything else until you explain.
~ Veronica
lavero.burgos said:
how did you "clear the entire partition table" ?
... so you're device is bricked right? and if you really wiped all the partitions you will need high level support.
A story of what exactly you have done so far will be helpful and i would suggest not to try anything else until you explain.
~ Veronica
Click to expand...
Click to collapse
Part of it is on my dead nook topic:
http://forum.xda-developers.com/showthread.php?t=1597155
But then, my partition table was corrupt. It wouldn't work at all. So I made a new partition table in parted:
Code:
(parted) mklabel gpt
Which pretty much deleted everything. Which is what I wanted. But. It's hard to recreate the exact same partitions in parted. for example, MLO starts at 131kb and ends at 262kb. But when I make the partition:
Code:
(parted) mkpart primary () 131kb 262kb
** where () denotes unformatted filesystem
It says the file size is 132kb, whereas the xloader partition should actually be 131kb. How the heck does that happen? Because the xloader partition is meant to be super secure, then that partition doesn't pass consistency check. And if I make it end at 261kb, it still won't pass the consistency check.
I don't know what B&N did with their partition table. It really is a strange table.

[Q] Corrupt GPT?

I think after running wrong exit_recovery.zip, I managed to trash partition table/GPT - or some other combination of stupidity - hoping someone can help..
CWM Recovery Log
Starting recovery on Mon Jun 25 21:11:17 2012
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (1280 x 800)
ClockworkMod Recovery v5.8.2.0
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /system ext4 /dev/block/mmcblk0p1 (null) 0
2 /cache ext4 /dev/block/mmcblk0p2 (null) 0
3 /misc emmc /dev/block/mmcblk0p3 (null) 0
4 /staging ext3 /dev/block/mmcblk0p4 (null) 0
5 /data ext4 /dev/block/mmcblk0p8 (null) 0
6 /boot emmc /dev/block/mmcblk0p10 (null) 0
7 /recovery emmc /dev/block/mmcblk0p9 (null) 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /sdcard during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
I:Completed outputting fstab.
Irocessing arguments.
...
[recovery session] Fdisk
/tmp # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 63.5 GB, 63577260032 bytes
4 heads, 16 sectors/track, 1940224 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0 doesn't contain a valid partition table
[recovery session] Parted
/tmp # ./parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
Error: /dev/block/mmcblk0: unrecognised disk label
Hypothesis
By doing exit recovery opt 1a http://forum.xda-developers.com/showthread.php?t=1514088 I was able to bring up the virtuousprime ROM boot, but virtuous failed (reboot) after trying to format /data.
I dd'd the first 8096 bytes of mmcblk0 and they are all zeros?
From CWM, I am able to mount partitions mmcblk0p1, mmcblk0p3, mmcblk0p5.
So from all that, I am thinking I need to flash MBR, replace GPT on LBA 1? If this is correct, does anyone have a stock GPT for the tf201?
I can then format /data (mmcblk0p8) and I think my ROMs will then work.
kind regs,
Based on the information here: https:// en.wikipedia.org/wiki/GUID_Partition_Table#Partition_table_header_.28LBA_1.29, replacing LBA 1 will only fix the GPT header. Since you said that the first 8096 bytes were all zeros, it would seem that those would fall into LBA 2, 3, etc., corrupting the partition table.
But since you said that CWM can mount your partitions, you might be able to use GPT fdisk's recovery features to fix the problem. I don't know if anyone has compiled it for Android though Please note that the regular fdisk cannot handle GPT, only MBR.
When you said "flash MBR", what exactly do you mean? GPT and MBR are two different partition structures and if you replace either one with the other, the partition table will be lost and you won't be able to mount any partition.
Was thinking about building LBA0 and LBA 1 separately, was going from that Wikipedia article, "...Legacy MBR information is contained in LBA 0, the GPT header is in LBA 1.." and I thought - perhaps naively - that an fdisk command with /mbr option would sort out LBA0, then I worry about GPT in LBA1, but maybe I am confusing fdisk /mbr option with another command (old DOS)?
I have all the partition offsets and disk size from backup (/sys/devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0:0001/block/mmcblk0/..) and know what the partition table should look like; there was no "Partition 9", I made this up because there was 1024 unaccounted bytes after mmcblk0p8 (/data) ends:
Disk size: 1241744336 bytes
Partition 1 (/system): start 74752; End 1123328; Size 1048576
Partition 2 (/cache): start 1123328; End 1999872; Size 876544
Partition 3 (/misc): start 1999872; End 2003968; Size 4096
Partition 4 (/staging): start 2003968; End 3096576; Size 1092608
Partition 5 (/btmac): start 3096576; End 3106816; Size 10240
Partition 6 (/?): start 3106816; End 3107840; Size 1024
Partition 7 (/?): start 3107840; End 3118080; Size 10240
Partition 8 (/data): start 3118080; End 124173312; Size 121055232
Partition 9: start 124173312; End 124174336; Size 1024
Given that /system mounts, I think if I had a stock dump from a tf201 of bytes 0-74752 might also be an alternative - I could verify the GPT table against above before I put it in.
Another option I can think of, comes from reference I see to a "backup GPT" held in last sector of GPT disks? If you look at partition offsets above, there is 1024 bytes at the end where I may get this information - but I think injecting in a dump of those first 74k bytes into mmcblk0 - as above - would be safer.
damonbrisbane said:
Was thinking about building LBA0 and LBA 1 separately, was going from that Wikipedia article, "...Legacy MBR information is contained in LBA 0, the GPT header is in LBA 1.." and I thought - perhaps naively - that an fdisk command with /mbr option would sort out LBA0, then I worry about GPT in LBA1, but maybe I am confusing fdisk /mbr option with another command (old DOS)?
Click to expand...
Click to collapse
I wouldn't suggest doing that. That would create a hybrid MBR. When a hybrid MBR disk is read using MBR, only the first four partitions can be visible (after redefining the partition table in LBA0). If the disk is read using GPT, all the partitions will be visible. I don't know if Android and Linux prefer MBR over GPT, but if they do, you might lose access to partitions 5-8.
By the way, the '/mbr' option is for the diskpart tool from MSDOS and Windows
damonbrisbane said:
Another option I can think of, comes from reference I see to a "backup GPT" held in last sector of GPT disks? If you look at partition offsets above, there is 1024 bytes at the end where I may get this information - but I think injecting in a dump of those first 74k bytes into mmcblk0 - as above - would be safer.
Click to expand...
Click to collapse
You're absolutely right. I had forgotten about this. Do you happen to know if those mmcblk0p# partitions are visible when the tablet is plugged into a Linux computer? If so, GPT fdisk can restore the partition table and GPT header from the backup GPT.
You would run something like this to restore the backup GPT:
http://paste.kde.org/488054/
EDIT: I found a version of gdisk compiled for Android by meghd00t (http://forum.xda-developers.com/showpost.php?p=24805392&postcount=74). You may be able to restore the backup GPT directly from the tablet
Download link from the post: http://dl.dropbox.com/u/64885133/gptfdisk.zip
Thanks Chen, i plan to try the gptfdisk tonight when I get home from work and can post the result.
One thing i'm not sure about is access mmcblk0 from linux - does this mean I can access the internal mmcblk0 of the tf201 directly through a linux device? Right now I access mmcblk0 solely through adb shell to CWM recovery.
damonbrisbane said:
Thanks Chen, i plan to try the gptfdisk tonight when I get home from work and can post the result.
One thing i'm not sure about is access mmcblk0 from linux - does this mean I can access the internal mmcblk0 of the tf201 directly through a linux device? Right now I access mmcblk0 solely through adb shell to CWM recovery.
Click to expand...
Click to collapse
No problem There's also an option to backup the GPT header and partition table to file. I'd suggest doing that just in case anything goes wrong.
I'm not entirely sure if the internal memory can be accessed directly from Linux. But from what I've been reading in the forums today, it seems that it might not possible (I'm pretty new to Android).
Hopefully gptfdisk will work via adb shell
Whew, we're off life support! and more importantly - my wife wont kill me for an Unauthorised Brick to The Birthday Device
Steps Performed
ADB - Write backup GPT to LBA1 mmcblk0
~ # ./gdisk /dev/block/mmcblk0
GPT fdisk (gdisk) version 0.8.4
Unsupported GPT version in backup header; read 0x00000000, should be
0x00010000
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): r
Recovery/transformation command (? for help): ?
b use backup GPT header (rebuilding main)
c load backup partition table from disk (rebuilding main)
…
? b
Recovery/transformation command (? for help):
? c
Warning! This will probably do weird things if you've converted an MBR to
GPT form and haven't yet saved the GPT! Proceed? (Y/N): Y
Caution! After loading partitions, the CRC doesn't check out!
Recovery/transformation command (? for help): p
Disk /dev/block/mmcblk0: 124174336 sectors, 59.2 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2E8491CC-AFFC-43B9-B1C4-97D2F258BE1C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 124174302
Partitions will be aligned on 2048-sector boundaries
Total free space is 75709 sectors (37.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 74752 1123327 512.0 MiB 0700 AP
2 1123328 1999871 428.0 MiB 0700 CC
3 1999872 2003967 2.0 MiB 0700 MC
4 2003968 3096575 533.5 MiB 0700 UP
5 3096576 3106815 5.0 MiB 0700 PR
6 3106816 3107839 512.0 KiB 0700 YU
7 3107840 3118079 5.0 MiB 0700 CA
8 3118080 124173311 57.7 GiB 0700 UA
Recovery/transformation command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/block/mmcblk0.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
~ #
ADB/CWM - Exit recovery and attempt Virtuousprime ROM install
I then did exit recovery as per 1a http://forum.xda-developers.com/showthread.php?t=1514088
Upon reboot Virtuousprime wouldn't go as far as it got before. I went back into adb shell and did wipe data:
Wipe data/factory reset
Formatting /data
Error mounting /data !
Skipping format...
Formatting /cache
Formatting /sd-ext
Formatting /sdcard/.android_secure...
Error mounting /sdcard/.android_secure!
Skipping format...
Data wipe complete
Note the error on /data. Could not format /data either using the CWM mounts and storage menu. I named the partitions I knew about and formatted /data (mmcblk0p8) from adb shell:
Number Start End Size File system Name Flags
1 38.3MB 575MB 537MB ext4 system
2 575MB 1024MB 449MB ext4 cache
3 1024MB 1026MB 2097kB misc
4 1026MB 1585MB 559MB ext3 staging
5 1585MB 1591MB 5243kB fat32 btmac
...
8 1596MB 63.6GB 62.0GB ext4 data
mke2fs -t ext4 /dev/block/mmcblk0p8
I then found that CWM data/factory reset went through without errors:
Wipe data/factory reset
Formatting /data
Formatting /cache
..
Data wipe complete
And subsequently exit recovery and virtuous prime rom have installed OK, tested across reboot and shutdown
Cheers!
damonbrisbane said:
Whew, we're off life support! and more importantly - my wife wont kill me for an Unauthorised Brick to The Birthday Device
Click to expand...
Click to collapse
Haha, I'm glad I was able to help

Unable to Format Partitions in CWM Recovery

I've searched through the all the XS forums and Backup & Restore within CWM Recovery seems to work for everyone, on all the different ICS Based Kernels with Recovery except for me.
I get the error below whenever I try to format my /system partition through recovery; as the Restore tries to format the partition before restoring to it by restores always fail and I'm left with a /system partition that I can't mount. Only through restoring through Flashtool can I get the phone to boot again. Has anyone seen this before or have any idea what the problem is? Someone having a similar issue on the Samsung Galaxy Player had a similar issue and it was down to a corrupt partition table Galaxy Player Problem
Error From Recovery
Code:
Formatting /system...
E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p12
Error formatting /system!
Error mounting /system!
My Partition Table (if it's any use)
Code:
Disk /dev/block/mmcblk0: 31.9 GB, 31910264832 bytes
4 heads, 16 sectors/track, 973824 cylinders, total 62324736 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 4096 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 4097 5120 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 8192 49151 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 49152 61071359 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 50176 51199 512 46 Unknown
/dev/block/mmcblk0p6 53248 59391 3072 4a Unknown
/dev/block/mmcblk0p7 61440 67583 3072 4b Unknown
/dev/block/mmcblk0p8 69632 75775 3072 58 Unknown
/dev/block/mmcblk0p9 77824 88063 5120 70 Unknown
/dev/block/mmcblk0p10 90112 106495 8192 83 Linux
/dev/block/mmcblk0p11 106496 139263 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 139264 2236415 1048576 83 Linux
/dev/block/mmcblk0p13 2236416 2748415 256000 83 Linux
/dev/block/mmcblk0p14 2748416 6942719 2097152 83 Linux
/dev/block/mmcblk0p15 6942720 61071359 27064320 c Win95 FAT32 (LBA)
I was sondering if anyone had any suggestions, or could at least post their Partition Table to see if I need to sort mine out
(From ADB:
fdisk /dev/block/mmcblk0
U,
P
Then paste it here)
Cheers,
Andy
hello Andy..
mine partition table is just the same with you. but i can restore my backup (which include /system backup) just fine.whick kernel are you on?
It happened to me once. I formated data partition and it worked, don't know why
I've had the same problems with the FXP kernels ( both CM9 & CM10) ,Advanced Stock and SSpeed. I'm starting to wonder if the memory is actually damaged.
It's hit and miss as to which partitions it'll let me format, system and cache almost always fail, data sometimes works,but then frequently won't mount afterwards.
Sent from my LT26i using xda premium
Hi!
I've the same problems.
My phone has a srange behavior... Often can't ormat partitions, can't mount them, but after few retries i can manage it. And it's totally random..
You think is a software memory or a damaged memory ?
I never can't restore a nandroid backup because it give me an error restoring system partition.
Any ideas ?
mrscope said:
Hi!
I've the same problems.
My phone has a srange behavior... Often can't ormat partitions, can't mount them, but after few retries i can manage it. And it's totally random..
You think is a software memory or a damaged memory ?
I never can't restore a nandroid backup because it give me an error restoring system partition.
Any ideas ?
Click to expand...
Click to collapse
I've found a sort of work around. It appears to only be recoveries that use an ICS kernel that give me issues, so I loaded Doom's Advance Stock GB Kernel onto the phone and the recovery on that works flawlessly everytime. (it also has better features than regular CWM Recovery)
All the ICS kernel's that I tried will always successfully back up and restore the boot partition, so I use them to do that. Then restore DoomKernel (advanced restore, restore boot) then do all my backups, restores, and flashing with DooMRecovery. Then you can tidy everything up by moving the ICS Kernel BootPartion image into the DooMRecovery system/data backup folder, then insert the boot.img line from the checksum MD5 file at the start of the ICS MD5 file into the DooMRec MD5 file. (so you have all the correct files in the same folder, with the correct MD5 sum for each of the images in the folder). Then you can do a restore via DoomRecovery if you ever need to.
I grant you it's a bit messy and if the timestamps don't work properly a little confusing, but it does do the job, and it means you can easily swap between ROM's on the go.
sixdaysandy said:
I've found a sort of work around. It appears to only be recoveries that use an ICS kernel that give me issues, so I loaded Doom's Advance Stock GB Kernel onto the phone and the recovery on that works flawlessly everytime. (it also has better features than regular CWM Recovery)
All the ICS kernel's that I tried will always successfully back up and restore the boot partition, so I use them to do that. Then restore DoomKernel (advanced restore, restore boot) then do all my backups, restores, and flashing with DooMRecovery. Then you can tidy everything up by moving the ICS Kernel BootPartion image into the DooMRecovery system/data backup folder, then insert the boot.img line from the checksum MD5 file at the start of the ICS MD5 file into the DooMRec MD5 file. (so you have all the correct files in the same folder, with the correct MD5 sum for each of the images in the folder). Then you can do a restore via DoomRecovery if you ever need to.
I grant you it's a bit messy and if the timestamps don't work properly a little confusing, but it does do the job, and it means you can easily swap between ROM's on the go.
Click to expand...
Click to collapse
I had the same thing last week, couldn't restore a backup form CWM (on Xperia S/FXP CM10 207). Formatting cache and system 'manually' in CWM also failed. /data was OK.
I ended up formatting from adb (mkfs.ext2 -T ext4 /dev.... ) and mounting the partitions through CWM. Then I untarred the different partitions of my CWM-backup and everything was fine.
Is this a problem of CWM or my phone, or ...?
Thanks
Frank
I am having the exact same issue. I cannot -ever- format the cache . So every restore attempt ends in error.
I have rooted stock .55 , with locked bootloader.
Did anybody ever found a fix for this.
I have read the other recovery option but it requires kernel changing and possibly unlocked bootloader.
I created a thread with my issues, here
http://forum.xda-developers.com/showthread.php?t=2163141

a Dummies Guide to repartitioning ?

let me first say that virtually none of what follows is my own work!
I have simply 'tweaked' and plagiarized the brilliant postings made by others, to hopefully make it all a bit more idiot proof for newbies, and lesser mortals such as myself. (respect to 'tselling' in particular) ...
Note that this only for 16GB Nooks that have been rooted, and with CM Recovery available
I'm sure it would work on the 8 gigs, but don't know the figures to use
background:
after rooting, installing CWmod, and a CM 10 rom on my 16 gig Nook Tablet by following the great guides on here, I then wanted to go the whole hog and repartition it.
initially, Veronicas post here: http://forum.xda-developers.com/showthread.php?t=1531120
seemed the best, as I could get 12 Gig for myself. sadly it did not work for me as my copy of Cwmod does not support 'sqdisk' - but I learned a lot nonetheless.
I then found 'tselling's great post here:http://forum.xda-developers.com/showpost.php?p=22157605&postcount=25
I eventually resized my partitions to approx 4GB & 9GB, but not without some issues.
the posting stated that all actual commands were in bold, eg: 2nd command was (parted) print but this failed.
“back in the day”, I was very good with MSDOS and batch files, so I knew in my heart that I had missed something obvious!, yep! - (parted) is the screen response, print is the command ... from then on it was all a bit of a doddle
so here is my two pennyworth:
preparation: read everything at least once! ... and ensure you have done a full CM backup !
1. from all the great guides on here, ensure that you know how to connect your Nook to a PC,install drivers, and 'ADB' etc, and how to get into an ADB Shell.
2. the method works via CW Recovery, which can be either from an sdcard, or installed internally, (as mine is). do not continue until you are comfortable with all that
3. reboot your Nook into Recovery, cable it to your PC, and get ADB running.
4. run command ADB devices, then ADB shell to ensure you have connectivity.
5. all the actual commands to enter into your PC are in red (some are just single letters)
6. screen responses from ADB are in black (but not bold)
7. my comments and observations are in blue (but not bold)
8. despite the length of this post, (and my blathering), the whole process takes less than 10 minuets, and only entails the copying and pasting of 24 commands from here, onto your PC
9.some of the screen responses you will get are not exactly as I have got shown below. (this is simply because I had already done it once for 4 & 9 gig, and this was my 2nd run for 12gig.)
10.even if you mess up, don't panic, as the backup you made earlier can easily be restored with your CM recovery, and you are good to go again.
11. so let's start:- below are the commands to copy into your PC (remember, red lines only)
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print (here we are simply asking it what partitions we currently have, but we don't get them until we do the 2 required 'fixes' that follow)
print
print
Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? f
f
f
Warning: Not all of the space available to /dev/block/mmcblk0 appears to be
used, you can fix the GPT to use all of the space (an extra 569312 blocks) or
continue with the current setting?
Fix/Ignore? f
f
f
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 2684MB 1074MB fat32 media
11 2684MB 15.6GB 12.9GB ext4 userdata
(parted) rm 11 (removing partition 11, it needs to be removed as most of that space will be needed for partition 10 to stretch in to)
rm 11
rm 11
(parted) resize
resize
resize
Partition number? 10 (partition 10 is the one we want to the be largest, so it is to be resized))
10
10
Start? [1611MB]? (1611MB is end of partition 9, so don’t' anything -just hit enter key only)
End? [2684MB]? 13.6GB (increased from tsellings 11.6GB) (I put an extra 2 gig here as the original instructions ended up with 9 gig and 4 gig)
(also, there will be a pause here whilst it completes)
13.6GB
13.6GB
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 13.6GB 12GB fat32 media lvm
(now making partition 11, which was removed earlier)
(parted) mkpartfs primary ext2
mkpartfs primary ext2
mkpartfs primary ext2
Start? 13.6GB (ie: - where partition 10 ended earlier)
11.6GB
11.6GB
End? 15.6GB
15.6GB
15.6GB
(another pause here whilst it does it)
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 13.6GB 12GB fat32 media lvm
11 11.6GB 15.9GB 2326MB ext2
(success! look at nos 10 & 11 -my partitions are now 12GB and 2.36Gb,rather than the 4 & 9 as in the original 'tsellings' posting)
(parted) name 11 userdata (just naming partition 11)
name 11 userdata
name 11 userdata
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
11 11.6GB 15.9GB 4326MB ext2 userdata
(parted) quit (just quitting 'part' only, and staying in the ADB shell)
quit
quit
(Information: You may need to update /etc/fstab - I did.)
~ # tune2fs -j /dev/block/mmcblk0p11
tune2fs -j /dev/block/mmcblk0p11
tune2fs 1.41.6 (30-May-2009)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
~ # e2fsck -fDp /dev/block/mmcblk0p11
e2fsck -fDp /dev/block/mmcblk0p11
/dev/block/mmcblk0p11: 11/529056 files (0.0% non-contiguous), 49429/1056092 blks
~ # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p11
tune2fs 1.41.6 (30-May-2009)
(now running e2fsck on the files system)
~ # e2fsck -fDp /dev/block/mmcblk0p11
at this point, my system did not show all the 'fixed' responses as in 'tselling's original post but it did end with the same confirmation that all was ok,
ie:
/dev/block/mmcblk0p11: 11/529056 files (0.0% non-contiguous), 49429/1056092 bloc ks
so it is ok to continue
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 262kB 131kB xloader
2 262kB 524kB 262kB bootloader
3 524kB 16.3MB 15.7MB recovery
4 16.8MB 33.6MB 16.8MB boot
5 33.6MB 83.9MB 50.3MB fat32 rom
6 83.9MB 134MB 50.3MB fat32 bootdata
7 134MB 522MB 388MB ext4 factory
8 522MB 1164MB 642MB ext4 system
9 1164MB 1611MB 447MB ext4 cache
10 1611MB 11.6GB 9989MB fat32 media msftres
11 11.6GB 15.9GB 4326MB ext4 userdata
(parted) quit (simply quitting 'part')
quit
quit
~ # reboot recovery (finally, the last command)
at this point the Windows CMD box on your PC will drop out of ADB, and your Nook will reboot back into Recovery,
where, from “backup and restore - advanced restore” you can restore your data partition only.
Reboot system yet again, and all should be fine
I have attached photo of mine.
...........................................................................................................
Also, once you've done all this you can, if you wish, go back into an ADB shell and enter the following commands one at a time
cd "/data/media/B&N Downloads"
rm -r *
cd ..
rmdir "B&N Downloads"
ln -s "/media/B&N Downloads" "B&N Downloads"
this points your B & N library to your /media folder for downloading, helpful if you want to manage all your books in Calibre.
...............................................................................................................
again,
many thanks, and my full respect and appreciation, to all those whose knowledge and postings here at XDA have made all this possible for the less experienced amongst us.
Kevin
ps: it's a pity though that I do not know ADB as well as I do MSDOS, else I would have compiled a 'batch file' or script to make it automated.
Wow. Thanks. This was just what I needed. For some reason, I simply couldn't get my PCs at home to load the appropriate USB driver update for my Nook. So I did it on my Mac. I have RARELY ever opened a shell on a mac. But with a couple searches, a download or two, and this simple guide, not only did I get my nook to show up on my mac (via CWM) but to also adjust my partitions.
Awe-Some!
:good::good:
nooknut said:
Wow. Thanks. This was just what I needed. For some reason, I simply couldn't get my PCs at home to load the appropriate USB driver update for my Nook. So I did it on my Mac. I have RARELY ever opened a shell on a mac. But with a couple searches, a download or two, and this simple guide, not only did I get my nook to show up on my mac (via CWM) but to also adjust my partitions.
Awe-Some!
:good::good:
Click to expand...
Click to collapse
glad it was of some use mate,
but remember, it was not really a result of my knowledge, all I did was put it all together a bit more simply.
carkev said:
glad it was of some use mate,
but remember, it was not really a result of my knowledge, all I did was put it all together a bit more simply.
Click to expand...
Click to collapse
Understood. It takes a village.
Same here
nooknut said:
Wow. Thanks. This was just what I needed. For some reason, I simply couldn't get my PCs at home to load the appropriate USB driver update for my Nook. So I did it on my Mac. I have RARELY ever opened a shell on a mac. But with a couple searches, a download or two, and this simple guide, not only did I get my nook to show up on my mac (via CWM) but to also adjust my partitions.
Awe-Some!
:good::good:
Click to expand...
Click to collapse
Nook was recognized as NookTablet without driver from recovery, instead of ADB device or something, so I couldn't update driver for it, as it didn't
Took me 40 minutes to finally give up and open my work mac. Worked like magic from there.
Can anyone explain why this happens on windows?
---------- Post added at 12:37 AM ---------- Previous post was at 12:20 AM ----------
Did the whole guide (thanks a big for really easy-to-follow guide), because I thought that it's totally locked and unusable with Cyanogenmod. And then I understood that it's actually used by CM for apps, apps data and cache.
So I have few questions.
1. After some time of usage, do you feel that 2GB is enough for all apps and their data?
2. Is it possible to make apps that do additional download use internal storage (the freed 12GB) instead of requiring external SD? Is it maybe a matter of mounting it as sdcard1 somehow?
3. Is it totally impossible to use same partition both for apps and for media and just mount some folders right way?
Sorry for the noob questions, i'm just totally new to android partitioning and mounting.
CrazyShot said:
Nook was recognized as NookTablet without driver from recovery, instead of ADB device or something, so I couldn't update driver for it, as it didn't
Took me 40 minutes to finally give up and open my work mac. Worked like magic from there.
Can anyone explain why this happens on windows?
---------- Post added at 12:37 AM ---------- Previous post was at 12:20 AM ----------
Did the whole guide (thanks a big for really easy-to-follow guide), because I thought that it's totally locked and unusable with Cyanogenmod. And then I understood that it's actually used by CM for apps, apps data and cache.
So I have few questions.
1. After some time of usage, do you feel that 2GB is enough for all apps and their data?
2. Is it possible to make apps that do additional download use internal storage (the freed 12GB) instead of requiring external SD? Is it maybe a matter of mounting it as sdcard1 somehow?
3. Is it totally impossible to use same partition both for apps and for media and just mount some folders right way?
Sorry for the noob questions, i'm just totally new to android partitioning and mounting.
Click to expand...
Click to collapse
I'm glad that you managed it ok with you Mac and the only thing I can think of re Windows USB drivers is that sometimes windows can have too many drivers on it ( from other devices that you may not use anymore) and it gets confused
this has happened to me, and I use a simple utility I found called USBDeview with which it is easy to uninstall drivers for old phones/printers etc.
it can be found here: http://www.nirsoft.net/utils/usb_devices_view.html
as to your other 3 questions, 2 gig for apps has proved more than enough for me,
but I don't know enough to advise on you with Qs 2 & 3.
fstab
Hi, something that I missed in your guide.
You said you modified "fstab".
Can you tell what is it and why/how to modify it, or point to good article about it?
CrazyShot said:
Hi, something that I missed in your guide.
You said you modified "fstab".
Can you tell what is it and why/how to modify it, or point to good article about it?
Click to expand...
Click to collapse
I'm sorry mate. but I can't remember!
I picked up everything from either Veronica's or Tselling's original posts as I said,
and can only assume that this was something I actually did whilst doing the process.
I don't have the Nook anymore, so cannot go through it again as I did. having said that it probably isn't that important
CrazyShot said:
Hi, something that I missed in your guide.
You said you modified "fstab".
Can you tell what is it and why/how to modify it, or point to good article about it?
Click to expand...
Click to collapse
Fstab is a file that checks where your drive partitions are mounted. For example, on Linux, it's stored as a file called /etc/fstab, and you modify it if you want to map other harddrives or partitions (or even ISO images and such) to a mountpoint.
It is VERY important. If you mess up your fstab, your computer or device may be unable to boot, depending on how much you mess it up (but your data will remain intact).
sagirfahmid3 said:
Fstab is a file that checks where your drive partitions are mounted. For example, on Linux, it's stored as a file called /etc/fstab, and you modify it if you want to map other harddrives or partitions (or even ISO images and such) to a mountpoint.
It is VERY important. If you mess up your fstab, your computer or device may be unable to boot, depending on how much you mess it up (but your data will remain intact).
Click to expand...
Click to collapse
thanks, good advice - obviously I was quite lucky with whatever I did!

Categories

Resources