[Q] Can not delete partitions on mmcblk0 - Galaxy S I9000 Q&A, Help & Troubleshooting

Hello!
My problem is that my galaxy hang with lightning buttons. After that it doesn't work correct. Done a wipe, that doesn't help. Flashed 3 file rom jm1, not working correctly.
Now i wan't to delete partitions on internal sd with adb and parted. But it doesn't work.
I used : #parted /dev/block/mmcblk0 as root!
then rm 1, rm 2.
When i do a print after that everything stays the same as before. :
(parted) print
print
print
Model: MMC M8G4DD (sd/mmc)
Disk /dev/block/mmcblk0: 8221MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 6208MB 6208MB primary fat32 lba
2 6208MB 8221MB 2013MB primary lba
(parted)
Anybody an idea what to do?
Thanks

I have a similar. Did you look inside /dev/block/ ?
a normal phone has mmcblk0, mmcblk0p1 and mmcblk0p2.
Mine has only mmcblk0 and partition table looks broken or I get I/O error.

Related

reformat

Im running JAChero 2.7.3 and my mms isn't working(like most peoples)
I have no idea how to fix this I've been reading and reading and honestly i don't understand what to do at all(n00b) =/
I read that there was a way to fix it and it was to reformat your ext and linux-swap partitions, wipe, and reflash..
I did the drop console thign from the recovery screen and this is what i got
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7469MB 7469MB primary fat32 lba
2 7469MB 7969MB 500MB primary ext2
3 7937MB 7969MB 32.2MB primary linux swap
how do i reformat it?
Coopaman said:
Im running JAChero 2.7.3 and my mms isn't working(like most peoples)
I have no idea how to fix this I've been reading and reading and honestly i don't understand what to do at all(n00b) =/
I read that there was a way to fix it and it was to reformat your ext and linux-swap partitions, wipe, and reflash..
I did the drop console thign from the recovery screen and this is what i got
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0: 7969MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7469MB 7469MB primary fat32 lba
2 7469MB 7969MB 500MB primary ext2
3 7937MB 7969MB 32.2MB primary linux swap
how do i reformat it?
Click to expand...
Click to collapse
rm 2
rm 3
mkpartfs primary ext2 7469 7937
mkpartfs primary linux-swap 7937 7969
quit
upgrade_fs
reboot recovery

[GUIDE] SD card partitioning for rooted phones

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...

[Q] Issues with Upgrade to Overcome 3.1.0

