Showing posts with label Windows PE. Show all posts
Showing posts with label Windows PE. Show all posts

2019-10-07

如何啟動 "Acronis TrueImage PE and ISO" in UEFI mode with grub2

source from : [分享] Acronis TrueImage 2019, 2018, 2017, 2016 PE and ISO; Acronis Backup 11.7 PE

I was make new version Acronis True Image 2018, 2017, 2016 PE and ISO
You can boot in UEFI mode with grub2. Use this code in menu

menuentry "Acronis True Image Home 2018 ISO" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati18cn.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop,msdos1)/dat10.dat lang=zh_CN quiet force_modules=usbhid
initrd (loop,msdos1)/dat11.dat (loop,msdos1)/dat12.dat
boot
}
menuentry "Acronis True Image Home 2018 ISO ElTorito" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati18cn.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)232+224000
#ls (ElTorito)/
linux (ElTorito)/dat10.dat lang=zh_CN quiet force_modules=usbhid
initrd (ElTorito)/dat11.dat (ElTorito)/dat12.dat
boot
}

menuentry "Acronis True Image Home 2017 ISO" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati17cn.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop,msdos1)/dat10.dat lang=zh_CN quiet force_modules=usbhid
initrd (loop,msdos1)/dat11.dat (loop,msdos1)/dat12.dat
boot
}
menuentry "Acronis True Image Home 2017 ISO ElTorito" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati17cn.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)232+208000
#ls (ElTorito)/
linux (ElTorito)/dat10.dat lang=zh_CN quiet force_modules=usbhid
initrd (ElTorito)/dat11.dat (ElTorito)/dat12.dat
boot
}

menuentry "Acronis True Image Home 2016 ISO ElTorito" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati16.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)232+184000
#ls (ElTorito)/
linux (ElTorito)/dat10.dat lang=13 quiet force_modules=usbhid
initrd (ElTorito)/dat11.dat (ElTorito)/dat12.dat
boot
}

menuentry "Acronis True Image Home 2016 ISO" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/ati16.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop,msdos1)/dat10.dat lang=13 quiet force_modules=usbhid
initrd (loop,msdos1)/dat11.dat (loop,msdos1)/dat12.dat
boot
}

menuentry "Acronis True Image Home 2016 - Extract ISO" {
linux /acronis/dat10.dat lang=13 vga=791 mbrcrcs=on quiet force_modules=usbhid
initrd /acronis/dat11.dat /acronis/dat12.dat
boot
}

menuentry "Acronis Disk Director Home 12 ISO ElTorito" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/add12.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)220+161792
#ls (ElTorito)/
linux (ElTorito)/dat5.dat quiet
initrd (ElTorito)/dat4.dat
boot
}

menuentry "Acronis Backup Advanced 11.7" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/abr11cn.iso"
search --set -f $isofile
loopback loop $isofile
loopback ElTorito (loop)228+368000
#ls (ElTorito)/
linux (ElTorito)/abr64ker.dat product=bootagent media_for_windows quiet
initrd (ElTorito)/abr64ram.dat (ElTorito)/dat8.dat
boot
}

menuentry "Acronis Snap Deploy 5 Standalone Utility" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/asd5s.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)208+154000
#ls (ElTorito)/
linux (ElTorito)/dat4.dat quiet
initrd (ElTorito)/dat5.dat
boot
}

menuentry "Acronis Snap Deploy 5 Master Image Creator" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/asd5m.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)208+146000
#ls (ElTorito)/
linux (ElTorito)/dat8.dat quiet
initrd (ElTorito)/dat9.dat
boot
}

menuentry "Acronis Snap Deploy 5 Agent" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/iso/asd5a.iso"
search --set -f $isofile
loopback loop $isofile
echo mount the El Torito floppy image
loopback ElTorito (loop)208+148000
#ls (ElTorito)/
linux (ElTorito)/dat16.dat quiet
initrd (ElTorito)/dat17.dat
boot
}

=======================================================================
Multi Language code (for version 2017)
- PE : Change value language=en to region code (zh_CN only need zh...)

- ISO: Use region code (can found when change region from acronis website)
Edit file BOOTIA32.XML, BOOTX64.XML;
Arguments=" lang=zh_CN; quiet"

BOOTWIZ.CFG
KERNEL dat10.dat lang=zh_CN force_modules=usbhid quiet

