View Single Post
Old 07-14-2018, 04:39 PM   #39
m4mmon
Enthusiast
m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.m4mmon is my name, but call me Ishmael.
 
Posts: 49
Karma: 107174
Join Date: Mar 2012
Device: PB631, PB741, PB840
I decided to start all over again with another SD card in order to give clear explanations. I used a 32 Gb.
After preparing the card for the patched monitor.app as explained above, I copied all /dev/sdd1 contents to easy restore after partitioning, then launched fdisk on the card:
Code:
root@kali:~/Desktop# fdisk /dev/sdd

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdd: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0a706388

Device     Boot   Start     End Sectors   Size Id Type
/dev/sdd1       1009664 7763967 6754304   3.2G  b W95 FAT32
/dev/sdd2  *      73728  139263   65536    32M  6 FAT16
/dev/sdd3             1 1009664 1009664   493M 85 Linux extended
/dev/sdd5        139264  172031   32768    16M 83 Linux
/dev/sdd6        172032  204799   32768    16M 83 Linux
/dev/sdd7        204800  275455   70656  34.5M 83 Linux
/dev/sdd8        275456  776191  500736 244.5M 83 Linux
/dev/sdd9        776192  976895  200704    98M 83 Linux
/dev/sdd10       976896 1009663   32768    16M 83 Linux

Partition table entries are not in disk order.

Command (m for help): d
Partition number (1-3,5-10, default 10): 1

Partition 1 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 1 extended, 2 free)
   l   logical (numbered from 5)
Select (default p): p
Partition number (1,4, default 1): 1
First sector (1009665-62521343, default 1011712): 1009665
Last sector, +sectors or +size{K,M,G,T,P} (1009665-62521343, default 62521343): 60424191

Created a new partition 1 of type 'Linux' and of size 28.3 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
As you can see, you cannot use 1009664 as first sector (would overlap #3).
I also kept space at the end of the card for my future #4 partition.
Since I wanted to know if it was useful or not to have the partition starting at the 1009664 sector, I kept it like that and formatted it:
Code:
root@kali:~# mkdosfs -F 32 -I /dev/sdd1
mkfs.fat 4.1 (2017-01-24)
I restored the contents, and installed the SD card back in the pocketbook. It worked


Just for explaining how I modified the card with disk editor in my previous post (which is useless!), I used Active Disk Editor on windows, the first software I tried and it did the job. I edited the "First sector value" (this is what fdisk reads and shows).
https://imgur.com/a/0Vm39ns
m4mmon is offline   Reply With Quote