We are using am335x based custom board, we have eMMC as secondary storage device. Now to list partitions we are using parted utility but parted prints partition sizes in the MB instead of MiB.
Is there any way to ask parted to print partition sizes in MiB unit instead of MB unit?
You can refer to below output which shows the parted is printing sizes in the KB or MB but not in KiB or MiB.
# parted --list
Model: MMC MMC04G (sd/mmc)
Disk /dev/mmcblk0: 3842MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 131kB 262kB 131kB
2 262kB 393kB 131kB
3 393kB 524kB 131kB
4 524kB 1573kB 1049kB
5 1573kB 2621kB 1049kB
6 2621kB 3146kB 524kB
7 3146kB 3277kB 131kB
8 3277kB 8520kB 5243kB
9 8520kB 13.8MB 5243kB
10 13.8MB 19.0MB 5243kB
11 19.0MB 19.3MB 262kB
12 19.3MB 19.5MB 262kB
13 19.5MB 19.8MB 262kB
14 21.0MB 32.5MB 11.5MB
15 33.6MB 243MB 210MB ext4
16 243MB 453MB 210MB ext4
17 453MB 558MB 105MB ext4
18 558MB 621MB 62.9MB ext4
19 621MB 830MB 210MB ext4
20 830MB 867MB 36.7MB ext4
21 867MB 3827MB 2960MB ext4
parted <<<'unit MiB print all'doesn't work while other two commands works like a charm. Thank you for reply. – ART Jan 15 '16 at 09:05<<<(herestrings) or not. – don_crissti Jan 15 '16 at 09:07parted <<<'unit MiB print list? instead ofparted <<<'unit MiB print all'. However for me print list also doesn't work but i was just curious. – ART Jan 15 '16 at 09:09parted --script /dev/mmcblk0 unit MiB print– ART Jan 15 '16 at 09:20parted --script /dev/mmcblk0 unit MiB printalso in your answer ? it would be easy for someone to notice that. – ART Jan 15 '16 at 09:36listorallis the same (with older versions ymmv, seeparted --help). Also, what is the point of using the--scriptoption here:parted --script /dev/mmcblk0 unit MiB printwhen you can simply runparted /dev/mmcblk0 unit MiB print? – don_crissti Jan 15 '16 at 10:18parted /dev/mmcblk0 unit MiB printalso works :) – ART Jan 15 '16 at 10:22