homehowtokbslinksaboutcontactprojectsmusic

Index > Knowledge Base > Wimtools in Linux
Install wimtools
Create WinPE in Linux
Ghost via WinPE

Install wimtools

Add wimtools repository
cat << eot >> /etc/apt/sources.list
################### Wimtools #########################
deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/ precise main
deb-src http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/ precise main
eot
run updates
apt-get update
if you dont get error then you can go to last step and install wimtools, but if you get error of public key not available and the key then search key and add it manually
add key manuallyEnter the key below pre-pending 0x to it and click search
copy the the key displayed starting from -----BEGIN PGP PUBLIC KEY BLOCK----- and ending at -----END PGP PUBLIC KEY BLOCK-----
create a key file
nano key
paste the key, save file, and exit
now add that key, if you see OK then all is well and you can proceed.
sudo apt-key add key
now run update
apt-get update

reference to add key manually
now simple run the update again and install the wimtools
apt-get update; apt-get install wimtools -y
capture image
wimcapture /dev/sda1 install.wim "Win7 Dev" --check 
apply image
mkntfs /dev/sda1 && wimapply install.wim 1 /dev/sda1
backup and restore MBRs, reference
dd if=/dev/sda of=/mbr.bin bs=446 count=1
dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1
Go up

Create WinPE in Linux

goto home directory (~), make folder waik and mount waik iso to it
cd ~; mkdir waik; mount -o loop waik.iso wiak
make winpe image out of waik mounted folder
mkwinpeimg --waik-dir=waik winpe.img
unmount waik iso image
umount waik
mount winpe.img to make changes to it
mkdir mnt; mount -o loop winpe.img mnt
make changes to boot.wim file
cd mnt/sources; mkdir mnt; wimmountrw boot.wim mnt
now you can go to mnt directory and see all winpe folders/files, make changes where needed
umount the boot.wim by commiting the changes, VERY IMPORTANT !
wimunmount --commit mnt
go to home directory (~)
cd ~; umount mnt
now copy the new winpe.img to tftp server and enjoy install tool to make winpe from wiak mounted iso
apt install cabextract
now make winpe
mkwinpeimg --iso --waik-dir=waik winpe.iso

Go up

Ghost via WinPE

download image
ghost32.exe -clone,mode=restore,src=image.gho,dst=1 -sure -batch
Switches
-sure, auto confirm
-blind, console mode
-batch, suppress warning/error messages