Photon sd card builds (partition coruption) - HD Mini General

I faced an problem with sd card builds, need to see if it is only to me or is also present to you. Problem is with sd card (partition 1) coruption!
fdisk mmcmlk0 displayng no coruption!
Code:
fdisk /dev/block/mmcblk0
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 15190 * 512 = 7777280 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1021 7754464 b Win95 FAT32
but fdisk partition (mmcblkop1) displaying very very good coruption with 4 partitions inside partition
Code:
fdisk /dev/block/mmcblk0p1
The number of cylinders for this disk is set to 242327.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
p
Disk /dev/block/mmcblk0p1: 7940 MB, 7940571136 bytes
4 heads, 16 sectors/track, 242327 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 12158374 29994462 570754815+ 72 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 2635774 32886216 968014120 65 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 29216898 59467339 968014096 79 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 ? 45088769 45089636 27749+ d Unknown
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
So its like we have problem! Also I think this is all a result of problems we have with the file transfer to disk!
Also in log I see all time enter/leave (but phone is in sleep mode!):
Code:
<4>[ 568.114746] msmsdcc_resume enter
<4>[ 568.114928] msmsdcc_resume leave
<4>[ 568.114986] msmsdcc_resume enter
<4>[ 568.115103] msmsdcc_resume leave

I don't know whats wrong but we have coruption in sd card, initrd related? or kernel side related? or android side related??? I created two fat32 partitions this time, first is for all android files /bootsdcard, seccond is mounted as a /mnt/sdcard, initrd is edited allso! Got coruption in all partitions Why???
Code:
Disk /dev/block/mmcblk0p1: 6892 MB, 6892752384 bytes
4 heads, 16 sectors/track, 210350 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 29215178 31850952 84344761 69 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 26586242 55803140 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 41 41 0 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 45088769 45089587 26207+ 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Command (m for help): q
q
# fdisk /dev/block/mmcblk0p2
fdisk /dev/block/mmcblk0p2
The number of cylinders for this disk is set to 32130.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
p
Disk /dev/block/mmcblk0p2: 1052 MB, 1052835840 bytes
4 heads, 16 sectors/track, 32130 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p2p1 ? 29215178 31850952 84344761 69 Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2p2 ? 26586242 55803140 934940732+ 73 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p2p3 ? 41 41 0 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p2p4 45088769 45089587 26207+ 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order
Anyone who use google page release want to confirm our problem? How to see if coruption exist in your sd card? Simply open android terminal emulator, type "su" press enter and confirm administrator, type "fdisk /dev/block/mmcblk0p1" and press enter, type "p" and press enter, to exit from fdisk type "q" and press enter. I waiting you reply

Code:
Disk /dev/block/mmcblk0p1: 1971 MB, 1971416576 bytes
4 heads, 16 sectors/track, 60162 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 27627926 54209359 850605874+ 6e Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 30526934 45850528 490354992+ ff Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 28151302 30786496 84326194+ 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 1 55513776 1776440832 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order

Code:
# fdisk /dev/block/mmcblk0p1
The number of cylinders for this disk is set to 120880.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/block/mmcblk0p1: 3960 MB, 3960995840 bytes
4 heads, 16 sectors/track, 120880 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1p1 ? 27627926 54209359 850605874+ 6e Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p1p2 ? 30526934 45850528 490354992+ ff Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p1p3 ? 28151302 30786496 84326194+ 74 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p1p4 45088769 45089616 27106 0 Empty
Partition 4 does not end on cylinder boundary
Partition table entries are not in disk order

Related

Apps2Sd + Hero

