linux查看emmc分区信息(10种方法 )

目录

## 1 emmc

## 2 uboot查看

## 3 kernel查看

方法1 

方法2

方法3

方法4

方法5

方法6

方法7

方法8

方法9

方法10


## 1 emmc

我们要说的是,User Data Partition中的再分区

可简化为

## 2 uboot查看

u-boot=> mmc partPartition Map for MMC device 2  --   Partition Type: DOSPart    Start Sector    Num Sectors     UUID            Type1     16384           131072          3bb27e95-01     0c2     1835008         28942336        3bb27e95-02     833     147456          98304           3bb27e95-03     834     245760          1589248         3bb27e95-04     0f Extd5     245762          16382           3bb27e95-05     836     262146          1572862         3bb27e95-06     83

## 3 kernel查看

方法1 

/proc/partitions 

root@xboard:~# cat /proc/partitions 
major minor  #blocks  name31        0       8192 mtdblock0179        0   15388672 mmcblk2179        1      65536 mmcblk2p1179        2   14471168 mmcblk2p2179        3      49152 mmcblk2p3179        4          1 mmcblk2p4179        5       8191 mmcblk2p5179        6     786431 mmcblk2p6179       96   31154688 mmcblk1179       97      65536 mmcblk1p1179       98   31080960 mmcblk1p2

方法2

/dev/block

root@xboard:~# ls -l /dev/block/  
total 0
lrwxrwxrwx 1 root root 10 May 13  2022 179:0 -> ../mmcblk2
lrwxrwxrwx 1 root root 12 Aug 31  2023 179:1 -> ../mmcblk2p1
lrwxrwxrwx 1 root root 12 May 13  2022 179:2 -> ../mmcblk2p2
lrwxrwxrwx 1 root root 12 May 13  2022 179:3 -> ../mmcblk2p3
lrwxrwxrwx 1 root root 15 May 13  2022 179:32 -> ../mmcblk2boot0
lrwxrwxrwx 1 root root 12 May 13  2022 179:4 -> ../mmcblk2p4
lrwxrwxrwx 1 root root 12 May 13  2022 179:5 -> ../mmcblk2p5
lrwxrwxrwx 1 root root 12 May 13  2022 179:6 -> ../mmcblk2p6
lrwxrwxrwx 1 root root 15 May 13  2022 179:64 -> ../mmcblk2boot1
lrwxrwxrwx 1 root root 10 May 13  2022 179:96 -> ../mmcblk1
lrwxrwxrwx 1 root root 12 Aug 31  2023 179:97 -> ../mmcblk1p1
lrwxrwxrwx 1 root root 12 Aug 31  2023 179:98 -> ../mmcblk1p2
lrwxrwxrwx 1 root root 12 May 13  2022 31:0 -> ../mtdblock0
lrwxrwxrwx 1 root root  8 May 13  2022 7:0 -> ../loop0
lrwxrwxrwx 1 root root  8 May 13  2022 7:1 -> ../loop1
lrwxrwxrwx 1 root root  8 May 13  2022 7:2 -> ../loop2
lrwxrwxrwx 1 root root  8 May 13  2022 7:3 -> ../loop3
lrwxrwxrwx 1 root root  8 May 13  2022 7:4 -> ../loop4
lrwxrwxrwx 1 root root  8 May 13  2022 7:5 -> ../loop5
lrwxrwxrwx 1 root root  8 May 13  2022 7:6 -> ../loop6
lrwxrwxrwx 1 root root  8 May 13  2022 7:7 -> ../loop7