Hello!
I have a SGT UK, Unbranded... It was on Froyo 2.2. I had a issue where the Tab froze while browsing. Restarted it and it would get stuck at the Samsung Logo.
Having read the threads on XDA on how to flash it to stock, I decided to goto Stock 2.3.3. Followed the instructions, but got the 'E:Can't mount... /data' error.
Tried flashing a few more times and no luck. Eventually, I flashed the CWM 3 Kernel and was able to use the Tab and also had root.
I then decided to try the Overcome 3.1.0 ROM... After going thru the instructions, I flashed it and had the rom (wipe version) in the internal sdcard... on reboot, the 'voice' started its process but complained mid way about 'not enuf space on data partition'. It eventually finished the process but got stuck again at the Samsung logo.
Tried this again and same problem. I then decided to use the stock rom provided by Overcome and I still continue to face the same problem.
However, if I now flash the stock rom and only the Overcome Kernel, I can boot up and use the Tab but cannot delete any files from the internal sdcard. Also, any settings changed are lost if i restart the tab.
Long story short, How do i completely remove and flash stock 2.2 or 2.3.3?
TIA!
The fine folks at Team Overcome have put together an amazing guide at http://p1000.teamovercome.net/?page_id=64. When I browse through the threads here on XDA I notice that 99% of the time when people have troubles its because they accidentally skipped a step, or thought it was unimportant.
My advice is to follow the guide to the letter, and do a complete wipe, re-stock, and stop when you finish step 6 of "The Installation" if you only want to stay as close to stock as possible.
@Blittz... I have followed that guide and tried to go back to the stock using the '001001-GB-Stock-Safe-v5.zip' file. I do get the error related to 'dbdata' or 'mmcblk0' etc but after a reboot, it gets stuck at the Samsung Logo. In other words, trying to go back to stock 2.3.3 doesnt work. I then have to flash the Overcome Kernel over the stock rom to get the Tab to boot.
Another thing I noted was after flashing the Overcome Kernel over stock 2.3.3, I go thru the 'adb shell' and check the internal sdcard partitions - mmcblk0p1 etc thru parted or fdisk, and they report errors and i cannot even format the internal sdcard.
All the files that i had before i started the process for Overcome ROM are still there and cannot be deleted. I feel the internal sdcard partitions are corrupt. Any way I could rebuild them?
Further... Here's what happens if I try to remove the partitions on the int sdcard --
~ # 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
print
print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 13.8GB 13.8GB primary fat32
2 13.8GB 15.8GB 2043MB primary ext4
3 15.8GB 15.9GB 105MB primary
(parted) check 1
check 1
check 1
Fatal: Bad FAT: unterminated chain for \DCIM\THUMBN~1. You should run dosfsck
or scandisk.
(parted) check 2
check 2
check 2
No Implementation: Support for opening ext4 file systems is not implemented yet.
(parted) check 3
check 3
check 3
Error: Could not detect file system.
(parted)
~ # fdisk /dev/block/mmcblk0
fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 1944064.
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/mmcblk0: 15.9 GB, 15925772288 bytes
1 heads, 16 sectors/track, 1944064 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 5 1681920 13455328 83 Linux
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 1681921 1931264 1994752 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 1931265 1944064 102400 83 Linux
Partition 3 does not end on cylinder boundary
Command (m for help):
~ # 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
Warning: The existing disk label on /dev/block/mmcblk0 will be destroyed and all
data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Yes
Yes
(parted) p
p
p
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 13.8GB 13.8GB primary fat32
2 13.8GB 15.8GB 2043MB primary ext4
3 15.8GB 15.9GB 105MB primary
(parted) rm 3
rm 3
rm 3
(parted) rm 2
rm 2
rm 2
(parted) rm 1
rm 1
rm 1
(parted) print
print
print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 13.8GB 13.8GB primary fat32
2 13.8GB 15.8GB 2043MB primary ext4
3 15.8GB 15.9GB 105MB primary
(parted)
I'm no expert, but I think your problem may be with the error you got:
Fatal: Bad FAT: unterminated chain for \DCIM\THUMBN~1. You should run dosfsck or scandisk.
Click to expand...
Click to collapse
You may have something corrupted there, did you try running dosfsck or scandisk? You may need to fix that before you can go on.
Back after few weeks... Well.. tried all i could to flash back to stock firmware... not luck. Took the Tab to the Service Center eventually... Got a new replacement from Samsung... Sweet!
sudeep1106 said:
~ # 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
print
print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.8kB 13.8GB 13.8GB primary fat32
2 13.8GB 15.8GB 2043MB primary ext4
3 15.8GB 15.9GB 105MB primary
(parted) check 1
check 1
check 1
Fatal: Bad FAT: unterminated chain for \DCIM\THUMBN~1. You should run dosfsck
or scandisk.
(parted) check 2
check 2
check 2
No Implementation: Support for opening ext4 file systems is not implemented yet.
Click to expand...
Click to collapse
sounds like a corrupted SD card to me! try running scandisk or dosfsck on this, maybe it solves the error!
EDIT: woops didnt read the last post! grats on your new tab

Safestrap on ME863