So I did a wipe on my phone and installed Hero. Whenever I try to install an app it says "insufficient storage". I only have 9Mb available in my internal memory.. why is it so little?
I just formatted my 4Gb sdcard to Fat32 and ran sdsplit and got the following::
Code:
$ su
# lucid -s
/data/app is not linked
/data/app-private is not linked
/data/data is not linked
/data/dalvik-cache is not linked
/system/media is not linked
-------------------------
-------------------------
2.0K /system/sd
# du -s /sdcard
16 /sdcard
# df /data
/data: 91904K total, 82108K used, 9796K available (block size 4096)
# /data/sdsplit -fs 3600M
--------------------------------------
+You have chosen to perform the following actions:
.BACKUP /sdcard contents to /data
.CONFIGURE system to mount EXT2 partition
!WARNING! Do NOT do this on JF1.5 builds!
.REPARTITION sdcard: 3600M FAT / EXT2
!WARNING! Will DELETE data on sdcard!
.MAKE FAT32 and EXT2 filesystems
.RESTORE /data to sdcard
ARE YOU SURE YOU WANT TO PROCEED? y/N
y
--------------------------------------
+Checking validity of mkdosfs
1+0 records in
1+0 records out
1 bytes transferred in 0.001 secs (1000 bytes/sec)
--------------------------------------
+Checking validity of mke2fs
--------------------------------------
+Backing up /sdcard to /data
--------------------------------------
+Backing up and Updating /system/init.rc
--------------------------------------
+Backing up and Updating /system/etc/mountd.conf
WARNING: /system/etc/mountd.conf backup /system/etc/mountd.conf.orig already exists!
Do you want to overwrite it? y/N
y
--------------------------------------
+Partitioning sdcard
--------------------------------------
+ Blank out the 4 first blocks of the sdcard so that mountd does not try to remount it on fdisk write preventing a kernel partition table re-read.
4+0 records in
4+0 records out
2048 bytes transferred in 0.006 secs (341333 bytes/sec)
--------------------------------------
+ Wipe partition table and create FAT32 3600M/EXT2 partitions
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-125632, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-125632, default 125632):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (Win95 FAT32)
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (109865-125632, default 109865): Using default value 109865
Last cylinder or +size or +sizeM or +sizeK (109865-125632, default 125632): Using default value 125632
Command (m for help): Partition number (1-4): Hex code (type L to list codes):
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
/dev/block/mmcblk0p2 109865 125632 504576 83 Linux
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table
--------------------------------------
+Creating FAT32 Filesystem
opening /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: 7017536 sectors in 877192 FAT32 clusters (4096 bytes/cluster)
MBR type: 11
bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=7031280 hds=0 hid=0 bsec=7031280 bspf=6854 rdcl=2 infs=1 bkbs=2
--------------------------------------
+Creating EXT2 Filesystem
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
126480 inodes, 504576 blocks
25228 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
62 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
--------------------------------------
+Mounting FAT Filesystem
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+Mounting EXT2 Filesystem
Did not find ext2.ko, (normal on JF1.5)
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+You should now have a FAT partition on /sdcard and an EXT2 partition on /system/sd. If things worked, you should see an entry for /sdcard and /system/sd below:
--------------------------------------
+Restoring /data/sdcard to /sdcard
cp: cannot create directory '/sdcard/.footprints': Read-only file system
Permission setting errors are normal on a FAT system
===ERROR: restore failed!

Partition information

Not really big news for anyone who's installed SDE and poked around a bit, but I thought I'd post this anyway.
Taken from a 16GB Archos 101. Your results may differ.
Code:
Disk /dev/mmcblk0: 536 MB, 536870912 bytes
4 heads, 16 sectors/track, 16384 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 5 1605 51200+ 83 Linux
/dev/mmcblk0p2 1605 5511 125023 83 Linux
/dev/mmcblk0p3 5512 6489 31296 83 Linux
/dev/mmcblk0p4 6490 16384 316640 83 Linux
Disk /dev/mmcblk1: 15.3 GB, 15388901376 bytes
4 heads, 16 sectors/track, 469632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/mmcblk1p1 1 469632 15028216 c Win95 FAT32 (LBA)
Being MMC rather than MTD devices, it ought to be possible to repartition to shuffle some space around, perhaps gaining as much as 50MB extra space for /data.
Additionally, for custom firmwares maybe even repartitioning mmcblk1 may be possible, to create an alternate partition to mount /data/ to.
Of course, for fear of ruining my 101 I have only used fdisk for read-only operations.
don't forget mmcblk2..
it's the external sdcard
Of course I was examining the internal flash storage of the device.
Having my 101 for just under 3 weeks I'm not quite brave enough to repartition mmcblk0, as it would be very difficult to recover an operational system if this were to not go as well as expected. :>
I'm hoping that someone with a little more insight or perhaps a little braver than I could chime in on the possibility.
why won't you repartition (shrink p1 and append other partitions) blk1? (8 / 16 GB storage)
don't touch blk0 when you don't have to
chulri said:
why won't you repartition (shrink p1 and append other partitions) blk1? (8 / 16 GB storage)
don't touch blk0 when you don't have to
Click to expand...
Click to collapse
This was of course my suggestion for alternate firmwares that can take advantage of this.
Moved to general as not android development