root@xboard:~# ls -al /dev/block/179* 
lrwxrwxrwx 1 root root 10 May 13  2022 /dev/block/179:0 -> ../mmcblk2
lrwxrwxrwx 1 root root 12 Aug 31  2023 /dev/block/179:1 -> ../mmcblk2p1
lrwxrwxrwx 1 root root 12 May 13  2022 /dev/block/179:2 -> ../mmcblk2p2
lrwxrwxrwx 1 root root 12 May 13  2022 /dev/block/179:3 -> ../mmcblk2p3
lrwxrwxrwx 1 root root 15 May 13  2022 /dev/block/179:32 -> ../mmcblk2boot0
lrwxrwxrwx 1 root root 12 May 13  2022 /dev/block/179:4 -> ../mmcblk2p4
lrwxrwxrwx 1 root root 12 May 13  2022 /dev/block/179:5 -> ../mmcblk2p5
lrwxrwxrwx 1 root root 12 May 13  2022 /dev/block/179:6 -> ../mmcblk2p6
lrwxrwxrwx 1 root root 15 May 13  2022 /dev/block/179:64 -> ../mmcblk2boot1
lrwxrwxrwx 1 root root 10 May 13  2022 /dev/block/179:96 -> ../mmcblk1
lrwxrwxrwx 1 root root 12 Aug 31  2023 /dev/block/179:97 -> ../mmcblk1p1
lrwxrwxrwx 1 root root 12 Aug 31  2023 /dev/block/179:98 -> ../mmcblk1p2

方法3

mount

cat /proc/mounts

root@xboard:~# mount
/dev/mmcblk2p2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=667872k,nr_inodes=166968,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/mmcblk2p6 on /cache type ext4 (rw,nosuid,nodev,relatime)
/dev/mmcblk2p5 on /run/media/mmcblk2p5 type ext2 (rw,relatime,errors=continue)
/dev/mmcblk1p1 on /run/media/mmcblk1p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk2p1 on /run/media/mmcblk2p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk1p2 on /run/media/mmcblk1p2 type ext4 (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=199396k,mode=700)

方法4

dmesg

方法5

fdisk 

root@xboard:~# fdisk -l /dev/mmcblk2
Disk /dev/mmcblk2: 14.69 GiB, 15758000128 bytes, 30777344 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: 0x3bb27e95Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk2p1        16384   147455   131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk2p2      1835008 30777343 28942336 13.8G 83 Linux
/dev/mmcblk2p3       147456   245759    98304   48M 83 Linux
/dev/mmcblk2p4       245760  1835007  1589248  776M  f W95 Ext'd (LBA)
/dev/mmcblk2p5       245762   262143    16382    8M 83 Linux
/dev/mmcblk2p6       262146  1835007  1572862  768M 83 LinuxPartition table entries are not in disk order.

类似的命令还有sfdisk

root@xboard:~# sfdisk -l /dev/mmcblk2
Disk /dev/mmcblk2: 14.69 GiB, 15758000128 bytes, 30777344 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: 0x3bb27e95Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk2p1        16384   147455   131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk2p2      1835008 30777343 28942336 13.8G 83 Linux
/dev/mmcblk2p3       147456   245759    98304   48M 83 Linux
/dev/mmcblk2p4       245760  1835007  1589248  776M  f W95 Ext'd (LBA)
/dev/mmcblk2p5       245762   262143    16382    8M 83 Linux
/dev/mmcblk2p6       262146  1835007  1572862  768M 83 LinuxPartition table entries are not in disk order.

方法6

sys/class/block

root@xboard:/sys/class/block# ll
total 0
lrwxrwxrwx 1 root root 0 May 13  2022 loop0 -> ../../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 May 13  2022 loop1 -> ../../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 May 13  2022 loop2 -> ../../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 May 13  2022 loop3 -> ../../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 May 13  2022 loop4 -> ../../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 May 13  2022 loop5 -> ../../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 May 13  2022 loop6 -> ../../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 May 13  2022 loop7 -> ../../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk1 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b50000.mmc/mmc_host/mmc1/mmc1:59b4/block/mmcblk1
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk1p1 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b50000.mmc/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p1
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk1p2 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b50000.mmc/mmc_host/mmc1/mmc1:59b4/block/mmcblk1/mmcblk1p2
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2boot0 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2boot0
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2boot1 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2boot1
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p1 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p1
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p2 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p2
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p3 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p3
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p4 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p4
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p5 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p5
lrwxrwxrwx 1 root root 0 May 13  2022 mmcblk2p6 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30b60000.mmc/mmc_host/mmc2/mmc2:0001/block/mmcblk2/mmcblk2p6
lrwxrwxrwx 1 root root 0 May 13  2022 mtdblock0 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30bb0000.spi/spi_master/spi3/spi3.0/mtd/mtd0/mtdblock0

