View Single Post
Posts: 27 | Thanked: 1 time | Joined on Mar 2011 @ india
#17
Originally Posted by michaaa62 View Post
The change of the id via sfdisk is only applied to the partition table. So that might be safe to change, unless you, at some time did not not follow one of the howtos to change the file system for the MyDocs-Partition, but only you know if you did.

Am i right, that you do not want to recover some lost files from any partition, that was deleted, but want to have a usable partition for a fresh new MyDocs? Then proceed
Code:
sudo gainroot
echo "unit: sectors
> /dev/mmcblk0p1 : start= 64, size=51199936 , Id=c
> /dev/mmcblk0p2 : start= 56631360, size= 4194304, Id=83
> /dev/mmcblk0p3 : start= 60825664, size= 1572864, Id=82
> /dev/mmcblk0p4 : start= 51200000, size= 5431360, Id= 5" > table
Note: These are two commands, first to gain root rights, second to create the file table with the right content.

Next dump it to the device
Code:
sfdisk --no-reread /dev/mmcblk0 < table
Now the Phone is ready to reboot, you still have to apply the file system to the MyDocs partition and add the fifth partition inside the extended fourth partition

Please ask if anything is still unclear.


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ sudo gainroot
Root shell enabled


BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # echo "unit: sectors
> /dev/mmcblk0p1 : start= 64, size=51199936 , Id=c
> /dev/mmcblk0p2 : start= 56631360, size= 4194304, Id=83
> /dev/mmcblk0p3 : start= 60825664, size= 1572864, Id=82
> /dev/mmcblk0p4 : start= 51200000, size= 5431360, Id= 5" > table
/home/user # sfdisk --no-reread /dev/mmcblk0 < table

Disk /dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track
Old situation:
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 1 1 1 32 83 Linux
/dev/mmcblk0p2 884865 950400 65536 2097152 83 Linux
/dev/mmcblk0p3 950401 974976 24576 786432 82 Linux swap / Solaris
/dev/mmcblk0p4 800000 884864 84865 2715680 5 Extended

sfdisk: input error: unexpected character after size field
/home/user #

Last edited by rajanmb2005; 2012-04-21 at 08:42. Reason: correction