U8800 partition scheme.

In case this info is of use to someone...
Trying to understand what goes where,
Here is the partition table of a U8800:
#######################################
Disk /dev/sdb: 3959 MB, 3959422976 bytes
1 heads, 62 sectors/track, 124729 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 491520 245760 b W95 FAT32
/dev/sdb2 * 491521 492520 500 4d QNX4.x
/dev/sdb3 492521 498520 3000 46 Unknown
/dev/sdb4 498521 7733247 3617363+ 5 Extended
/dev/sdb5 524288 548863 12288 59 Unknown
/dev/sdb6 655360 921599 133120 4c Unknown
/dev/sdb7 1048576 1049575 500 5a Unknown
/dev/sdb8 1179648 1185791 3072 58 Unknown
/dev/sdb9 1310720 1324719 7000 50 OnTrack DM
/dev/sdb10 1441792 1447935 3072 4a Unknown
/dev/sdb11 1572864 1579007 3072 4b Unknown
/dev/sdb12 1703936 2154495 225280 83 Linux
/dev/sdb13 2228224 3457023 614400 83 Linux
/dev/sdb14 3538944 7733247 2097152 69 Unknown
#############################################
sdb1: This is the FAT32 partition that gets mounted when we boot into pink screen;
It holds, among other files, EMMCBOOT.MBN, which, if not present and as far as I've experimented, will get the phone straight into a blue screen and initiate a flash procedure if a 'dload' folder with a ROM is found in the sdcard. The contens of this partition are changed when a ROM is flashed.
sdb2: Is flagged as bootable, and holds an (so far) unknown filesystem (if any; could hold a raw binary image, for instance);
sdb3: Holds an unknown filesystem, if any. This partition is changed whenever you flash a ROM. dumping this partition back, from any 2.3BETA, to a 2.3 (B522) running phone, will get the USB pink screen mode working again, allowing acces to sdb1.
sdb5: holds an unknown filesystem if any; dumping this one back gets us the original "IDEOS" logo and, probably, whatever is needed to make previous CWM backups work again.
sdb6: ext3 filesystem with a directory called "recovery".
sdb7: Unknown filessytem, if any.
sdb8: Unknown filesystem, if any.
sdb9: Unknown filesystem, if any.
sdb10: Unknown filesystem, if any.
sdb11: Unknown filesystem, if any.
sdb12: ext3 filesystem; gets mounted at "/system".
sdb13: ext3 filesystem; gets mounted at "/data".
sdb14: vfat filesystem; represents the internal sdcard.
I'm trying to find out what needs to be restored in order to perform a clean, reliable downgrade. sdb5 is a must, but not the only one. I've flashed 2.2 and dumped it back right after. The result is an almost downgraded U8800. I say almost because charging the battery while the phone is off shows a different image (the one that comes with 2.3) and I can't power up the phone unless I take the cable out; this means there are still remnants of 2.3 somewhere...
UPDATE: Not being able to power up the phone was to due to the CWM recovery; restoring original recovery.img solved that one.

[Info] List of Samsung Galaxy S2 GT-I9100 devices and partitions