方法7

root@xboard:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mtdblock0     31:0    0    8M  0 disk 
mmcblk2      179:0    0 14.7G  0 disk 
|-mmcblk2p1  179:1    0   64M  0 part /run/media/mmcblk2p1
|-mmcblk2p2  179:2    0 13.8G  0 part /
|-mmcblk2p3  179:3    0   48M  0 part 
|-mmcblk2p4  179:4    0    1K  0 part 
|-mmcblk2p5  179:5    0    8M  0 part /run/media/mmcblk2p5
`-mmcblk2p6  179:6    0  768M  0 part /cache
mmcblk2boot0 179:32   0    4M  1 disk 
mmcblk2boot1 179:64   0    4M  1 disk 
mmcblk1      179:96   0 29.7G  0 disk 
|-mmcblk1p1  179:97   0   64M  0 part /run/media/mmcblk1p1
`-mmcblk1p2  179:98   0 29.7G  0 part /run/media/mmcblk1p

方法8

sudo apt install hwinfo
 

root@xboard:$ hwinfo --disk
49: SCSI 2000.0: 10600 Disk                                     [Created at block.245]Unique ID: R7kM.nTPZhtpisM9Parent ID: 37TO.741NuwlerHDSysFS ID: /class/block/sdaSysFS BusID: 32:0:0:0SysFS Device Link: /devices/pci0000:00/0000:00:10.0/host32/target32:0:0/32:0:0:0Hardware Class: diskModel: "VMware Virtual S"Vendor: "VMware,"Device: "VMware Virtual S"Revision: "1.0"Driver: "mptspi", "sd"Driver Modules: "mptspi"Device File: /dev/sda (/dev/sg1)Device Files: /dev/sda, /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0Device Number: block 8:0-8:15 (char 21:1)BIOS id: 0x80Drive status: no mediumConfig Status: cfg=new, avail=yes, need=no, active=unknownAttached to: #7 (SCSI storage controller)

方法9

lshw 

root@xboard:$ sudo lshw -class disk*-disk                    description: SCSI Diskproduct: VMware Virtual Svendor: VMware,physical id: 0.0.0bus info: scsi@32:0.0.0logical name: /dev/sdaversion: 1.0size: 100GiB (107GB)capabilities: 7200rpm partitioned partitioned:dosconfiguration: ansiversion=2 logicalsectorsize=512 sectorsize=512 signature=e51a4690*-cdromdescription: DVD-RAM writerproduct: VMware SATA CD01vendor: NECVMWarphysical id: 0.0.0bus info: scsi@3:0.0.0logical name: /dev/cdromlogical name: /dev/cdrwlogical name: /dev/dvdlogical name: /dev/sr0version: 1.00capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ramconfiguration: ansiversion=5 status=open

方法10

