Page 1 of 2

Windows NT guest doesn't boot

Posted: 15. Jun 2009, 11:59
by Rolf Fankhauser
I'm trying to convert a physical pc with windows nt to a vm. I used a knoppix linux life-cd to convert the harddisk partitions with dd. Then I converted the images with VBoxManage to vdi format. In VirtualBox I built a vm and connected the virtual disks to the vm but when I start the vm I only see a black screen and a white cursor in the left top corner of the screen.

The original partition images seem to be ok. I can open them with WinImage and see all files. Is the mbr copied with dd or do I have to copy it separately? I intend to connect a Windows PE or Bart PE (as an ISO image) and boot on the cd in order to inspect the system. Other suggestions or help are very welcome!!

Regards, Rolf

Re: Windows NT guest doesn't boot

Posted: 15. Jun 2009, 12:37
by fixedwheel
linux life-cd to convert the harddisk partitions with dd.
what about bootsector, partition table?

Re: Windows NT guest doesn't boot

Posted: 15. Jun 2009, 17:58
by Rolf Fankhauser
I thought dd makes a bitwise copy of the disk. Do I have to copy bootsector and partition table separately? What tools can I use to do that? I think because the OS is NT I must use DOS FDISK /mbr to rewrite the MBR. I made from each partition (c:, d:, e:, f:, g: and h:) an image (I did not convert the whole disk in one image). I connected all these harddisks to the VirtualBox vm after converting them to vdi format.
I also tried to convert the physical machine with VMware Converter but I got an unexpected error after 97% of conversion. When I started this vm with VMware Player it booted but after the start of nt I got a blue screen of death.

Re: Windows NT guest doesn't boot

Posted: 15. Jun 2009, 20:23
by ppgrainbow
Rolf Fankhauser wrote:I'm trying to convert a physical pc with windows nt to a vm. I used a knoppix linux life-cd to convert the harddisk partitions with dd. Then I converted the images with VBoxManage to vdi format. In VirtualBox I built a vm and connected the virtual disks to the vm but when I start the vm I only see a black screen and a white cursor in the left top corner of the screen.

The original partition images seem to be ok. I can open them with WinImage and see all files. Is the mbr copied with dd or do I have to copy it separately? I intend to connect a Windows PE or Bart PE (as an ISO image) and boot on the cd in order to inspect the system. Other suggestions or help are very welcome!!

Regards, Rolf
What version of Windows NT are you using? Windows NT 3.51 or Windows NT 4.0?

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 10:05
by mister_playboy
If you have the install media, its's probably easier to copy the files you need and set up a fresh install in VB. I personally don't see the value of copying the whole HDD over. Windows runs best with a fresh install and a clean registry, anyway.

Just my opinion.

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 10:49
by Rolf Fankhauser
The reason to use this existing system is, that I have installed a lot of software (Delphi and C++Builder IDE's with third-party components). So, it would cost me some days to install all this stuff on a new machine. And to find all the licence keys for commercial products.... and even then I would not be sure that it works as before. Ok, the efforts to convert the existing system to a vm are already more than a day (without a result but I learned a lot....).

I work at two different places, so I thought it would be nice to convert this old pc with nt to a virtual machine that I can use on my new laptop.
Hope you see now my motivation to create this virtual machine.....
Of course clean registry is a good point.

The NT version is 4.0 SP6.

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 12:22
by fixedwheel
Rolf Fankhauser wrote:I thought dd makes a bitwise copy of the disk.
yes, you made bitwise copies of each partition
I made from each partition (c:, d:, e:, f:, g: and h:) an image (I did not convert the whole disk in one image). I connected all these harddisks to the VirtualBox vm after converting them to vdi format.
your partitions dont have a partition table, nor have your converted images - but each PC disk needs one except its a floppy

:arrow: dd the whole disk, that includes the partition table
or
:arrow: provide the partition image files (dd dump, not converted to VDI) via USB disk to a virtual machine (linux, e.g. live-CD ISO) from where (for each partition) you fdisk empty VDIs with the same C/H/S values as the original partition (only the first, probably c: will fit - the other ones you have to allocate one at least more cylinder) and dd the corresponding file from USB disk back into just prepared partition in the VDI. Then ntfsresize the partitions you gave more than the original was(*), and finally do some fdisk /MBR trick from a windows CD image booted within the virtual machine for the c: boot disk


(*)edit, of course you could/should give more cylinders to all partitions: fill up to max possible for each VDI and ntfsresize will take care
HTH

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 13:05
by vbox4me2
Why the hard way, clonezilla does it all in one go and supports dumping/loading from lan.

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 13:33
by fixedwheel
did not try clonezilla yet. The hard way is safe, with gparted e.g. its easy done having different C/H/S addressing schemes in the partition table before and after ...

Re: Windows NT guest doesn't boot

Posted: 16. Jun 2009, 18:10
by ppgrainbow
Rolf Fankhauser wrote:The NT version is 4.0 SP6.
Thanks for the info. :)

