【发布时间】:2015-05-05 21:36:41
【问题描述】:
建立在此处找到的问题: How to get the offset of a partition with a bash script? 关于将 awk、bash 和 parted 用于 GPT 分区
作为脚本语言的新手,我不确定是否以及如何构建现有请求。
我正在寻找由 parted 命令列出的特定分区。具体来说,我需要 ntfs 分区的起始扇区来在我的 bash 脚本中设置 mount 的偏移量。
root@workstation:/mnt/ewf2# parted ewf1 unit B p
Model: (file)
Disk /mnt/ewf2/ewf1: 256060514304B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1048576B 525336575B 524288000B fat32 EFI system partition boot
2 525336576B 659554303B 134217728B Microsoft reserved partition msftres
3 659554304B 256060162047B 255400607744B ntfs Basic data partition msftdata
【问题讨论】: