Jump to content

How to boot from any image inside boot.wim


Recommended Posts

Posted

For those interested in the details, it can be found here; http://forum.sanbarrow.com/viewtopic.php?f=85&t=15

The point is to modify bootmgr so that the wim header gets patched in memory after it is read by bootmgr. It is a proof of concept, and not very elegant. It is required to know your target wim and the images inside it. When you know that, you can put the magic bytes inside menu.lst and map bootmgr to the rd device and patch it there. Well, read the thread and get the details.

The point is it is possible to boot off any image inside your wim. It does not have to be specified as the boot image in the wim header.

Joakim


Posted (edited)

The point is to modify bootmgr so that the wim header gets patched in memory after it is read by bootmgr. It is a proof of concept, and not very elegant. It is required to know your target wim and the images inside it. When you know that, you can put the magic bytes inside menu.lst and map bootmgr to the rd device and patch it there. Well, read the thread and get the details.

VERY nice. :thumbup

Some details about the uncompressed BOOTMGR and if a given version is needed may be of help so that other people can experiment with your findings..... :)

Just for the record, your post is on sanbarrow's "new" board

http://forum.sanbarrow.com/index.php

but previous posts/topics are on the "old" board here ;):

http://sanbarrow.com/phpBB2/index.php

jaclaz

Edited by jaclaz
Posted

Here's the link to the thread where information can be found on how to get uncompressed bootmgr; http://sanbarrow.com/phpBB2/viewtopic.php?t=1696 If you for some reason want to experiment with decompressing/recompressing the original, you will also find a post there with a link to a tool that can do so. Basically you just grab bootmgr.exe (otherwise known as pxe version) remove some unneded bytes to reduce its size and attach an older vista sp0 stub. Oh and you will need to patch some integrity checks as well so that the modified bootmgr will load without complaints. That is 1 checksum check in the stub as well as the selfintegrity check in bootmgr (validating the digital certificate). There's many ways to solve this, but the one I'm currently using is by patching in two nops (9090) at VA 421EC5.

Joakim

Posted

The referenced thread (first post) now contains complete descriptions with lots of details, as well as my sample menu.lst covering 4 different images. I would say it's now a fully working solution.

Joakim

Posted

The referenced thread (first post) now contains complete descriptions with lots of details, as well as my sample menu.lst covering 4 different images. I would say it's now a fully working solution.

:thumbup

jaclaz

Posted (edited)

Just to keep things as together as possible :):

http://www.boot-land.net/forums/index.php?showtopic=8043&st=131

http://sites.google.com/site/rmprepusb/tutorials/multi_boot-wim

It is possible to have 4 different boot.wim files (say Vista x86, Vista amd64, Win 7 x86 and Win 7 amd64) all on the same USB drive and a grub4dos menu.lst menu file that will allow you to boot to any one of them (see tutorial #2). However, wouldn't it be nice if you could combine these four boot.wim files into one single boot.wim that contains four images? Well some very clever people have now made this possible. This tutorial assumes you know how to use ImageX and have a number of boot.wim files that you want to combine into one boot.wim file. It is taken from this post by joakim and uses a great tool made by JFX - all credit to these guys!

:thumbup

jaclaz

Edited by jaclaz
  • 2 months later...
Posted (edited)

hello

tell me please, how i can modify wimpatched to use multiple bcd (as here http://sites.google.com/site/rmprepusb/tutorials/how-to-create-a-usb-drive-that-will-install-vista-win7-and-server-2008 )

it does not work with Windows 7 (SP0/SP1) ((

zbootmgr http://img209.imageshack.us/img209/419/screenshot20110125001.png

original bootmgr also not supported

I want to do this:

grub -> menu.lst -> wimpatched1 -> \boot\bc1 ...

grub -> menu.lst -> wimpatched2 -> \boot\bc2 ...

Edited by CtrlSoft
Posted

It should be even easier with my custom version as it is not compressed, unlike the original bootmgr. The tools you refer to in that referenced thread will thus not work on my version as the offsets are hardcode in the program. Since I don't have the file at hand at the moment, I can't really say at which offset you must modify. But I will get back to it. Otherwise, just open the file in a hexeditor and search for the string boot\bcd for which you can modify to your likes. I've tried paths like 1\a\2\b with success in the past, which means you are not restricted to the boot folder.

Joakim

Posted

it does not work with Windows 7 (SP0/SP1) ((

zbootmgr http://img209.imageshack.us/img209/419/screenshot20110125001.png

original bootmgr also not supported

Well that bootmgr BCD changer ONLY support original bootmgr files.

CRC of bootmgr from Windows 7 SP0 is: EE471B58, if your's if different from this, it's not original or not a RTM version.

SP1, hmm it's not released and therefore not supported.

As joakim said just search the string in the modify wimpatched one and adjust it to your like.

Posted (edited)

please tell me how to add sata drives support to my menu?

I tried the following but not working:

i cdrom --add-io-ports=0xE800EA00
cdrom --init

cdrom --add-io-ports=0xEA00E800
cdrom --init

menu.lst:

timeout 20
default 0
gfxmenu /boot/splash.gz
color light-gray/black yellow/green light-cyan/black light-green/black

title [1] Boot from HDD
find --set-root --ignore-floppies --ignore-cd /bootmgr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr

title [2] Microsoft Windows 7 Ultimate x86 >>
root (cd)
configfile /boot/x86.lst

title [3] Microsoft Windows 7 Ultimate x64 >>
root (cd)
configfile /boot/x64.lst


title [4] Microsoft Windows Recovery Environment x86
map --mem /boot/wim86 (rd)
write --offset=0x654C4 (rd)+1 \x14\xAF\x0D\x00
write --offset=0x654CC (rd)+1 \x6E\x9F\x14\x0B
write --offset=0x654D4 (rd)+1 \xA8\x1B\x44\x00
write --offset=0x654DC (rd)+1 \x06\x00\x00\x00
chainloader (rd)+1
root ()

title [5] Microsoft Windows Recovery Environment x64
map --mem /boot/wim64 (rd)
map --hook
write --offset=0x654C4 (rd)+1 \xD6\xE0\x0D\x00
write --offset=0x654CC (rd)+1 \xD5\x21\x7F\x0C
write --offset=0x654D4 (rd)+1 \x08\xDF\x45\x00
write --offset=0x654DC (rd)+1 \x06\x00\x00\x00
chainloader (rd)+1
root ()

title [6] Acronis Disk Director Home
find --set-root /boot/ADDH.iso
map --mem /boot/ADDH.iso (hd32)
map --hook
chainloader (hd32)
boot

title [7] Acronis True Image Home
find --set-root /boot/ATIH.iso
map --mem /boot/ATIH.iso (hd32)
map --hook
chainloader (hd32)
boot

thx

Edited by CtrlSoft

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...