root@xboard:$ sudo parted -l
Model: ATA WDC WD10EZEX-75W (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: Number  Start   End     Size    File system  Name                  Flags1      1049kB  538MB   537MB   fat32        EFI System Partition  boot, esp2      538MB   1000GB  1000GB  ext4

## 4 参考

【1】eMMC深入浅出 第二章 eMMC结构 第二节 分区以及存储区域 - 知乎

【2】eMMC(二)——分区管理_emmc gpt分区-CSDN博客

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/224843.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

(Linux2.6内核)进程调度队列与切换

个人主页:Lei宝啊 愿所有美好如期而遇 我们首先来了解几个概念 1. 进程在CPU上运行的时候,一定要运行完才行吗?答案是否定的,我们大部分的操作系统,主流就是分时操作系统,即基于时间片进程轮转执行的。 …

Ubuntu18.04磁盘取证-中难度篇

涉及的镜像文件: sdb.vhd uac.tar ubuntu.20211208.mem 需要利用的工具: volatility3 volatility2.6.1 FTK/Autopsy Strings 题干 容器是一个Ubuntu Linux 蜜罐,用来观察利用 CVE-2021-41773 的漏洞攻击者想要做什么。 您将看到一个 cr…

SIT65HVD75,可替代SN65HVD75,3.0~5.5V 供电,ESD 15kV HBM,20Mbps 半双工 RS485/RS422 收发器

SIT65HVD75 是一款 3.0V~5.5V 电源供电、总线端口 ESD 保护能力 HBM 达到 15kV 以上、 总线耐压范围达到 15V 、半双工、低功耗,功能完全满足 TIA/EIA-485 标准要求的 RS-485 收发 器。 SIT65HVD75 包括一个驱动器和一个接收器,两者均可…

【Java学习笔记】72 - 满汉楼 - 餐饮管理系统

项目代码 https://github.com/yinhai1114/Java_Learning_Code/tree/main/IDEA_Chapter26 一、需求说明 满汉楼项目功能多,界面复杂,涉及到复杂的awt和swing技术和事件编程,做如下调整: 1.去掉界面和事件处理(工作中使用很少),使…

小程序如何进行版本回退

当商家决定回退小程序版本时,可能是因为新版本出现了一些问题或者不符合预期,需要恢复到之前的稳定版本。下面具体介绍怎么回退小程序的版本。 在小程序管理员后台->版本设置处,点击版本回退。确认后,小程序会回退到上一次的版…

视频封面:视频图片提取技巧,从指定时长中捕捉需求的图片

在当今的数字时代,视频已成为日常生活中不可或缺的一部分。无论是社交媒体、博客,视频都发挥着重要的作用。而一个吸引的视频封面往往能吸引更多的观众点击观看,选择清晰度高、色彩鲜艳且能吸引人的图片。同时,确保图片与视频内容…

零基础可以学编程吗,不懂英语怎么学编程,中文编程工具实例

零基础可以学编程吗,不懂英语怎么学编程,中文编程工具实例 上图是中文编程工具界面、标尺实例。 给大家分享一款中文编程工具,零基础轻松学编程,不需英语基础,编程工具可下载。 这款工具不但可以连接部分硬件&#x…

【jupyter notebook中插件 nbextensions 安装失败分析与解决方法】

文章目录 问题描述分析与解决总结 问题描述 一开始在安装 notebook 中的插件 nbextensions 时根本没有注意到版本的适配问题,都是进行默认的安装,结果安装是最新版本的 notebook7.x,恰好 notebook7.x 版本不再适应插件 nbextensions&#xf…

机器学习——多元线性回归升维

机器学习升维 升维使用sklearn库实现特征升维实现天猫年度销量预测实现中国人寿保险预测 升维 定义:将原始的数据表示从低维空间映射到高维空间。在线性回归中,升维通常是通过引入额外的特征来实现的,目的是为了更好地捕捉数据的复杂性&#…

西工大网络空间安全学院计算机系统基础实验零

首先,下载VMware17 Pro workstation。为什么要下载VMware17 Pro workstation呢?因为计算机系统基础实验有四个大部分:利用位运算实现诸如a*b,a/b,a*(2^4)等运算;C语言循环语句、switch语句等语句与汇编代码…

djangorestframework modelserializer 处理关系字段

djangorestframework modelserializer 处理关系字段 1.关系 一对一、多对一、多对多 2.drf modelserializer对关系字段的处理 modelserializer默认处理关系字段为PrimaryKeyRelatedField,默认是id-pk。 多对一:直接写入id 多对多:写入id-lis…

选择aspera替代方案的理由,有哪些aspera替代方案

Aspera是一种快速数据传输协议和工具,它使用高效的UDP协议和复杂的流控制算法来实现可靠、高速的数据传输。该协议和工具广泛应用于媒体和娱乐行业、金融服务和其他需要大规模数据传输的领域。然而,Aspera的高昂价格和限制性许可证可能使得某些企业寻找替…