linux 查看emmc分区表_iMX6Q Linux应用笔记-讲解eMMC增加分区两种方式

本文主要适用于飞凌OKMX6X-C平台Linux3.0.35操作系统,本文主要讲解eMMC增加分区两种方式,其他iMX6Q平台也可以参考,但是不同厂家iMX6平台之间会存在差异,需自行修改以适应自己的使用。

增加分区方法一(帮助理解分区)

fdisk -l查看系统上的硬盘,找到需要分区的硬盘:/dev/mmcblk0.

进入该设备:fdisk/dev/ mmcblk0

此时出现:

Command (m for help):

查看帮助信息:输入m:

看到如下信息

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition 注:这是删除一个分区的动作;

l list known partition types 注: l 是列出分区类型,以供我们设置相应分区的类型;

m print this menu 注: m 是列出帮助信息;

n add a new partition 注:添加一个分区;

o create a new empty DOS partition table

p print the partition table 注: p 列出分区表;

q quit without saving changes 注:不保存退出;

s create a new empty Sun disklabel

t change a partition's system id 注: t 改变分区类型;

u change display/entry units

v verify the partition table

w write table to disk and exit 注:把分区表写入硬盘并退出;

x extra functionality (experts only) 注:扩展应用,专家功能;

具体每个参数的含义,请仔细阅读。常用的就是:d l m p q t w

列出当前操作硬盘的分区情况:用p

添加分区:输入n

Command (m for help): n

Command action

e extended

p primary partition (1-4)

添加主分区: 输入p

Partition number (1-4):2

注:前面已经有一个主分区了,这个也算主分区从2 开始;

First cylinder (1-238592, default 1):直接回车

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1600, default 1600):800(按照需求添加大小)

Command (m for help):p

Disk /dev/mmcblk0: 7818 MB, 7818182656 bytes

4 heads, 16 sectors/track, 238592 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

添加分区:输入n

Command (m for help): n

Command action

e extended

p primary partition (1-4)

添加主分区: 输入p

Partition number (1-4): 3

First cylinder (801-238592, default 801): 801

Last cylinder or +size or +sizeM or +sizeK (801-1600, default 1600):回车Using default value 1600

输入w 保存并退出

Command (m for help):w

The partition table has been altered.

Calling ioctl() to re-read partition table

fdisk -l

即可看到增加的分区

注:保存以后会出现如下警告,可忽略,不影响结果。

fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

eMMC增加分区方法二(相对容易操作)

修改烧写工具中的mksdcard.sh,路径:mfgtools\Profiles\Linux\OS Firmware例如:

修改完成后重新烧写

在终端输入fdisk –l出现如下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值