[virt-tools-list] windows7 bcd boot configuration

Itamar Reis Peixoto itamar at ispbrasil.com.br
Fri Jan 13 20:52:16 UTC 2012


On Fri, Jan 13, 2012 at 2:08 PM, Richard W.M. Jones <rjones at redhat.com> wrote:
> On Fri, Jan 13, 2012 at 11:12:33AM -0200, Itamar Reis Peixoto wrote:
>> I am trying to automate the deployment of  windows7 + fedora  using
>> anaconda / kickstart ( 100+ machines )
>>
>> in %pre section of anaconda kickstart I do this.
>>
>> wget --no-proxy -qO - http://192.168.7.254/itamar/web/windows7.img.gz
>> | gunzip -c | dd of=/dev/sda1 bs=64k
>> ntfsresize -f /dev/sda1 <<< y
>>
>> the image is  restored  well , but windows doesnt boot, ->
>
> With any particular error message?
>
> In any case the most likely problem is that you can't just unpack a
> Windows disk image into a partition and expect it to work.  You have
> to adjust a few bytes in the NTFS header to make it work, as
> virt-resize does:
>
> https://github.com/libguestfs/libguestfs/blob/master/resize/resize.ml#L1048
>
> The gory details are here:
>
> http://thestarman.pcministry.com/asm/mbr/NTFSBR.htm
>
> Rich.

the error message is
status: 0xc000000e
info: the boot selection failed because a required device is inaccessible.

can you help to strip out the code to run it standalone  ? ( I am not
a developer )


fo = open("/dev/sda1","r")
fo.seek(3)
str = fo.read(4)
print "Read String is |", str,"|"
fo.close()

after running it returns ->

Read String is | NTFS |



------------

Itamar Reis Peixoto
msn, google talk: itamar at ispbrasil.com.br




More information about the virt-tools-list mailing list