使用工具 poweriso
工具主页 http://www.poweriso.com/download-poweriso-command-line-utility-for-linux.htm
虽然不是开源的,但很好用,推荐给大家。
curl -o - http://www.poweriso.com/poweriso-1.5.tar.gz | tar zxvf - -C /usr/local/bin
用法
poweriso extract /iso/path / -od /extract/path
例子
下载并解压 CentOS7 镜像
curl -o CentOS-7-x86_64-Minimal-2009.iso curl -o CentOS-7-x86_64-Minimal-2009.iso https://mirrors.ustc.edu.cn/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso
poweriso extract CentOS-7-x86_64-Minimal-2009.iso / -od /root/workspace/iso_file
CentOS-7-x86_64-Minimal-2009.iso