当前位置: 首页 > news >正文

可以做商品砍价的网站wordpress 离线

可以做商品砍价的网站,wordpress 离线,北京 网站建设咨询顾问公司,网站设计公司 深圳龙华Yocto/OpenEmbedded使用的磁盘镜像格式是 wic。为嵌入式系统提供 bootable images。 The disk image format used in the Yocto Project is wic. .wic 文件显然只是一个带有分区表和分区的磁盘镜像,就像下载 Linux 发行版时获得的所有 .img 文件一样。这就是为什么你…

Yocto/OpenEmbedded使用的磁盘镜像格式是 wic。为嵌入式系统提供 bootable images。

The disk image format used in the Yocto Project is wic.

.wic 文件显然只是一个带有分区表和分区的磁盘镜像,就像下载 Linux 发行版时获得的所有 .img 文件一样。这就是为什么你可以使用 dd 命令烧写 .wic 文件,就像使用 .img 文件一样。

A .wic file is apparently just a disk image with a partition table and partitions, just like all the .img files you get when downloading e.g Linux distros. That's why you can flash a .wic file using dd just like you would with a .img file.

之所以使用 .wic 文件扩展名,是因为它是由 wic 工具创建的,该工具读取 .wks 文件中描述的分区布局,并生成带有相应分区的映像。有关 wic 工具的更多信息,请参阅: 19 Creating Partitioned Images Using Wic — The Yocto Project ® 5.0.1 documentation

The reason for the .wic file extension is simply that it's created by the wic tool, which reads a partition layout described in a .wks file and generates an image with the corresponding partitions. For more info on the wic tool, see:  19 Creating Partitioned Images Using Wic — The Yocto Project ® 5.0.1 documentation 

如何读取wic文件中的内容呢?

1,Mount the .wic File

将wic文件加载为loop device。

Automatically find an available loop device and associate it with a file.

$ sudo losetup -Pf --show my-image.wic

/dev/loop17

$ losetup --help

-a, --all                     list all used devices

-P, --partscan                create a partitioned loop device

-f, --find                    find first unused device

--show                    print device name after setup (with -f)

-d, --detach <loopdev>...     detach one or more devices

-D, --detach-all              detach all used devices

$ losetup -a

上面结果显示加载为/dev/loop17设备。

将设备名赋值给变量:

LOOP_DEVICE=$(sudo losetup -Pf --show my-image.wic)

2, List Partitions

使用fdisk命令,查看加载设备的分区信息

$ sudo fdisk -l /dev/loop17

Disk /dev/loop17: 7.11 GiB, 7638816768 bytes, 14919564 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: 0x076c4a2a

Device        Boot  Start      End  Sectors  Size Id Type

/dev/loop17p1 *     16384   186775   170392 83.2M  c W95 FAT32 (LBA)

/dev/loop17p2      196608 14919563 14722956    7G 83 Linux

3,Mount Partitions

sudo mount  /dev/loop17p1 mnt

4,Access Files

cd mnt

ls

5, Cleaning up

Unmount partitions:

sudo umount mnt

6, Detach the loop device

sudo losetup -d /dev/loop17


使用kpartx命令操作:

$ kpartx --help

-a add partition devmappings

-d del partition devmappings

-v verbose

-l list partitions devmappings that would be added by -a

$ sudo kpartx -av my-image.wic

[sudo] password for dev:

add map loop17p1 (252:0): 0 170392 linear 7:17 16384

add map loop17p2 (252:1): 0 14722956 linear 7:17 196608

$ sudo kpartx -l my-image.wic

loop17p1 : 0 170392 /dev/loop17 16384

loop17p2 : 0 14722956 /dev/loop17 196608

$ sudo kpartx -l /dev/loop17

loop17p1 : 0 170392 /dev/loop17 16384

loop17p2 : 0 14722956 /dev/loop17 196608

$ sudo fdisk -l /dev/loop17

Disk /dev/loop17: 7.11 GiB, 7638816768 bytes, 14919564 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: 0x076c4a2a

Device        Boot  Start      End  Sectors  Size Id Type

/dev/loop17p1 *     16384   186775   170392 83.2M  c W95 FAT32 (LBA)

/dev/loop17p2      196608 14919563 14722956    7G 83 Linux

$ ls /dev/mapper/

control  loop17p1  loop17p2

$ sudo mount /dev/mapper/loop17p2 mnt

$ sudo umount mnt

$ sudo kpartx -dv my-image.wic

del devmap : loop17p1

del devmap : loop17p2

loop deleted : /dev/loop17

$ sudo kpartx -dv /dev/loop17

del devmap : loop17p1

del devmap : loop17p2

参考:

linux - Difference between wic and hddimg format in yocto - Stack Overflow

http://www.sczhlp.com/news/84215/

相关文章:

  • 网站网站建设费进什么科目个人档案网站该怎么做
  • 用腾讯云做购物网站视频个性化定制网站
  • 3. pod的生命周期
  • 2. pod基础原理
  • OSI 七层协议 和四层协议
  • 4. pod使用进阶
  • 京东网站哪个公司做的用.net做网站好_还是用php
  • 建设网站首页应该采用郑州网站优化关键词
  • 电子商务网站备案wordpress 3d主题
  • 中国企业500强出炉百度关键词搜索引擎排名优化
  • 淘宝客网站开发平台wordpress教程阿里云
  • 网站模板有哪些wordpress手机验证免插件
  • 郑州微信网站wordpress nginx伪静态规则
  • 南宁伯才网络建站如何网络营销推广服务商
  • 企业网站排名软件能优化价格对比网站开发
  • MySQL存储过程
  • 罗氏线圈的 “磁场烦恼”:干扰并非无解,防护有章可循
  • 构造记一下
  • ARC058D 笔记
  • 网站开发诺亚科技小程序定制开发公司
  • 游学做的好的网站视频网站为什么有人做
  • 网站列表页怎么做的淘宝网站设计公司
  • 网站建设 销售 知乎汕头网站建设方案外包
  • 制作网站的过程细节做网站首页可以用传媒公司吗
  • 重庆市住房和城乡建设厅官方网站wordpress插件dx-seo
  • 网站建设套投标网站建设服务承诺
  • 做机械设备内销网站有哪些东莞证券官方网站
  • 咸阳城乡建设局网站怎么做一个网站推广
  • 网站 模块同一个服务器的网站做友情链接
  • SSE技术总结