当前位置:   article > 正文

QNX EMMC 分区_qnx 有fdisk

qnx 有fdisk

                                                QNX---EMMC 分区 

      QNX EMMC 分区是通过fdisk实现的,其分区命令使用帮助信息如下:

  1. fdisk - create QNX disk partition (QNX)
  2. fdisk [-zf] [-B loader] drive [cmd [args]]
  3. Options:
  4. -z Zero the partition table (interactive mode only)
  5. -B loader Use filename 'loader' as the primary loader for the device.
  6. -f Force boot loader to be written on demand, even if it is
  7. impossible to save the old loader which had been on the disk.
  8. In non-interactive mode force "add" command to be actioned, even
  9. if this would involve over-writing an existing partition slot.
  10. Where:
  11. drive is the name of the disk (e.g. /dev/fd1, /dev/hd0)
  12. cmd is a mandatory command. Recognised commands are:
  13. add [args] Create a partition.
  14. delete [args] Delete partition(s).
  15. boot [args] Make partition bootable.
  16. query [args] Size in cylinders.
  17. loader Copy boot loader to disk.
  18. show Display partition table.
  19. info Show mount info for raw drive.
  20. Command Arguments:
  21. add [-s slot] [-e index] [-t type] [-b] [-c start,end] [-p percentage] [-l]
  22. Note that extended partition indices may change due to additions.
  23. Options:
  24. -s slot Slot in partition table to use (1..4, default is last free)
  25. -e index Index into the extended partition. (1..N)
  26. -t type Type of partition to be added (1 - 255, default is 77).
  27. -b Make added partition boot capable.
  28. -c start,end Pass the start and end cylinder for the partition to use.
  29. -n count Number of cylinders to allocate (extended partitions only)
  30. -p percent Percentage of the largest contiguous space the added
  31. partition should use, this option is ignored if the -c
  32. option is used (default is 100%)
  33. delete [-s slot] [-e index] [-t type] [-a]
  34. Note that extended partition indices may change due to deletions.
  35. Options:
  36. -s slot Delete partition in selected slot.
  37. -e index Index into the extended partition. (1..N)
  38. -t type Delete partition of selected type.
  39. -a Delete all partitions.
  40. boot [-s slot] [-e index] [-t type]
  41. Options:
  42. -s slot Boot partition in selected slot.
  43. -e index Index into the extended partition. (1..N)
  44. -t type Boot partition of selected type.
  45. type [-s slot] [-t type[,type2]]
  46. Options:
  47. -s slot Change type in selected slot.
  48. -t type[,type2] If slot is specified, only type is valid as the new type.
  49. If slot is not specified, both type and type2 are required,
  50. and change the selected type to type2.
  51. query [-s slot] [-e index] [-t type] [-f] [-T] [-l]
  52. Options:
  53. -s slot Query partition in selected slot.
  54. -e index Index into the extended partition. (1..N)
  55. -t type Query partition of selected type.
  56. -f Query total number of free cylinders.
  57. -T Query total number of cylinders.
  58. -l Change units from cylinders to blocks.

根据上述帮助信息,进行分区。

    首先查看设备/dev下是否挂在了EMMC设备,设备号为hd0,从上面我可以看到 已经分了四个区,分别是hd0t12,hd0t12.1,hd0t12.2,hd0t12.3;其中hd0t12 中的t12为文件系统类型,这里使用的是FAT32 。

    通过fdisk 查看我当前的分区,分类四个区,每一个区可以根据自己的需要设置不同的大小和文件类型,本分区的文件类型是t12 也就是当前的hd0t12。

下面我重新分区,先要删除所有分区,使用fdisk /dev/hd0 -a 命令删除,这时在查看分区删除后的状态为:

配置分区可以通过两种方式,一种直接输入fdisk /dev/hd0 ,类似于menuconfig,根据提示直接填入参数

    还有一种就是通过shell命令配置,QNX启动的时候根据你配置的命令顺序执行就行了,分完区后,通过mkdosfs 格式化后,mount挂在相应的分区就行了。

 

 

 

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/963978
推荐阅读
相关标签
  

闽ICP备14008679号