(sorry for my bad english and i still cant post link now)
According to http:// forum.xda-developers.com/showpost.php?p=20976390&postcount=294 ,
I think it may work to redirect partition into SD card, so that safestrap will work on non-VZW-phones.
Safestrap uses /preinstall as a new /system partition to install 2nd ROM on it,
We can make a new partition on SD card to replace "/preinstall".
Here is my steps:
backup your SD card and make partitions
boot to safestrap recovery with usb connected to your PC
plug to PC first, then boot to safestrap recovery mode,
now you can use adb shell to control your system.
1.1 make partitions on your SD Card (ref: http:// forum.xda-developers.com/showthread.php?t=534714)
SD card is /dev/block/mmcblk0 so use parted to modify it
Code:
~ # [B]parted /dev/block/mmcblk0[/B]
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) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 7946MB 7946MB primary fat32 lba
(parted)
as you can see i have a 8G SD card, fullly used as fat32 partition,
we use rm and mkpartfs to modify our SD card partition, make sure you have backuped your SD card.
for compatibility i choose to make fat32 partition first,
(512mb/1G for new system size is enough, but i want my 2nd system partiton bigger)
Code:
rm 1
mkpartfs primay fat32 0 6G
mkpartfs primay ext2 6G 100%
after done all the things you can see your partition by print,
e.g.
Code:
(parted) [B]print[/B]
Model: SD SU08G (sd/mmc)
Disk /dev/block/mmcblk0: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 5996MB 5996MB primary fat32 lba
2 5996MB 7946MB 1949MB primary ext2
(parted) [B]quit[/B]
1.2 format fat32 partitions
Code:
busybox mkdosfs /dev/block/mmcblk0p1
1.3 make ext2 -> ext3
sometimes you have to mount /dev/block/mmcblk0p2 first, depends on the tune2fs version
Code:
tune2fs -j /dev/block/mmcblk0p2
or you can do ext3 -> ext4 by typing (i never tried, dont know if safestrap support ext4 ??)
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
Modify safestrap to use our new partition as 2nd system partition
after you install safetrap 1.08, you have some files in your original system,
we have to modify the /preinstall partition (/dev/block/mmcblk1p23) to our new partition (/dev/block/mmcblk0p2 as example here):
2.1 modify /system/bin/logwrapper
find /dev/block/mmcblk1p23, replace to your new partition
Code:
# mount preinstall and move /preinstall/etc/rootfs/* to /
/sbin/busybox mount -t ext3 [B]/dev/block/mmcblk0p2[/B] /preinstall
2.2 modify fixboot.sh in /system/etc/safestrap/2nd-init.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/sbin/busybox ln -s [B]/dev/block/mmcblk0p2[/B] system
2.3 modify etc/recovery.fstab in /system/etc/safestrap/recovery.zip
find /dev/block/mmcblk1p23, replace to your new partition
Code:
/system ext3 [B]/dev/block/mmcblk0p2[/B]
reboot for reloading settings
safestrap need to reload settings, we need reboot.
modify your 2nd ROM to make sure everything works
safestrap loads etc/rootfs from your new partition,
we need to modify /dev/block/mmcblk1p23 to our partition.
you can modify the ROM (.zip) file directly or edit them after installing ROM
just find /dev/block/mmcblk1p23 and replace them to your new partition (e.g. /dev/block/mmcblk0p2 here)
Special thanks to hashcode.
Enjoy safestrap on non-VZW-phones !

[GUIDE] External2Internal Ultimate for Galaxy Tab P1000