To run this commands you need a rooted device with BusyBox and parted. Using stock partition layout. You can change the partition layout to get more or less than 2GB of size for the data partition:
[MOD][GUIDE]Partition your internal memory for better App management (Pit Files)
List of devices by name:
[email protected]:/sdcard # ls -l /dev/block/platform/dw_mmc/by-name/
lrwxrwxrwx 1 root root 20 May 12 21:24 CACHE -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 21 May 12 21:24 DATAFS -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 May 12 21:24 EFS -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 May 12 21:24 FACTORYFS -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 May 12 21:24 HIDDEN -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 20 May 12 21:24 KERNEL -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 May 12 21:24 MODEM -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 20 May 12 21:24 PARAM -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 20 May 12 21:24 RECOVERY -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 20 May 12 21:24 SBL1 -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 May 12 21:24 SBL2 -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 May 12 21:24 UMS -> /dev/block/mmcblk0p11
Click to expand...
Click to collapse
List of fdisk for all given partitions:
Command (needs Superuser or equivalent and Busybox):
su
find /dev/block/platform/dw_mmc/ -name 'mmc*' -exec fdisk -l {} \; > /sdcard/list_of_sgs2_partitions.txt
Click to expand...
Click to collapse
Code:
Disk ./mmcblk0boot0: 0 MB, 524288 bytes
4 heads, 16 sectors/track, 16 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0boot0 doesn't contain a valid partition table
Disk ./mmcblk0boot1: 0 MB, 524288 bytes
4 heads, 16 sectors/track, 16 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0boot1 doesn't contain a valid partition table
Disk ./mmcblk0p12: 536 MB, 536870912 bytes
4 heads, 16 sectors/track, 16384 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p12 doesn't contain a valid partition table
Disk ./mmcblk0p11: 12.3 GB, 12356419584 bytes
4 heads, 16 sectors/track, 377088 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
./mmcblk0p11p4 1 1 0 0 Empty
Partition 4 does not end on cylinder boundary
Disk ./mmcblk0p10: 2147 MB, 2147483648 bytes
4 heads, 16 sectors/track, 65536 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p10 doesn't contain a valid partition table
Disk ./mmcblk0p9: 536 MB, 536870912 bytes
4 heads, 16 sectors/track, 16384 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p9 doesn't contain a valid partition table
Disk ./mmcblk0p8: 16 MB, 16777216 bytes
4 heads, 16 sectors/track, 512 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p8 doesn't contain a valid partition table
Disk ./mmcblk0p7: 104 MB, 104857600 bytes
4 heads, 16 sectors/track, 3200 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p7 doesn't contain a valid partition table
Disk ./mmcblk0p6: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p6 doesn't contain a valid partition table
Disk ./mmcblk0p5: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p5 doesn't contain a valid partition table
Disk ./mmcblk0p4: 8 MB, 8388608 bytes
4 heads, 16 sectors/track, 256 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p4 doesn't contain a valid partition table
Disk ./mmcblk0p3: 1 MB, 1310720 bytes
4 heads, 16 sectors/track, 40 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p3 doesn't contain a valid partition table
Disk ./mmcblk0p2: 1 MB, 1310720 bytes
4 heads, 16 sectors/track, 40 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p2 doesn't contain a valid partition table
Disk ./mmcblk0p1: 20 MB, 20971520 bytes
4 heads, 16 sectors/track, 640 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk ./mmcblk0p1 doesn't contain a valid partition table
Disk ./mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
./mmcblk0p1 1 1923456 15387647+ ee EFI GPT
Partition 1 does not end on cylinder boundary
Mounted filesystems:
Code:
[email protected]:/ # df
df
Filesystem Size Used Free Blksize
/dev 415M 32K 415M 4096
/mnt/asec 415M 0K 415M 4096
/mnt/obb 415M 0K 415M 4096
/system 503M 429M 74M 4096
/cache 98M 4M 94M 4096
/efs 19M 8M 11M 4096
/data 1G 666M 1G 4096
/mnt/.lfs: Function not implemented
/mnt/sdcard 11G 2G 9G 32768
/mnt/sdcard/external_sd 29G 24G 5G 32768
/mnt/sdcard/external_sd 29G 24G 5G 32768
temporal fstab:
Code:
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p9 on /system type ext4 (ro,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p1 on /efs type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p10 on /data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc)
/dev/block/mmcblk0p4 on /mnt/.lfs type j4fs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/vold/259:3 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/external_sd type tmpfs (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,size=0k,mode=755,gid=1000)
tmpfs on /mnt/sdcard/usbStorage type tmpfs (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,size=0k,mode=755,gid=1000)
/dev/block/vold/179:25 on /mnt/sdcard/external_sd type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:25 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/external_sd/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-0 on /mnt/asec/org.ais.archidroid-1 type vfat (ro,dirsync,nosuid,nodev,noatime,nodiratime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
AdamOutler said:
Hey guys. I'm doing some work to figure out how to recover Galaxy Nexus devices which are hard-bricked.. ie.. they have a bad or no bootloader installed.
the boot sequence
1. IROM - the Internal ROM which cannot be rewritten on the device. This loads the XLoader.
2. XLoader/MLO - This completes the initialization of the processor and memory, and loads up the relatively huge U-Boot ( Samsung modified this and calls it SBL)
3. UBoot/SBL - This "Bootloader" is almost a complete operating system. The U-Boot initializes the screen, provides Odin mode, Fastboot Mode as well as loading the kernel/recovery and provides a UART debugging mode (Yet to be unlocked).
4. Kernel - Once we reach this point, it's all clear.. the kernel is linux which loads android and all sorts of other things.
The Problem
People are bricking their devices at stage 2 and 3 of this boot sequence... This leaves them unable to boot Fastboot or Odin. The device is 100% interchangable with a brick. These devices are ending up hard bricked.
The solution
We must come up with a way to undo the hard brick. Here are some things i'm looking at to use the native hardware to recover itself.
When you plug in the device (when off), you will immediately notice a Texas Instruments D010 device gets enumerated. This is a debug mode for the processor.
Code:
Bus 001 Device 023: ID 0451:d010 Texas Instruments, Inc.
We've started looking at some bootloader output here: http://forum.xda-developers.com/showthread.php?t=1461986
You can find information about the OMAP4 bootloaders here: http://omapedia.org/wiki/Bootloader_Project
Help
I need help locating drivers to initialize the 0451:d010 device and make it readable from within Linux or Windows.. Generally Linux is easier to find appropriate drivers.
I could use some help collecting more reading materials and resources.
I think together as a community we can take care of this problem.
Click to expand...
Click to collapse
AdamOutler said:
There's more to the boot then the OP mentioned... there's 6 partitions involved, not 4.
irom = hard coded
IBL/PBL = initial bootloader and primitive bootloader
SBL = Secondadary Bootloader finds linux
param = contains paramaters to run the phone and required for boot.
SBL2 = download mode (included in SBL)
PIT = Partiton Information Table
Don't touch any of these files.
If you touch the param.ifs, the phone can still boot, however you will see a black screen if something goes wrong.
Code:
BOOT 00000000 0000 0003FFFF 0001
PIT 00040000 0001 0003FFFF 0001
EFS 00080000 0002 009FFFFF 0028
SBL 00A80000 002A 0013FFFF 0005
SBL2 00BC0000 002F 0013FFFF 0005
PARAM 00D00000 0034 004FFFFF 0014
KERNEL 01200000 0048 0077FFFF 001E
RECOVERY 01980000 0066 0077FFFF 001E
FACTORYFS 02100000 0084 11E7FFFF 047A
DBDATAFS 13F80000 04FE 085FFFFF 0218
CACHE 1C580000 0716 022FFFFF 008C
MODEM 1E880000 07A2 00C7FFFF 0032
07D4 1F500000
Click to expand...
Click to collapse
Aditional links:
* Definitive guide to Bricking *
[Guide] Types of Android backups
[REF] GT-I9100 PIT v Flash Analysis
[GUIDE] ROOT/UNROOT Stock ICS Firmware without flashing unsecure kernel
[GUIDE] Making Dump Files Out of Android Device Partitions
/sdcard
This is nice, thank.
But where is from block device the sdcard. How working the "vold"?
How can I partition sdcard with fdisk or with parted?
gyurman said:
This is nice, thank.
But where is from block device the sdcard. How working the "vold"?
How can I partition sdcard with fdisk or with parted?
Click to expand...
Click to collapse
Partition the sdcard from clockworkmod recovery
Thanks, but I want use parted, or fdisk. But what mmcblk0? use sdcard? mmcblk0p11?

How to resize a partition table ?

I'm trying to fix my messed up partition table in my Meizu 5 PRO for Ubuntu Touch installation.
Using ADB and fdisk I've managed to get this print out:
Code:
~ # fdisk /dev/block/sda
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT
Command (m for help): p
Disk /dev/block/sda: 122142720 sectors, 1984M
Logical sector size: 4096
Disk identifier (GUID): 00042021-0408-4601-9dcc-a8c51255994f
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 15267834
Number Start (sector) End (sector) Size Code Name
1 1024 1279 1024K 0700 private
2 1280 1343 256K 0700 proinfo
3 1344 1407 256K 0700 misc
21 2048 3071 4096K 0700 param
22 3072 5119 8192K 0700 efs
23 5120 5631 2048K 0700 pnv
24 5632 6655 4096K 0700 ldfw
25 6656 7679 4096K 0700 dtb
26 7680 13823 24.0M 0700 bootimg
27 13824 22015 32.0M 0700 recovery
28 22016 30207 32.0M 0700 bootlogo
29 30208 35327 20.0M 0700 rstinfo
30 35328 40447 20.0M 0700 mnv
31 40448 45567 20.0M 0700 reserved1
32 45568 50687 20.0M 0700 reserved2
33 50688 55807 20.0M 0700 reserved3
41 65536 720895 2560M 0700 system
42 720896 851967 512M 0700 custom
43 851968 15267834 [B]54.9G 0700 cache[/B]
44 55808 65535 [B]38.0M 0700 userdata[/B]
I bolded partitions in question. Cache is taking up all the storage whereas "userdata" gets only 38MB. I need to resize "userdata" partition to take up most of the storage and leave about 2 GB for cache. I noticed cache partition is formatted in ext4 and "userdata" is vfat.
option "d" selects partition 1 for some reason.
after running
Code:
disk /dev/block/sda43
(which is the partition with 60GB) I get:
Code:
Command (m for help): p
Disk /dev/block/sda43: 59.0 GB, 59047391232 bytes
64 heads, 32 sectors/track, 7038 cylinders
Units = cylinders of 2048 * 4096 = 8388608 bytes
Device Boot Start End Blocks Id System
Someone more experienced, can you guide me ? I don't wanna mess it up more than it is.
Thank you in advance.
Update:
Have learned that the best tool for resizing a filesystem is resize2fs thus I ran:
Code:
~ # resize2fs /dev/block/sda43 1G
However even after resizing the filesystem to 1GB I still get:
Code:
43 851968 15267834 [B]54.9G 0700 cache[/B]
Shouldn't it be reading 1GB now ???
Oh boy. Maybe parts of this guide could help you:
https://forum.xda-developers.com/meizu-pro-5/how-to/tutorial-how-to-upgrade-to-ubuntu-touch-t4021397
You *need* the correct fdisk version for this, as stated in the guide.
Do not just copy the bold parts. Sectors for your current table are below the next code box):
Code:
Command (m for help): d
Partition number (1-3,21-33,43,44, default 44): 43
Partition 43 has been deleted
Command (m for help): d
Partition number (1-3,21-33,44, default 44): 44
Partition 44 has been deleted.
Command (m for help): n
Partition number (4-20,34-40,43-128, default 4): 43
First sector (6-15267834, default 1769472): [B]1769472[/B]
Last sector, +sectors or +size{K,M,G,T,P} (1769472-15267834, default 15267834): [B]2293775[/B]
Created a new partition 43 of type 'Linux filesystem' and of size 2 GiB.
Command (m for help): n
Partition number (4-20,34-40,44-128, default 4): 44
First sector (6-15267834, default 2294016): [B]2293776[/B]
Last sector, +sectors or +size{K,M,G,T,P} (2293776-15267834, default 15267834): [B]15267824[/B]
Created a new partition 44 of type 'Linux filesystem' and of size 49.5 GiB.
When creating partition 43 sector should be first 851969 - last 1376271 for 2GB cache
and for partition 44 first 1376272 - last 15267824 to assign the remaining space to userdata.
Next change the partition types to "Microsoft basic data"
Code:
Command (m for help): t
Partition number (1-3,21-33,41-44, default 44): 43
Partition type (type L to list all types): 11
Changed type of partition 'Linux filesystem' to 'Microsoft basic data'.
Command (m for help): t
Partition number (1-3,21-33,41-44, default 44): 44
Partition type (type L to list all types): 11
Changed type of partition 'Linux filesystem' to 'Microsoft basic data'.
Check again with "p", if the types are correct. If not, search correct type number with "t" and "L" and try again.
Afterwards, you need to continue to give the partitions names:
Code:
Command (m for help): x
Expert command (m for help): n
Partition number (1-3,21-33,41-44, default 44): 43
New name: cache
Partition number (1-3,21-33,41-44, default 44): 44
New name: userdata
Expert command (m for help): r
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
If the table has been successfully altered, you can now continue to install the filesystem:
Code:
~ # mke2fs -t ext4 -m 0 /dev/block/sda43
~ # mke2fs -t ext4 -m 0 /dev/block/sda44
This should fix your current dilemma. Its a lengthy guide and if you actually want the most recent ubuntu touch you might as well do it completely, resizing your system partition too. In that case ignore above changes.

Categories

Resources