Behold... a long awaited partitioning guide
WARNING! This GUIDE is to actually learn something not just to copy/paste commands!
Requirements
rooted phone
busybox installed
parted (optional)
backup your SD card (optional)
calculator
Click to expand...
Click to collapse
Background
Before we begin partitioning, we need to elaborate some key points:
block storage units are divided into logical blocks known as sectors
sector has a size of 512 bytes
NAND flash chips are divided into blocks known as erase blocks
our SD cards consist of those NAND flash chips and controller
erase block on our SD cards has a size of 128 kB, that's 256 sectors
CHS (cylinder, head, sector) alignment has an insignificant importance here
1st sector is sector 0 (not 1) and is used as MBR (master boot record)
1st partition begins at cylinder boundary to maintain MS-DOS compatibility
raw access to block storage units is done via special block device files under /dev/block directory
our SD card is represented by block device file /dev/block/mmcblk0
Click to expand...
Click to collapse
Instructions
Here I will provide you with two methods of partitioning. For 1st method you will be using fdisk utility which is part of busybox and for 2nd a standalone utility called parted will be used. Both methods can be used in normal mode via adb shell or some terminal app. I will explain both methods using adb shell as it is more convenient and handy than typing commands via touch keyboard on your phone.
1st thing to do before you begin is to unmount your SD card via "Settings->SD & phone storage" and then you issue "adb shell" command ony your PC. 2nd thing you will do is erasing of your SD card (actually you will erase just first few erase blocks of your SD card) using dd utility:
Code:
dd if=/dev/zero of=/dev/block/mmcblk0 bs=131072 count=16
...that will overwrite 1st 2 MB of your SD card with null characters. Next you may begin with partitioning.
fdisk
As I already stated, fdisk is a (interactive) utility that is part of busybox so I will assume it is available under /system/xbin directory. Now you can run fdisk with device file of your SD card as parameter/argument:
Code:
fdisk /dev/block/mmcblk0
...this will bring you some notes on your screen you should not worry about and a command prompt:
Code:
Command (m for help):
...which you can leave at any time by pressing CTRL+C. Next you will change unit display type to sectors:
Code:
Command (m for help): [B]u[/B]
Changing display/entry units to sectors
...and print your SD's current info (this is info of my SD card actually, yours may vary):
Code:
Command (m for help): [B]p[/B]
Disk /dev/block/mmcblk0: 8018 MB, 8018460672 bytes
4 heads, 16 sectors/track, 244704 cylinders, total 15661056 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
...and you write down the number of sectors. In my case it is 15661056 sectors of 512 bytes which is exactly 7647 MB if we divide them by 2048. For example you would take 7000 MB for fat32 1st partition and 647 MB for ext 2nd partition. and it is handy that way coz megabytes are divisible by our SD card's erase block size which is 128 kB as stated before. Calculation would give you start sector for 2nd partition and this would be 14336000 (7000*2048).
Now you need to create 2 primary partitions:
Code:
Command (m for help): [B]n[/B]
Command action
e extended
p primary partition (1-4)
[B]p[/B]
Partition number (1-4): [B]1[/B]
...now there's a catch. You will be offeread a start of 1st partition at 1st to 2nd cylinder boundary which is sector 16 in my case and you push it to SD card's erase block boundary (256):
Code:
First sector (16-15661055, default 16): [B]256[/B]
Last sector or +size or +sizeM or +sizeK (256-15661055, default 15661055): [B]14335999[/B]
...and continue to the next partition which should also be primary:
Code:
Command (m for help): [B]n[/B]
Command action
e extended
p primary partition (1-4)
[B]p[/B]
Partition number (1-4): [B]2[/B]
First sector (16-15661055, default 16): [B]14336000[/B]
Last sector or +size or +sizeM or +sizeK (14336000-15661055, default 15661055): [B]15661055[/B]
...now print what you have just done:
Code:
Command (m for help): [B]p[/B]
Disk /dev/block/mmcblk0: 8018 MB, 8018460672 bytes
4 heads, 16 sectors/track, 244704 cylinders, total 15661056 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 256 14335999 7167872 83 Linux
/dev/block/mmcblk0p2 14336000 15661055 662528 83 Linux
...it looks OK but you need to change 1st partition's hex id which needs to be fat32 (c):
Code:
Command (m for help): [B]t[/B]
Partition number (1-4): [B]1[/B]
Hex code (type L to list codes): [B]c[/B]
Changed system type of partition 1 to c (Win95 FAT32 (LBA))
...now you're am set, print again your configuration and write changes to SD card:
Code:
Command (m for help): [B]p[/B]
Disk /dev/block/mmcblk0: 8018 MB, 8018460672 bytes
4 heads, 16 sectors/track, 244704 cylinders, total 15661056 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 256 14335999 7167872 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 14336000 15661055 662528 83 Linux
Command (m for help): [B]w[/B]
The partition table has been altered!
There's a possibility you would need to shutdown and power on again your phone at this point. Do not reboot via adb or some 3rd party app!
Click to expand...
Click to collapse
parted
Parted is one of interactive partitioning utilities that can also use external formatting utilities. It can be found in some recovery images but can be copied to your internal phone storage and run from there in normal mode too. To run it you have to use your SD card's device file as a parameter/argument:
Code:
parted /dev/block/mmcblk0
...and you will be presented with an interactive shell:
Code:
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)
I probably shouldn't mention that there's an interactive help available and that it is invoked by issuing "help" into shell's command prompt. Next thing to do is making a MS-DOS disklabel:
Code:
(parted) [B]mklabel msdos[/B]
...and switch to display sector as a unit:
Code:
(parted) [B]unit s[/B]
Now you can print some useful info:
Code:
(parted) [B]print all[/B]
Model: SD USD (sd/mmc)
Disk /dev/block/mmcblk0: 15661056s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
Mind and write down the size in sectors (15661056 in my case).If you divide number of sectors by 2048, you get how big in MB is actually your SD card (7647 in my case).You should mind that erase block of your SD card is 128 kB and all of your partitions should start at the beginnings of those erase blocks. It is safe to say that 1st partition should begin at sector 256 and 2nd at any MB boundary. Let say you want 512 MB big ext partition and the rest for fat32 one. Mind tho that 1st partition is to be fat32! So we say 7135 MB for fat32 1st partition and 512 MB for ext 2nd partition. Now you calculate the start sector of 2nd partition... number of MB for 1st partition multiplied by 2048 should give you the number (14612480). And you are set for partitioning:
Code:
(parted) [B]mkpart primary fat32 256 14612479[/B]
(parted) [B]mkpart primary ext2 14612480 15661055[/B]
...and print result:
Code:
(parted) [B]print all[/B]
Model: SD USD (sd/mmc)
Disk /dev/block/mmcblk0: 15661056s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 256s 14612479s 14612224s primary fat32 lba
2 14612480s 15661055s 1048576s primary ext2
...and quit:
Code:
(parted) [B]quit[/B]
Click to expand...
Click to collapse
At this point you have partitioned your SD card but not yet formatted it. Format fat32 partition with mkfs.vfat and ext partition with mkfs.ext2:
Code:
mkfs.vfat /dev/block/mmcblk0p1
...and:
Code:
mkfs.ext2 -m0 -b4096 /dev/block/mmcblk0p2
If there is a mke2fs utility on your phone system (standalone - not part of busybox), you may use it to format second partition as ext3:
Code:
mke2fs -j -m0 -b4096 /dev/block/mmcblk0p2
...or even as ext4 (if your mke2fs supports that):
Code:
mke2fs -j -m0 -b4096 -Oextents,uninit_bg,dir_index /dev/block/mmcblk0p2
Click to expand...
Click to collapse
Blayo,
thanks for the post. You always manage to take things to an entirely different level of understanding
Is this guide for the successful implementation of the latest data2ext scripts in roms ? in comparison to methods like the Rom Manager and partition through recovery ?
No, it is general guide to better understand partitioning etc.
BlaY0 said:
No, it is general guide to better understand partitioning etc.
Click to expand...
Click to collapse
I totally agree! After going through parted I think it's the best way to partition your SD, you have complete control!
I can't wait will my new SD card arrives, and give this a shot!
The Kingston 16GB class 10 sucks even when set-up to the best parameters and the reason for that is simple: Although class 10, it is like 4 times slower than my 8GD sandisk mobile ultra Class 4 when random writing and 3 times slower when reading...
So Thanks BlaY0 for this cool guide/lesson
I have problem with fdisk . when i press p i got this info and there a no sector:
PHP:
Command (m for help): p
p
Disk /dev/block/mmcblk0: 16.0 GB, 16001269760
4 heads, 16 sectors/track, 488320 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Did you change units display to sectors?
Thanks, with the "u" option comes later in your manual
A last newbie question: i have now 2 part. and formated the FAT, but i dont know, how to get the "mke2fs" on the phone to format the Linux part.?
Sorry Blay0 but Linux is another Word for me...
tasar said:
Thanks, with the "u" option comes later in your manual
Click to expand...
Click to collapse
Thanx, I have changed that.
A last newbie question: i have now 2 part. and formated the FAT, but i dont know, how to get the "mke2fs" on the phone to format the Linux part.?
Sorry Blay0 but Linux is another Word for me...
Click to expand...
Click to collapse
If you have busybox on your phone you also have mke2fs or mkfs.ext2 as these two are part of it. If you have CM based ROM there should already be standalone e2fsprogs in /system/bin directory and if you have a stock based one, you can find mke2fs_recvy + e2fsck_recvy in /system/bin directory. In B ROM you have all e2fsprogs available in /system/xbin directory.
Many thanks!!! Now i install your 0.5
Code:
# mkfs.vfat /dev/block/mmcblk0p1
mkfs.vfat /dev/block/mmcblk0p1
mkfs.vfat: not found
help?
Try "busybox mkfs.vfat"...
BlaY0 said:
Try "busybox mkfs.vfat"...
Click to expand...
Click to collapse
Code:
# busybox mkfs.vfat /dev/block/mmcblk0p1
busybox mkfs.vfat /dev/block/mmcblk0p1
mkfs.vfat: applet not found
its ok, before you replied i tried doing it in recovery and i believe it worked, but i think i missed a digit in my partitioning and it was only 98mb for my fat drive instead of about 988 or something (1gb) so ill try it again and let you know
EDIT: ok yeah i had the digits wrong so now its formatted/partitioned correctly. now im gonna apply the data2ext thing and see what happens. i didnt actually do anything about my darktremor a2sd so ive probably got bits and pieces of all my apps missing but if **** starts to screw up ill just put a fresh copy of cm on since ive ruined all my apps basically already
EDIT: alright its working, thanks heaps!
DT has some commands to disable itself.
As for mkfs.vfat... it is part of busybox but not necesarily. There are several versions lying around the internets. Type just "busybox" and you'll see all the utils available in it.
BlaY0 said:
DT has some commands to disable itself.
As for mkfs.vfat... it is part of busybox but not necesarily. There are several versions lying around the internets. Type just "busybox" and you'll see all the utils available in it.
Click to expand...
Click to collapse
Code:
# busybox
busybox
BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, arp, ash, awk, basename, bbconfig, brctl, bunzip2, bzcat, bzip2,
cal, cat, catv, chgrp, chmod, chown, chroot, cksum, clear, cmp, cp,
cpio, cut, date, dc, dd, depmod, devmem, df, diff, dirname, dmesg,
dnsd, dos2unix, du, echo, ed, egrep, env, expr, false, fdisk, fgrep,
find, fold, free, freeramdisk, fuser, getopt, grep, gunzip, gzip, head,
hexdump, id, ifconfig, insmod, install, ip, kill, killall, killall5,
length, less, ln, losetup, ls, lsmod, lspci, lsusb, lzop, lzopcat,
md5sum, mkdir, mke2fs, mkfifo, mkfs.ext2, mknod, mkswap, mktemp,
modprobe, more, mount, mountpoint, mv, nc, netstat, nice, nohup,
nslookup, ntpd, od, patch, pgrep, pidof, ping, pkill, printenv, printf,
ps, pwd, rdev, readlink, realpath, renice, reset, rm, rmdir, rmmod,
route, run-parts, sed, seq, setsid, sh, sha1sum, sha256sum, sha512sum,
sleep, sort, split, stat, strings, stty, swapoff, swapon, sync, sysctl,
tac, tail, tar, tee, telnet, test, tftp, time, top, touch, tr,
traceroute, true, tty, tune2fs, umount, uname, uniq, unix2dos, unlzop,
unzip, uptime, usleep, uudecode, uuencode, vi, watch, wc, wget, which,
whoami, xargs, yes, zcat
yeah so that mkfs.vfat isnt there and neither is parted
and then when i go to android recovery
Code:
# busybox
busybox
BusyBox v1.15.3 (2010-02-06 17:13:19 CET) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, arping, ash, awk, basename, bbconfig, bunzip2, bzcat, bzip2,
cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum,
clear, cmp, cp, crond, crontab, cut, date, dc, dd, deallocvt, depmod,
devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname,
dos2unix, du, dumpkmap, dumpleases, echo, egrep, env, ether-wake, expr,
false, fbset, fbsplash, fdisk, fgrep, find, fold, free, freeramdisk,
fsck, fuser, getopt, grep, gunzip, gzip, head, hexdump, hostname,
hwclock, ifconfig, ifdown, ifup, insmod, install, ip, ipaddr, ipcalc,
iplink, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5,
last, length, less, ln, loadfont, loadkmap, losetup, ls, lsattr, lsmod,
makedevs, md5sum, mdev, mkdir, mkdosfs, mkfifo, mkfs.vfat, mknod,
mkswap, mktemp, modprobe, more, mount, mountpoint, mv, nameif, nc,
netstat, nice, nmeter, nohup, nslookup, od, openvt, patch, pidof, ping,
pipe_progress, pivot_root, printenv, printf, ps, pscan, pwd, rdate,
rdev, readlink, readprofile, realpath, renice, reset, resize, rm,
rmdir, rmmod, route, run-parts, sed, seq, setconsole, setkeycodes,
setlogcons, setsid, sh, sha1sum, showkey, sleep, sort, split, stat,
strings, stty, sum, swapoff, swapon, switch_root, sync, sysctl, tac,
tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, time, top, touch,
tr, traceroute, true, tty, tunctl, udhcpd, udpsvd, umount, uname,
uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode,
vconfig, vi, watch, wc, wget, which, who, whoami, xargs, yes, zcat
and boom, a lot more stuff is there (except parted.. but it works anyways, and mkfs.ext2 is missing, and doesnt work). it should be okay to do everything in recovery anyways right? and i can just use mke2fs -m0 -b4096 /dev/block/mmcblk0p2 to format the ext2 partition?
EDIT: just tried the parted method and i dont think it works, i get this
Code:
(parted) mkpart primary fat32 256 2813951
mkpart primary fat32 256 2813951
mkpart primary fat32 256 2813951
(parted) mkpart primary ext2 2813952 3862527
mkpart primary ext2 2813952 3862527
mkpart primary ext2 2813952 3862527
(parted) print all
print all
print all
Model: SD SU02G (sd/mmc)
Disk /dev/block/mmcblk0: 3862528s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 256s 2813951s 2813696s primary lba
2 2813952s 3862527s 1048576s primary
anyways i used the first method and its fine, although the partitioning isnt spot on accurate, i just put on data2ext for cm6 and my available space is 504mb instead of 512mb and i checked all my calculations and everything, ah well close enough. thanks again!
It looks OK.
Sent from my HTC Legend
Need some help.
There's a possibility you would need to shutdown and power on again your phone at this point.
Click to expand...
Click to collapse
Possibility?
I got this:
Code:
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7973 MB, 7973371904 bytes
4 heads, 16 sectors/track, 243328 cylinders, total 15572992 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 256 13475839 6737792 c Win95 FAT32 (LBA)
/dev/block/mmcblk0p2 13475840 15572991 1048576 83 Linux
Then i got
Code:
Command (m for help): mkfs.vfat /dev/block/mmcblk0p1
mkfs.vfat /dev/block/mmcblk0p1
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
The same with the mkfs.ext2 -m0 -b4096 /dev/block/mmcblk0p2
And now the phone says than my flash is empty or uses wrong format, dont want to mount it and want to format it. I press cancel.
if i make p again it shows:
Code:
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7973 MB, 7973371904 bytes
4 heads, 16 sectors/track, 243328 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
What is my mistake?
UPD: Seems like it worked with the parted
Spoiler
Code:
C:\androidsdk\platform-tools>adb shell
adb server is out of date. killing...
* daemon started successfully *
# dd if=/dev/zero of=/dev/block/mmcblk0 bs=131072 count=16
dd if=/dev/zero of=/dev/block/mmcblk0 bs=131072 count=16
16+0 records in
16+0 records out
2097152 bytes transferred in 0.568 secs (3692169 bytes/sec)
# 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) mklabel msdos
mklabel msdos
mklabel msdos
(parted) unit s
unit s
unit s
(parted) print all
print all
print all
Model: SD SA08G (sd/mmc)
Disk /dev/block/mmcblk0: 15572992s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
(parted) mkpart primary fat32 256 13475839
mkpart primary fat32 256 13475839
mkpart primary fat32 256 13475839
(parted) mkpart primary ext2 13475840 15572992
mkpart primary ext2 13475840 15572992
mkpart primary ext2 13475840 15572992
Error: The location 15572992 is outside of the device /dev/block/mmcblk0.
(parted) mkpart primary ext2 13475840 15572991
mkpart primary ext2 13475840 15572991
mkpart primary ext2 13475840 15572991
(parted) print all
print all
print all
Model: SD SA08G (sd/mmc)
Disk /dev/block/mmcblk0: 15572992s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 256s 13475839s 13475584s primary lba
2 13475840s 15572991s 2097152s primary
(parted) quit
quit
quit
Information: You may need to update /etc/fstab.
# mkfs.vfat /dev/block/mmcblk0p1
mkfs.vfat /dev/block/mmcblk0p1
# mkfs.ext2 -m0 -b4096 /dev/block/mmcblk0p2
mkfs.ext2 -m0 -b4096 /dev/block/mmcblk0p2
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
65536 inodes, 262144 blocks
0 blocks (0%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
playahate said:
Need some help.
Code:
Command (m for help): p
p
Disk /dev/block/mmcblk0: 7973 MB, 7973371904 bytes
4 heads, 16 sectors/track, 243328 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
What is my mistake?
Click to expand...
Click to collapse
I got this too... seems I forgot to enter the "w" command to write the partitions.
Absolutely. You neet to write the partition table exiting fdisk. And you can't execute mkfs.vfat and mke2fs inside fdisk shell! It's the same as you would try to microwave your sandwich in the fridge... it won't work that way...
agrrrrr. didnt see the next line with the w.
anyway i made it by parted. very good guide, very good rom =)
lil question: can i make ext3 or ext4 at any time? (after using data2ext).will it work correctly or wipe all data? or just when i make partitionong?
Yes. Just search the interwebs on how to convert ext2 -> ext3 -> ext4...
Hello All,
just a silly question in my mind .. why do SGS GT-i9000 has 2GB dedicated ROM ?
i mean whats the purpose or function of it ? can any1 please explain and eleborate in detail ?
all the other phones have storage , RAM and CPU .. only this phone has 2GB ROM which i didnt see in any other phone why?
It has been reserved to install game and apps.
Sent from my GT-I9000 using XDA App
can we reduce this size. 1gb to rom & 15gb to sdcard.
Users with Ideos X5 do it.
Anyone know linux commands, may you see script below.
fdisk /dev/block/mmcblk0
d
1
d
2
n
5
1708032
n
1708033
1953792
t
2
b
w
mke2fs "-F", "-j", "-b4096", "-m0", "/dev/block/mmcblk0p2 (what is -j flag ?)
mkfs.vfat "-v", "-n", "SDCard, "/dev/block/mmcblk0p1"
is it work?
Thats my partition table.
Moderator pls dnt merge posts I need get access to devs topic. Thank you.
~ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 169004 32 168972 0% /dev
/dev/block/mtdblock3 81920 2388 79532 3% /cache
/dev/block/mmcblk0p2 1935192 291380 1643812 15% /data
/dev/block/mmcblk0p1 13660864 11975456 1685408 88% /sdcard
/dev/block/mtdblock2 192000 131920 60080 69% /system
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 16.0 GB, 16005464064 bytes
1 heads, 16 sectors/track, 1953792 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 5 1708032 13664224 c Win95 FAT32 (LB
A)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 1708033 1953792 1966080 c Win95 FAT32 (LB
A)
Partition 2 does not end on cylinder boundary
~ # fdisk -l /dev/block/mmcblk0p1
fdisk -l /dev/block/mmcblk0p1
Disk /dev/block/mmcblk0p1: 13.9 GB, 13992165376 bytes
4 heads, 16 sectors/track, 427007 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
~ # fdisk -l /dev/block/mmcblk0p2
fdisk -l /dev/block/mmcblk0p2
Disk /dev/block/mmcblk0p2: 2013 MB, 2013265920 bytes
4 heads, 16 sectors/track, 61440 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p2 doesn't contain a valid partition table
~ #
I try create custom partition size for my phone i897
With Simplistian help I can get partition Info of my phone
#df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 169004 32 168972 0% /dev
/dev/block/mtdblock3 81920 2388 79532 3% /cache
/dev/block/mmcblk0p2 1935192 291380 1643812 15% /data
/dev/block/mmcblk0p1 13660864 11975456 1685408 88% /sdcard
/dev/block/mtdblock2 192000 131920 60080 69% /system
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 16.0 GB, 16005464064 bytes
1 heads, 16 sectors/track, 1953792 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 5 1708032 13664224 c Win95 FAT32 (LB
A)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 1708033 1953792 1966080 c Win95 FAT32 (LB
A)
Partition 2 does not end on cylinder boundary
~ # fdisk -l /dev/block/mmcblk0p1
fdisk -l /dev/block/mmcblk0p1
Disk /dev/block/mmcblk0p1: 13.9 GB, 13992165376 bytes
4 heads, 16 sectors/track, 427007 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
~ # fdisk -l /dev/block/mmcblk0p2
fdisk -l /dev/block/mmcblk0p2
Disk /dev/block/mmcblk0p2: 2013 MB, 2013265920 bytes
4 heads, 16 sectors/track, 61440 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0p2 doesn't contain a valid partition table
androiderrr said:
It has been reserved to install game and apps.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
but why ? whats the cause behind it ?
phones that dont have dedicated and assigned ROMs can also have games and apps ... for e.g. SGS 2 doesnt has dedicated ROM it only has 1GB RAM and Dual core 1.2Ghz cpu but we still install apps and games into it .. which means they are stored directly to SD card or Internal memory of phone ..
but I havent gone through any solid answer from anyone that why 2GB dedicated ROM given to SGS GT i9000 ?
does that mean we can only install apps games etc upto 2GB volume on our SGS i9000 ? not more then that ?
Yeah we can install games and apps only upto 2GB.But thats more than sufficient.Dont u think so?Even one day if u run out of space u can install as many apps as u wish on extranal SD card.
Sent from my GT-I9000 using XDA App
androiderrr said:
Yeah we can install games and apps only upto 2GB.But thats more than sufficient.Dont u think so?Even one day if u run out of space u can install as many apps as u wish on extranal SD card.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
so that means other androids like SGS 2 etc , apps and games are installed directly into phone's internal storage ( internal SD card ? ) plus with that we can choose the option to install apps and games to external storage ( external sd card ) as well ?
1 more question .. does it really makes any difference to install apps or games into phones internal ROM or external sd card ?
what i mean is does this makes any impact on performance or on anything ?
salmanghiyas said:
so that means other androids like SGS 2 etc , apps and games are installed directly into phone's internal storage ( internal SD card ? ) plus with that we can choose the option to install apps and games to external storage ( external sd card ) as well ?
Even with galaxy s you have option to install apps wherever u like internal memory(you have 2GB for that) and on external sd card
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
salmanghiyas said:
1 more question .. does it really makes any difference to install apps or games into phones internal ROM or external sd card ?
what i mean is does this makes any impact on performance or on anything ?
Click to expand...
Click to collapse
Hardly any noticible difference on performance..
Sent from my GT-I9000 using XDA App
androiderrr said:
Hardly any noticible difference on performance..
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
TQVM androiderrr
salmanghiyas said:
Hello All,
just a silly question in my mind .. why do SGS GT-i9000 has 2GB dedicated ROM ?
i mean whats the purpose or function of it ? can any1 please explain and eleborate in detail ?
all the other phones have storage , RAM and CPU .. only this phone has 2GB ROM which i didnt see in any other phone why?
Click to expand...
Click to collapse
When the SGS was first released, we didn't have the possibility of loading apps to SD card, this only came with the later releases of Android.
The phone being released with 2GB was one of the things that made it the best phone at that time.
Hello everybody. I am facing INTERNAL SD CORRUPTION problem and hope this is the right thread where to post as many such articles have been found here.
When I try to format internal SD card via Windows (no Quick mode), repartition via adb, format via CWM, delete internal SD card via rm –rf, it does not work. File seems to be deleted until next mount of /sdcard or reflash.
I have tried many ROMs including PIT 512 file to reflash via Odin 1.3 or 1.85. Some of them stucked, some let me boot into Android but had problems with crashing applications.
JVU-RE, Ficeto JVB, Darky ROM 10.2 RE, ROMS with XWJVH/XXJVO/NEEJV3; XXJP2/XXJP2/OXAJP2; XXJVU/XXJVU/OXAJVU
I have been searching and trying for nearly a week. Would buy beers/whiskeys to the ONE who can help me to solve that. Thanks a lot for any valuable hint how to correct that.
FDISK
~ # fdisk -l /dev/block/mmcblk0p1
Disk /dev/block/mmcblk0p1: 6056 MB, 6056542208 bytes
4 heads, 16 sectors/track, 184831 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
~ # fdisk -l /dev/block/mmcblk0p2
Disk /dev/block/mmcblk0p2: 2013 MB, 2013265920 bytes
4 heads, 16 sectors/track, 61440 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
FSTAB
~ # more /etc/fstab
/dev/block/stl11 /cache rfs rw
/dev/block/mmcblk0p2 /data rfs rw
/dev/block/stl10 /datadata rfs rw
/dev/block/stl9 /system rfs rw
/dev/block/mmcblk0p1 /sdcard vfat rw
MOUNT
~ # mount
rootfs on / type rootfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,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)
/dev/block/stl6 on /mnt/.lfs type j4fs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/block/stl3 on /efs type rfs (rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
DEV/BLOCK DIR
/dev/block # ls
bml0!c bml7 loop7 ram13 ram9 stl7 tfsr4
bml1 bml8 mmcblk0 ram14 stl1 stl8 tfsr5
bml10 bml9 mmcblk0p1 ram15 stl10 stl9 tfsr6
bml11 loop0 mmcblk0p2 ram2 stl11 tfsr0!c tfsr7
bml12 loop1 platform ram3 stl12 tfsr1 tfsr8
bml2 loop2 ram0 ram4 stl2 tfsr10 tfsr9
bml3 loop3 ram1 ram5 stl3 tfsr11
bml4 loop4 ram10 ram6 stl4 tfsr12
bml5 loop5 ram11 ram7 stl5 tfsr2
bml6 loop6 ram12 ram8 stl6 tfsr3
/dev/block # ls –l | grep mmcblk
brw------- 1 root root 179, 0 Apr 29 12:04 mmcblk0
brw------- 1 root root 179, 1 Apr 29 12:17 mmcblk0p1
brw------- 1 root root 179, 2 Apr 29 12:00 mmcblk0p2
PARTITIONING
/dev/block # parted mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
(parted) print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 8070MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 6057MB 6057MB primary fat32 lba
2 6057MB 8070MB 2013MB primary lba
(parted) rm 2
rm 2
rm 2
(parted) rm 1
rm 1
rm 1
(parted) print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 8070MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 6057MB 6057MB primary fat32 lba
2 6057MB 8070MB 2013MB primary lba
(parted) mkfs
mkfs
mkfs
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
Yes/No? Yes
Yes
Yes
Partition number? 1
1
1
File system type? [ext2]? ext2
ext2
ext2
Error: Invalid superblock. Are you sure this is an ext2 file system?
Error: SEGV_MAPERR (Address not mapped to object)
Aborted
DMESG
/system/csc # dmesg
dmesg
S + ADB (Debugging mode)
<4>[ 58.641985] [composite_switch_work]config=0xc0d70b50
<3>[ 106.982404] FAT: Unrecognized mount option "check=no" or missing value
<3>[ 108.002658] FAT: Unrecognized mount option "check=no" or missing value
<3>[ 108.876726] FAT: Unrecognized mount option "check=no" or missing value
<4>[ 114.816057] [BIF: ] FSR VERSION: FSR_1.2.1p1_b139_RTM
<4>[ 114.816079] [BIF: ] FSR_BML_Open(nVol:0, nFlag:0x0, nOpenCnt:6) / 1171 line
<4>[ 114.816118] [SIF:INF] ===> STL Clst[ 3] Scan Root Info
<4>[ 114.816710] [SIF:INF] ===> STL Zone[ 3, 0] Open Zone Meta
<4>[ 114.818579] [SIF:INF] Latest Header Index ( 8) Vbn ( 10)
<4>[ 114.819247] [SIF:INF] Latest Header Clean Page Offset ( 5)
<4>[ 114.819257] [SIF:INF] POR write timer : 0x6
<4>[ 114.819519] [SIF:INF] Latest Context BlockIdx ( 8) Offset ( 4) Vpn ( 644)
<4>[ 114.819657] [SIF:INF] Number of Free Block ( 22)
<4>[ 114.819665] [SIF:INF] Active Log List : Num ( 0)
<4>[ 114.819676] [SIF:INF] ===> STL Zone[ 3, 0] Open Zone Post
<4>[ 114.819686] [SIF:INF] ===> STL Zone[ 3, 0] Validity check
<4>[ 114.819706] [SIF:INF] Partition [0, 23] open is success
<3>[ 116.209628] FAT: Unrecognized mount option "check=no" or missing value
<3>[ 144.052742] FAT: Unrecognized mount option "check=no" or missing value
<4>[ 182.622852] [BIF: ] FSR_BML_Close(nVol: 0, nFlag: 0x0, nOpenCnt: 5)
<4>[ 183.623957] [SIF:INF] INACTIVATED LOG BLOCKS nDgn( 4) nVbn( 95) nCPOffs( 33)
<4>[ 183.627334] [SIF:INF] INACTIVATED LOG BLOCKS nDgn( 0) nVbn( 96) nCPOffs( 3)
<4>[ 183.627851] [SIF:OUT] --FSR_STL_FlushAllMetaInfo()
<4>[ 183.627880] [BIF: ] FSR_BML_Close(nVol: 0, nFlag: 0x0, nOpenCnt: 4)
<4>[ 186.121411] [BIF: ] FSR_BML_Close(nVol: 0, nFlag: 0x0, nOpenCnt: 3)
<3>[ 1511.603164] init: untracked pid 673 exited
<7>[ 1741.143938] max8998_charging_control : chg(0) cable(1) dis(0) esafe(2) bat(76,0,0)
<7>[ 1741.144150] [TSP] TA NON-Detect!!!
<3>[ 1771.984929] init: untracked pid 680 exited
<7>[ 1801.268706] max8998_charging_control : chg(1) cable(1) dis(0) esafe(2) bat(76,0,0)
<7>[ 1801.269545] [TSP] TA Detect!!!
<4>[ 2833.138728] [BIF: ] FSR VERSION: FSR_1.2.1p1_b139_RTM
<4>[ 2833.138751] [BIF: ] FSR_BML_Open(nVol:0, nFlag:0x0, nOpenCnt:4) / 1171 line
<4>[ 2833.138790] [SIF:INF] ===> STL Clst[ 2] Scan Root Info
<4>[ 2833.139382] [SIF:INF] ===> STL Zone[ 2, 0] Open Zone Meta
<4>[ 2833.146141] [SIF:INF] Latest Header Index ( 16) Vbn ( 18)
<4>[ 2833.146829] [SIF:INF] Latest Header Clean Page Offset ( 6)
<4>[ 2833.146839] [SIF:INF] POR write timer : 0x6
<4>[ 2833.147222] [SIF:INF] Latest Context BlockIdx ( 16) Offset ( 5) Vpn ( 1157)
<4>[ 2833.147363] [SIF:INF] Number of Free Block ( 26)
<4>[ 2833.147372] [SIF:INF] Active Log List : Num ( 0)
<4>[ 2833.147382] [SIF:INF] ===> STL Zone[ 2, 0] Open Zone Post
<4>[ 2833.147392] [SIF:INF] ===> STL Zone[ 2, 0] Validity check
<4>[ 2833.147414] [SIF:INF] Partition [0, 22] open is success
<4>[ 3354.057290] [BIF: ] FSR VERSION: FSR_1.2.1p1_b139_RTM
<4>[ 3354.057313] [BIF: ] FSR_BML_Open(nVol:0, nFlag:0x0, nOpenCnt:5) / 1171 line
<4>[ 3354.057353] [SIF:INF] ===> STL Clst[ 4] Scan Root Info
<4>[ 3354.057959] [SIF:INF] ===> STL Zone[ 4, 0] Open Zone Meta
<4>[ 3354.058837] [SIF:INF] Latest Header Index ( 2) Vbn ( 4)
<4>[ 3354.059650] [SIF:INF] Latest Header Clean Page Offset ( 6)
<4>[ 3354.059660] [SIF:INF] POR write timer : 0x10
<4>[ 3354.059805] [SIF:INF] Latest Context BlockIdx ( 2) Offset ( 5) Vpn ( 261)
<4>[ 3354.059946] [SIF:INF] Number of Free Block ( 9)
<4>[ 3354.059955] [SIF:INF] Active Log List : Num ( 0)
<4>[ 3354.059965] [SIF:INF] ===> STL Zone[ 4, 0] Open Zone Post
<4>[ 3354.059975] [SIF:INF] ===> STL Zone[ 4, 0] Validity check
<4>[ 3354.059993] [SIF:INF] Partition [0, 24] open is success
Start over with flashing ezbase 3.0 or 4.0.(find it in insanity rom thread) with pit 512 and repatition ticked and untick reboot and flash via Odin.when flash is done unplug your phone remove battery,put it back and use 3button combo to get in recovery,under advanced press fix permissions and reboot.if u still get fc's go back to recovery/mount/storage and format system and data and flash a rom from recovery.
Thank you a lot for the answer. I have tried your step-by-step (just EZBase 2.0) nevertheless not working even flashing from recovery. I guess the problem is deeper. Whatever I use (Odin/recovery mode) every time internal memory is not cleaned from old files.
Also using fdisk in adb all seems fine until remounting of the /sdcard. Either the problem lies in partition table or....I don't know. I am not able to do any operation on internal SD from command line and that is weird.
When using recovery mode + install, I have to use adb push to upload the zip file, then flash. After restart or umount, zip file has gone, old files are back. Thanks to anybody for other hint what to check.
Sorry for that,sound like a partition mount fault.might be corrupted
somehow.
A long time ago there was some (i think) similar problems try search for "dbdata.tar" fix,but this is a longshot and i think it was in the froyo days,search here in xda and read
---------- Post added at 09:58 PM ---------- Previous post was at 09:25 PM ----------
OK I found the file.go to (rom) i9000xxjw4 (2.3.6)[19.03.2012] post 76 page 8.
Sorry I cant provide links I'm on my phone
But remember this is a longshot.
Thank you a lot! I really do appreciate your attitude. I have found the dbdata.tar in this post but when applied on EZBase 2.0 it started to reboot. Now I reflashed by JVU-RE and waiting on boot screen (I guess it checks rfs vs. ext4), but I really think the issue will be somewhere in the partitions or partition table.
Do you or somebody know where to check partition table? I tried to check via fdisk but no help. I think that the list of files are stored in header of those partitions. Is it possible to rebuild them from OS level or to rebuild the whole mmcblk0? It is Linux, it should be possible. Thanks a lot.
any news on that issue? i might have the same problem...
I also have this problem. I can partition mmcblk0p1 with FAT32 and mmcblk0p2 with ext4 or whatever, than format the partitions and after reboot (recovery) all files (pictures, documents, etc.) are completely restored. No chance at all to change files oder partitions permanent.
I have a SGS GT-I9000.
Does anybody have an idea? What information can I provide to support diagnosis?
same here, tried deleting, formating, installing ROM's... Nothing works..
ghostjak said:
same here, tried deleting, formating, installing ROM's... Nothing works..
Click to expand...
Click to collapse
Hey ghostjak, what is your model ? is it i9000 or i9000B, cause all the while I been trying to help you based on i9000 if it is i9000B than its very similar to my unit M110S both have a DMB TV and not compatible to i9000
any news on this issue ?
Have the same problem, formating, killing, dropping the phone, nothing helps, all old files are back and i cant do nothing !!!!!
igalva said:
Have the same problem, formating, killing, dropping the phone, nothing helps, all old files are back and i cant do nothing !!!!!
Click to expand...
Click to collapse
you do not have to back up data via Google? It sometimes can tease.
misacek said:
you do not have to back up data via Google? It sometimes can tease.
Click to expand...
Click to collapse
Please refer this, it seems you had a brick on sdcard, In turn the partition table got currupted due to formatting the sdcard using CMXX removery mode.
http://forum.xda-developers.com/showthread.php?t=1813386&page=2
kat0072 said:
Please refer this, it seems you had a brick on sdcard, In turn the partition table got currupted due to formatting the sdcard using CMXX removery mode.
http://forum.xda-developers.com/showthread.php?t=1813386&page=2
Click to expand...
Click to collapse
Yeah I know. Its fine now samsung customer care office helped me to reflash the firmware.
But now question is how to reset the custom rom count to 0 ??
Sent from my GT-N7105 using xda app-developers app
kat0072 said:
Yeah I know. Its fine now samsung customer care office helped me to reflash the firmware.
Click to expand...
Click to collapse
Could you revive the corrupted internal sd card? Is it just flashing a firmware and that's it?
Thanks in advance.
I dont know what exactly they have done to correct the partition table.
I guess they re-partitioned using the pit file.
Sent from my GT-N7105 using xda app-developers app
kat0072 said:
I dont know what exactly they have done to correct the partition table.
I guess they re-partitioned using the pit file.
Sent from my GT-N7105 using xda app-developers app
Click to expand...
Click to collapse
Hello,
I have the same problem... you mention samsung guys fixed, did you send the phone to them? Or did they give you the files?
I have the same problem on my Samsung.
If you found any solution to this problem could you please help me??
karamjit123 said:
If you found any solution to this problem could you please help me??
Click to expand...
Click to collapse
I dont know what problem ur facing but if sd internal corrupt, u should just follow this guy instruction
http://forum.xda-developers.com/showthread.php?t=845708
https://www.youtube.com/watch?v=zdMhYYdMB08
herolpx said:
Hello,
I have the same problem... you mention samsung guys fixed, did you send the phone to them? Or did they give you the files?
Click to expand...
Click to collapse
I just visited the near by Samsung customer care office in my area and they took 6hours to fix it and gave me back with no cost of repair. Remember even they fix this up the Custom ROM counter will still intact which was earlier. They will not reset it.
HTH
Sent from my GT-N7105 using xda app-developers app
can't open '/dev/block/mmcblk0p2': No such file or directory
parted /dev/block/mmcblk0
Error: Can't have a partition outside the disk!
~ # e2fsck -b8193 /dev/block/mmcblk0p2
e2fsck -b8193 /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # fdisk -l /dev/block/mmcblk0p2
fdisk -l /dev/block/mmcblk0p2
fdisk: can't open '/dev/block/mmcblk0p2': No such file or directory
more /etc/fstab
/dev/block/stl11 /cache rfs rw
/dev/block/mmcblk0p2 /data rfs rw
/dev/block/stl10 /datadata rfs rw
/dev/block/stl9 /system rfs rw
/dev/block/mmcblk0p1 /sdcard vfat rw
Please Help !!!