I thought about this idea while comparing my Android phone to my iPhone.
Both systems use variants of Unix, but the implementation is very different: there is one partition available to iPhone users, where all apps/music/everything gets installed. If you have a 64GB iPhone, this means you never run out of space for apps.
On the other hand, having a 16GB Android phone and a 64GB Micro SD puts you in a bit of a predicament, rather than a better place compared to the iPhone owner. Some genius has decided that there should be a 1-2GB /data partition where your apps go, and their data goes into the internal SD card; about 100-200 apps down the line (clearly, more than you need, but who are the android designers to judge), you run out of /data space and you end up doing ridiculous things like moving apps to SD, using some form of link2sd/data2sd script etc… Meanwhile you realise that your 64GB microSD is dead space and all you can do is store photos, music, video etc in it - rather than Asphalt data or Navigon maps.
This can change if you have a rooted phone! It took me a while to figure it out, but I first did it on my Galaxy Note N7000 following this guide: http://forum.xda-developers.com/showthread.php?t=1887864 and then decided to create a new guide for my Galaxy Tab 7 (P1000). Credits to badge2033 for the first guide.
After following this guide you will have:
* supersized data partition (12 gigs): no more move to sd needed and then again the stock move to sd feature will work as expected (it will move data to the actual external sd card)
* external sd card mounted as internal sd card: nothing to say here, just does what is expected
* real internal sd (ums partition) shrunk to minimum (half gig) because it needs to stay present: used to mount a swap file (optional)
What you will need:
* Rooted Galaxy Tab P1000 - hopefully running Android 4.3 HumberOS CyanogenMod, but not necessarily (this guide is made with CM10.2 in mind)
* Working knowledge of ADB / Google to get you through bits if you get stuck
Code:
/* Standard disclaimer: Your warranty is now void. Use at your own risk.
Modifying or replacing your device's software may void your device's warranty,
lead to data loss, hair loss, financial loss, privacy loss, security breaches, or
other damage, and therefore must be done entirely at your own risk.
Every time you do not backup and complain a puppy dies.
No one is responsible for your actions but yourself. Good luck. */
Procedure:
1. reboot to recovery, and connect your phone to your pc
2. run a command prompt and type the following (wait a little bit until the adb server starts on the phone, you can verify it by typing "adb devices" if you get a serie of digits then you're good to go.
Code:
adb shellcat /proc/partitions
You should see something like:
Code:
31 0 7680 mtdblock0
31 1 7680 mtdblock1
31 2 443904 mtdblock2
31 3 22528 mtdblock3
31 4 12800 mtdblock4
31 5 11264 mtdblock5
179 0 15552512 mmcblk0
179 1 13455328 mmcblk0p1
179 2 1994752 mmcblk0p2
179 3 102400 mmcblk0p3
179 16 1024 mmcblk0boot1
179 8 1024 mmcblk0boot0
179 24 31166976 mmcblk1
179 25 31162880 mmcblk1p1
Backup your /data to External SD. REMEMBER YOU HAVE ALREADY COPIED YOUR INTERNAL SD TO THE EXTERNAL ONE!!! I did a dd backup and a nandroid in CWM. You only need the nandroid to restore later.
Code:
dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/databack.img bs=4096
Code:
/*** WARNING!!! Do your own backups / nandroids /
write important things down on a napkin, if this does not work for you
and you lose data I'm not responsible!!! ***/
You should see something like:
Code:
498688+0 records in
498688+0 records out
2042626048 bytes (1.9GB) copied, 277.149450 seconds, 7.0MB/s
Then use parted, the partition editor:
Code:
parted /dev/block/mmcblk0
you'll get into the parted interactive shell, this is where serious work done
Code:
unit b
print
You should see something like:
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15925772288B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32768B 13778288639B 13778255872B primary fat32
2 13778288640B 15820914687B 2042626048B primary ext4
3 15820914688B 15925772287B 104857600B primary ext4
Code:
did i remind you to backup your system,this is your last stop before the no back pointso you just might wanna "move" all your internal sd stuff to the external sd,and backup your system to the external sd also (you just need to restore the data partition afterwards the rest of the system is safe but who knows :p)ps: you can do your backup on cwm without leaving adb shell on the pc just like you will do the format later thanks to cwm
remove the partitions
Code:
rm 1
rm 2
make the new changed size partitions
Code:
mkpart primary 32768 536903167
mkpart primary 536903168 15820914687
print
you should see this output
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15925772288B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32768B 536903167B 536870400B primary fat32
2 536903168B 15820914687B 15284011520B primary
3 15820914688B 15925772287B 104857600B primary ext4
Format the data partition as ext2 (so that CWM can see it)
Code:
mkfs
Then choose 2, ext2
now in cwm go to mounts and storage and select "format /storage/sdcard0" and "format /data"
now restore your data partition in CWM.
and you will be able to boot you system normally. and you go to your storage information you will find that your app storage is now 13gigs and the usb storage is just 500 megs yay
For Android 4.3 modifying vold.fstab file (but for other versions do so with ciphray's guide on how to do so)
you can use the modified file from ciphray thread here which i didn't beacuse his file was smaller
What DOES work is the free External 2 Internal app in Google Play: https://play.google.com/store/apps/details?id=eu.codlab.int2ext&hl=el
Settings are (for CM 10.2 ROM):
Original Internal mounting point: /storage/sdcard0
Original External mounting point: /storage/sdcard1
Ext.sdcard device access: /dev/block/vold/179:25
[Have not done this - badge2033 suggests it]
as a final step you can use the now pretty useless internal space (500megs remember) as a swap sapce
download swapper2 from the play store here https://play.google.com/store/apps/d...v.n3o.swapper2
run it and go to settings
set swap place as /sdcard/external_sd/swapfile.swp
set swap size to the max
set the swappiness to 20 ( you can rise the value a little but don't put a high value or the system will do much swapping all the time -value of 100 means any memory not used actively will be swapped- )
wait until the process finishes then reboot your phone
you can verify that swap is working by typing "free" in the shell if the line beginning with swap is not all zeros then you're swap is working.
Phew! That was a long guide. Questions / comments below.
Good idea!
im waiting for better CM 10.2 and will try (my p1000 is on alroger's cm 10.1 now)
Sent from GT-P1000 using Tapatalk4
Just to be sure to have understood everything.
You have convert the internal storage in data partition but It can't be use anymore as a storage?
Thanks
Yes. The original partitioning of internal storage is about 2gb data / 12gb storage, now it's just 500mb storage. Then with the sd card swap this 500mb becomes obsolete as a 32 or 64 gb microSD takes the place of storage.
help me.
I really like the way you propose, I like to do this but,
after going to recovery and plug in,i open a cmd(admin) and type adb devices and this massage appear:
##################################
C:\Users\farzad>adb devices
List of devices attached
32348202BA2300EC device
C:\Users\farzad>
##################################
after that when I type this code:
>adb shellcat /proc/partitions
the help of adb appear:
##################################
Android Debug Bridge version 1.0.25
-d - directs c
e
returns a
present.
-e - directs c
returns a
unning.
-s <serial number> - directs c
ith
the given
##################################
what should I do? where is my mistake?
tnx
farza(db)astany said:
help me.
after going to recovery and plug in,i open a cmd(admin) and type adb devices and this massage appear:
after that when I type this code:
>adb shellcat /proc/partitions
the help of adb appear:
what should I do? where is my mistake?
tnx
Click to expand...
Click to collapse
Try entering separate commands in the command line
adb shell
cat /proc/partitions
You are welcome.
---------- Post added at 02:32 AM ---------- Previous post was at 01:58 AM ----------
Thanks for this post. In my case, this method somehow unlocked hidden 16GB storage. Without microSD inserted, it has 14GB of internal storage (where you can have your apps)... and 15GB of SD internal storage. (can be used as usb drive and storage for movies and music and books)
Moving EVERYTHING to external SD card
Hello,
Sorry for necroposting, but I'm looking for a way to revive a Samsung Galaxy Tab GT-P1000 that had a damaged internal storage chip physically removed.
I managed to intall CyanogenMod 13 on the external SD card partitionned as follow :
Code:
cat /fstab.p1
# Android fstab file.
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
recovery /recovery mtd defaults recoveryonly
boot /boot mtd defaults recoveryonly
radio /radio mtd defaults recoveryonly
/dev/block/mtd/by-name/cache /cache yaffs2 defaults recoveryonly
# LVM Volumes
/dev/lvpool/system /system ext4 ro,discard wait
/dev/lvpool/userdata /data ext4 noatime,discard,nodev,nosuid,nomblk_io_submit,errors=panic wait,encryptable=footer,length=-16384
/dev/lvpool/userdata /data f2fs rw,noatime,discard,nosuid,nodev,nodiratime,inline_xattr wait,encryptable=footer,length=-16384
/dev/block/mtd/by-name/datadata /datadata yaffs2 defaults recoveryonly
/devices/platform/s3c-sdhci.0/mmc_host/mmc0/*/mmcblk0 auto auto defaults voldmanaged=sdcard0:1,noemulatedsd,nonremovable
/devices/platform/s3c-sdhci.2/mmc_host/mmc1/*/mmcblk1 auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
# zRAM
/dev/block/zram0 none swap defaults zramsize=134217728
However, most apps crash when started, as they expect a writable internal storage, and there is none.
Additionnal data :
Code:
[email protected]:/ # cat /proc/partitions
major minor #blocks name
254 0 131072 zram0
31 0 7680 mtdblock0
31 1 7680 mtdblock1
31 2 432128 mtdblock2
31 3 17920 mtdblock3
31 4 12800 mtdblock4
31 5 16384 mtdblock5
31 6 11264 mtdblock6
179 0 15558144 mmcblk0
179 1 10844160 mmcblk0p1
179 2 4193280 mmcblk0p2
179 3 510976 mmcblk0p3
253 0 921600 dm-0
253 1 3768320 dm-1
Code:
[email protected]:/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00780000 00040000 "boot"
mtd1: 00780000 00040000 "recovery"
mtd2: 1a600000 00040000 "datadata"
mtd3: 01180000 00040000 "cache"
mtd4: 00c80000 00040000 "efs"
mtd5: 01000000 00040000 "radio"
mtd6: 00b00000 00040000 "reservoir"
What I'm looking for is a way to use the external SD card as /system, /data, AND internal storage. Can anyone help me achieve this ?

Categories

Resources