=======================================================================
Multi Language code (for version 2016) (thanks waterchu for ideas)
- PE
REG.exe Add HKLM\Software\Acronis /f /v "language" /T REG_DWORD /D "13"
...............DWORD.............
1-ENGLISH; 11-BRAZIL; 13-CHINESE; 14-CHINESET; 8-CZECH; 6-DUTCH; 27-ESPANA; 2-GERMAN; 25-INDIAN; 15-ITALIAN; 9-JAPAN; 3-KOREAN; 5-POLISH; 19-PORTUGUESE; 0-RUSSIAN; 12-SPANISH; 17-FRENCH

- ISO: Edit file BOOTIA32.XML, BOOTX64.XML;
Arguments=" lang=13; quiet"

BOOTWIZ.CFG
KERNEL dat10.dat lang=13 force_modules=usbhid quiet

If Extract ISO and boot with Grub4dos

title Acronis True Image 2016
find --set-root --ignore-floppies --ignore-cd /acronis/dat10.dat
kernel /acronis/dat10.dat lang=13 vga=791 mbrcrcs=on force_modules=usbhid quiet
initrd /acronis/dat11.dat /acronis/dat12.dat

If try with Recovery Manager (F11), only need extract folder Recovery Manager from original ISO
..........Grub2 (Boot with grub2 can use Recovery Manager)
menuentry "Acronis True Image Home 2016 - F11" {
linux /Recovery\ Manager/kernel64.dat lang=13 vga=791 mbrcrcs=on force_modules=usbhid quiet
initrd /Recovery\ Manager/ramdisk_merged64.dat /Recovery\ Manager/DAT12.DAT
boot
}
....................Grub4dos............
title Acronis True Image Home 2016 - F11
find --set-root --ignore-floppies --ignore-cd /Recovery\ Manager/kernel.dat
kernel /Recovery\ Manager/kernel64.dat lang=13 vga=791 mbrcrcs=on force_modules=usbhid quiet
initrd /Recovery\ Manager/ramdisk_merged64.dat /Recovery\ Manager/DAT12.DAT

========================== ?????????????????????? ==========================
For old acronis version, need replace new driver (Snapapi64.dll only for Acronis True Image 2015, Disk Director 2012x64 - delete old snapapi.dll, copy and rename snapapi64.dll to snapapi.dll)
http://pan.baidu.com/s/1kTD8Jnp

If you try use on real system, try to uninstall driver first. If 64bit, use Fltsrv64. Right Click on snapman_uninstall.inf, fltsrv_uninstall.inf and select Install. Also you can update snapman & Flisrv driver.
http://pan.baidu.com/s/1i3m80rN

First, Right Click on \Uninstall\fltsrv64\fltsrv_update.inf, update snapman & Flisrv driver.
Then, run CMD as administrator, run \ATIH2016_x64\acronis.cmd to install.

Finally, run \ATIH2016_x64\TrueImage.exe successfully.

感覺, 將 Acronis TrueImage 安裝在 Real System 會拖累系統效能, 而且麻煩. 似乎沒有破解的必要
我比較懶, 直接下載 Bootable iso 放到USB 救援工具, 再以 grub2/grub4dos 啟動
至於 bootable iso/PE 檔案產生的方法 : 使用網路上已經安裝並破解成功之後的 Acronis TrueImage, 執行 acronis->TrueImageHome->MediaBuilder.exe 便可取得

2019-10-02

winpe修改制作