Re: Windows NT guest doesn't boot

Posted: 17. Jun 2009, 07:12
by Rolf Fankhauser
fixedwheel wrote:
:arrow: dd the whole disk, that includes the partition table
How can I dd the whole disk? When I used the Knoppix live-cd each windows partition (c: - h:) was mounted as hd[nn] (sorry, don't remember the exact names). I dd each hd[nn] to an image. So, how to dd the whole disk?

In the meantime I used the virtual disk created by vmware with VirtualBox. The system boots and tries to start Windows NT but then I get a blue screen. Same as with VMware player. Can I see from the VB log file what was going wrong?

Re: Windows NT guest doesn't boot

Posted: 17. Jun 2009, 10:41
by fixedwheel
How can I dd the whole disk? When I used the Knoppix live-cd each windows partition (c: - h:) was mounted as hd[nn]
the whole first disk is /dev/hda and the first partition on this disk is /dev/hda1 ... (second disk is /dev/hdb ...)

Code: Select all

dd if=/dev/hda of=foobar.img bs=1024k
dont forget to specify bs=... else dd reads/writes only 1byte at a time and runs endless long

note that besides /dev/hdx it is common to use /dev/sdx too (traditional: SCSI, SATA, USB and some distributions use /dev/sdx naming scheme for all disks)

Re: Windows NT guest doesn't boot

Posted: 19. Jun 2009, 15:27
by Rolf Fankhauser
Thanks for the info, fixedwheel !! I will try it. There is another problem: I copy the image to a usb harddisk formatted as FAT32. So, the maximal size of a file is 4 GB. The whole harddsik of the NT-PC is 10 GB. Can I split the image to multiple files using the dd command?
In the meantime I connected a linux rescue cd as iso-image to the vm. Then I could mount the virtual disks with ntfs-3g. When I inspected the contents of the start log with dmesg I saw the message that the disks contain no partition table. I connected disk c, d and e (which are in fact partitions of one disk) as IDE primary master, primary slave and secondary slave in VirtualBox. Linux only recognized the first two disks but as SCSI-disk sda and sdb. I could mount these disks with ntfs-3g and see all files on it.

Re: Windows NT guest doesn't boot

Posted: 19. Jun 2009, 17:06
by baf
To split it into 1GB chunks:
dd if=/dev/hda of=/whatever/your/usb/is bs=1024k count=1024 iseek=XXX
where XXX would be 0 1024 2048 .... until all pieces have been moved.

Re: Windows NT guest doesn't boot

Posted: 19. Jun 2009, 19:57
by Rolf Fankhauser
Thanks baf,

did you mean:

dd if=/dev/hda of=/mnt/usb/is1 bs=1024k count=1024 iseek=0
dd if=/dev/hda of=/mnt/usb/is2 bs=1024k count=1024 iseek=1024
dd if=/dev/hda of=/mnt/usb/is3 bs=1024k count=1024 iseek=2048

and so on..

Any idea how to convert these parts to vdi format? Do I have to merge the parts to one image and convert this image with VBoxManage to a vdi disk (I could do this on a ntfs disk on my laptop). Can I use the normal copy command to merge them? I have cygwin on my laptop, so I could also use linux to merge them. There is an undocumented Split2G parameter for VBoxManage convertfromraw. I guess that using this parameter will split the vdi disk in 2 GB parts.
Maybe it would be easier to reformat the usb harddisk with ntfs and dd the whole disk. Can I use dd to a ntfs formatted disk? If the live linux will recognize the ntfs disk it should be no problem, shouldn't it?