The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
2012-04-22
, 12:53
|
Posts: 27 |
Thanked: 1 time |
Joined on Mar 2011
@ india
|
#32
|
Before the explanation, i would still ask you to clarify, what you want to achieve:
1.Do you want to recover files on the former large MyDocs-partition
or
2.Do you do not care about any data on that partition and just want to move on?
Explanation:
The sfdisk utility does not actually change anything on the internal card itself. It just creates or reads the partition table and offers the information to the kernel and the other utilities. You will have to create a fresh new file system every time you change the size of any partition or create new partitions. You do that with the mkfs.-$FILESYSTEM utilities, like mkfs.vfat.
Basic steps:
1.Create the table, like the echo command to create the file
- echo is a simple command to create text inside the "-characters, here, to a file, therefore >$FILENAME
2.Write the information from the file to the first sector of the internal card via the sfdisk command
- sfdisk is the low level utility to access the first sectors of a sd-card like /dev/mmcblk0, --no-reread option tells sfdisk to do just that, do not try to read the partition table, because it would be useless right now, and table is the name of the file, which holds the information from which sfdisk reads
3.Reboot to have the changed geometry be known to the kernel
4.Now actually apply the file system, also named: format the partition
![]() |
2012-04-22
, 13:39
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#33
|
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 > /dev/mmcblk0p5 : start= 51200016, size= 5431344, Id=83" > table
sfdisk --no-reread /dev/mmcblk0 < table
reboot
mkfs.vfat -n MyDocs /dev/mmcblk0p1 mke2fs -L NITDroid -j -m0 /dev/mmcblk0p5
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
2012-04-22
, 16:09
|
Posts: 27 |
Thanked: 1 time |
Joined on Mar 2011
@ india
|
#34
|
Steps 1 and 4 assume, that you are still trying to install Nitdroid at some time on a separate partition. If you have some other plan please demand new directions
All steps should be done as root
Step 1Step 2Code: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 > /dev/mmcblk0p5 : start= 51200016, size= 5431344, Id=83" > tableStep 3Code:sfdisk --no-reread /dev/mmcblk0 < tableWait for the device to reboot, thenCode:reboot
Step 4Code:mkfs.vfat -n MyDocs /dev/mmcblk0p1 mke2fs -L NITDroid -j -m0 /dev/mmcblk0p5
![]() |
2012-04-22
, 17:06
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#35
|
sudo gainroot umount /dev/mmcblk0p1 mkfs.vfat -n MyDocs /dev/mmcblk0p1 mount /dev/mmcblk0p1 /home/user/MyDocs
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
![]() |
2012-04-22
, 18:58
|
Posts: 27 |
Thanked: 1 time |
Joined on Mar 2011
@ india
|
#36
|
Half a success
The MyDocs partition is not formatted. Please try againCode:sudo gainroot umount /dev/mmcblk0p1 mkfs.vfat -n MyDocs /dev/mmcblk0p1 mount /dev/mmcblk0p1 /home/user/MyDocs
![]() |
2012-04-23
, 13:49
|
Posts: 27 |
Thanked: 1 time |
Joined on Mar 2011
@ india
|
#37
|
![]() |
2012-04-24
, 00:45
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#38
|
The Following User Says Thank You to J4ZZ For This Useful Post: | ||
![]() |
2012-05-05
, 05:46
|
Posts: 27 |
Thanked: 1 time |
Joined on Mar 2011
@ india
|
#39
|
![]() |
2012-05-05
, 06:13
|
Posts: 2,102 |
Thanked: 1,937 times |
Joined on Sep 2008
@ Berlin, Germany
|
#40
|
sudo gainroot umount /home/user/MyDocs fsck -af /dev/mmcblk0p1 mount /dev/mmcblk0p1 /home/user/MyDocs
The Following User Says Thank You to michaaa62 For This Useful Post: | ||
1.Do you want to recover files on the former large MyDocs-partition
or
2.Do you do not care about any data on that partition and just want to move on?
Explanation:
The sfdisk utility does not actually change anything on the internal card itself. It just creates or reads the partition table and offers the information to the kernel and the other utilities. You will have to create a fresh new file system every time you change the size of any partition or create new partitions. You do that with the mkfs.-$FILESYSTEM utilities, like mkfs.vfat.
Basic steps:
1.Create the table, like the echo command to create the file
- echo is a simple command to create text inside the "-characters, here, to a file, therefore >$FILENAME
2.Write the information from the file to the first sector of the internal card via the sfdisk command
- sfdisk is the low level utility to access the first sectors of a sd-card like /dev/mmcblk0, --no-reread option tells sfdisk to do just that, do not try to read the partition table, because it would be useless right now, and table is the name of the file, which holds the information from which sfdisk reads
3.Reboot to have the changed geometry be known to the kernel
4.Now actually apply the file system, also named: format the partition