指令及重要設定檔 (以 USBOX 4.0/Hiren's BootCD PE x64 為例)
以 7z.exe 打開 64pe.wim & tools.7z

- /boot/pe/64pe.wim/windows/system32/PECMD.exe
- /boot/pe/64pe.wim/windows/system32/PECMD.ini
- /tools/tools.7z/REGDOC.CMD
- /tools/tools.7z/TOOLS.ini
- .../windows/system32/startnet.cmd
- .../windows/system32/winpeshl.ini
- .../windows/system32/wpeinit.exe
- .../windows/system32/Win10PE.cfg ( for Hiren's BootCD PE x64 )

PECMD命令詳解 : part1, part2

2019-09-15

GImageX --- 修改 windows PE 檔 xxx.wim

感覺蠻好用的

Youtube 教學

官網

使用案例

wimlib:一個開源的類似imagex的處理wim神器,(由於imagex最新版識別不了wimboot和esd鏡像,早已經被微軟拋棄)沒有Dism的各種限制支持ESD直接導出為wimboot鏡像或常規壓縮的鏡像。

類似的軟件, 還有 wimtool, 但還是推薦使用 GImageX

2018-09-28

合併 PartedMagic 及 USBOX, 作為我的救援 USB 隨身碟 --- UEFI/Legacy 都適用

其中混和了四種 boot loader

PartedMagic 含有兩個 bootloader : syslinux (for BIOS boot mode) and grub2 (for UEFI boot mode)
USBOX 也含有兩個 bootloader : grub4dos (for BIOS mode) and bootmgfw.efi (for UEFI boot mode)

步驟如下 :

1. 使用 RMprepUSB 安裝 syslinux bootloader (LDLINUX.sys), 注意根目錄下隱藏檔 ldlinux.sys 是否存在, syslinuc.cfg 則原本就已在 PartedMagic 中 (/boot/syslinux/syslinux.cfg)
2. 將 PartedMagic.iso 使用 ultraiso.exe 抽離, 並存放到 暫存目錄中 (ex :/tmp/PM_2019/...)
3. 將 usbox.iso 使用 ultraiso.exe 抽離, 暫時放到暫存目錄中. (ex. /tmp/USBOX4/...)
4. 將 /tmp/USBOX4/efi/boot/bootia32.efi 及 /tmp/USBOX4/efi/boot/bootx64.efi, 移到 /tmp/USBOX4/efi/microsoft/boot 目錄下
5. 將 /tmp/USBOX4/efi/microsoft/boot/bootx64.efi 改名為 bootmgfw.efi
6. 將 /tmp/USBOX4/ 下的內容都拷貝到 /tmp/PM_2019/目錄中
7. 修改 /tmp/PM_2019/boot/grub/grub.cfg, 新增 :
   menuentry "10. UEFI USBOX" --unrestricted {
       chainloader /efi/microsoft/boot/bootmgfw.efi
   }
    USBOX UEFI mode 下, 直接啟動 WIN 10 PE
   grub.cfg 真的可以這樣直接修改嗎? 有更正式的方法嗎?
8. 下載 grub4dos, 將其中之 grub.exe 放在 /tmp/PM_2019/...目錄
9. 修改 /tmp/PM_2019/boot/syslinux/syslinux.cfg, 新增 :
   LABEL boot_usbox
   MENU LABEL ^8. boot_usbox
   TEXT HELP
   Boot USBOX
   ENDTEXT
   KERNEL /grub.exe
   USBOX BIOS mode 下, 搭配 menu.lst, 進入 Grub4DOS 選單

   更詳細的說明可參考 : "Chainload syslinux from grub4dos/grub/grub2 and vice versa"

10.  啟動 Acronic TrueImage << 參考此文
menuentry "A. Acronis TrueImage 2020 21400 ISO" {
set quiet=1
set gfxpayload=1024x768x32,1024x768
set mbrcrcs=on
set isofile="/My_ISOs/ATI21400.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop,msdos1)/dat10.dat lang=en quiet force_modules=usbhid
initrd (loop,msdos1)/dat11.dat (loop,msdos1)/dat12.dat
boot
}
11. 利用 Bootice 修改 usbox 所帶的 /efi/microsoft/boot/BCD, 新增其他 WIN PE
12. copy /tmp/PM_2019/... 到 usb
大致上, 就是如此

13. 以 bootice.exe 修改 USBOX4 /efi/microsoft/boot/BCD, 以便新增其他 PEs
14. USBOX4 /TOOLS/TOOLS.7z 內有一些好用的工具, 可以在 7z.exe 內很容易的自行新增或更新版本

最好對於 BCD ( Boot Configuration Data) 有些初淺的了解. 透過 editbcd 或 virtual BCD editor/EasyBCD/Bootice/WMI,  可稍微看一下其中的內容. 才會知道不同位置的 BCD 檔, 有何作用. 使用上, Bootice 個人覺得較為順手. 

有了以下的資料此想法才得以完成 : GRUB2配置文件"grub.cfg"詳解(GRUB2實戰手冊) by 作者:金步國

怕遺失, 我另存了一份在 google drive. 下載

另外, 不要將以製造好的 USB 備份倒硬盤, 再拷貝到其他 USB. 這樣會造成 windows 檔案總管的U盤名稱重複. (雖然還是可用, 但總覺得怪怪的)