PHYTEC
Page 28
target$ fdisk /dev/mmcblk2
The number of cylinders for this disk is set to 485632.
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
Disk /dev/mmcblk2: 15 GB, 15913189376 bytes, 31080448 sectors
485632 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk2p1 * 64,0,1 762,2,28 8192 97627 89436 43.6M c Win)
/dev/mmcblk2p2 768,0,1 1023,3,32 98304 950271 851968 416M 83 Linx
Command (m for help): d
Partition number (1-4): 2
Command (m for help): p
Disk /dev/mmcblk2: 15 GB, 15913189376 bytes, 31080448 sectors
485632 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk2p1 * 64,0,1 762,2,28 8192 97627 89436 43.6M c Win)
Command (m for help): n
Partition type
p primary partition (1-4)
e extended
p
Partition number (1-4): 2
First sector (16-31080447, default 16): 98304
Last sector or +size{,K,M,G,T} (98304-31080447, default 31080447):
Using default value 31080447
Command (m for help): p
Disk /dev/mmcblk2: 15 GB, 15913189376 bytes, 31080448 sectors
485632 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk2p1 * 64,0,1 762,2,28 8192 97627 89436 43.6M c Win)
/dev/mmcblk2p2 1023,3,16 1023,3,16 98304 31080447 30982144 14.7G 83 Linx
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
[ 3543.167662] mmcblk2: p1 p2
target$
Increasing the file system size can be done while it is mounted. An
resizing operation is performed. But you can also boot the board from an SD
on-line
card and then resize the file system on the eMMC partition while it is not mounted. Furthermore, the board has to be rebooted so that the new partition
table will be read.
Erasing the Device
It is possible to erase the eMMC device directly rather than overwriting it with zeros. The eMMC block management algorithm will erase the underlying
MLC memory cells or mark these blocks as
. The data on the device is lost and will be read back as zeros.
discard
After booting from SD card execute:
target$ blkdiscard --secure /dev/mmcblk2