Centos安装wimtools

最近在折腾ipxe安装系统,iso里面获取系统的版本选择手动有点麻烦, 找了下wimlib实现dism的一些功能,

 记录一下wimtools源码安装记录.

fedora copr源安装

yum -y copr enable  nalika/wimtools
yum -y install wimtools 

 

官方网站https://wimlib.net/

安装前提需要准备好编译环境以及ntfs-3g-devel(自己想办法)

yum install fuse-devel git -y
git clone git://wimlib.net/wimlib
cd wimlib
./bootstrap
./configure

ln -s  /usr/local/bin/mkwinpeimg /usr/sbin/
ln -s  /usr/local/bin/wim* /usr/sbin/

 

安装好后在目录/usr/local/bin/下可以看到命令全部.

# ls /usr/local/bin/wim*
/usr/local/bin/wimappend   /usr/local/bin/wimextract     /usr/local/bin/wimoptimize
/usr/local/bin/wimapply    /usr/local/bin/wiminfo        /usr/local/bin/wimsplit
/usr/local/bin/wimcapture  /usr/local/bin/wimjoin        /usr/local/bin/wimunmount
/usr/local/bin/wimdelete   /usr/local/bin/wimlib-imagex  /usr/local/bin/wimupdate
/usr/local/bin/wimdir      /usr/local/bin/wimmount       /usr/local/bin/wimverify
/usr/local/bin/wimexport   /usr/local/bin/wimmountrw

 

使用示例:

# wiminfo   install.wim |grep "Display Name"
Display Name:           Windows Server 2019 Standard
Display Name:           Windows Server 2019 Standard (桌面体验)
Display Name:           Windows Server 2019 Datacenter
Display Name:           Windows Server 2019 Datacenter (桌面体验)

# wiminfo   windows2016/sources/install.wim |grep "Display Name"
Display Name:           Windows Server 2016 Standard
Display Name:           Windows Server 2016 Standard (桌面体验)
Display Name:           Windows Server 2016 Datacenter
Display Name:           Windows Server 2016 Datacenter (桌面体验)

 

 #wiminfo  sources/install.wim  | grep -vE "Boot|Description"|grep -A2 "Index:"|awk -F: '{print $2 }'|sed 's/[\t ]\+/ /g'
 1
 Windows Server 2016 SERVERSTANDARDCORE
 Windows Server 2016 Standard

 2
 Windows Server 2016 SERVERSTANDARD
 Windows Server 2016 Standard (桌面体验)

 3
 Windows Server 2016 SERVERDATACENTERCORE
 Windows Server 2016 Datacenter

 4
 Windows Server 2016 SERVERDATACENTER
 Windows Server 2016 Datacenter (桌面体验)

添加新评论 »