Status update: - I tried to fix my existing qemu-img converted partition with ntfsreloc, but even if my whole disk geometry is errorless according to testdisk now, and the 2 boot records function well, Windows shows a bluescreen after offering me safe mode, etc.
- so now I start fresh with Fajar's method, and some questions arise: /1/ make sure the XP image has IDE drivers installed: - the boot/OS disk is SCSI => maybe the IDE drivers are missing. - in VMWare Fusion, I created a 1GB IDE harddisk and the new IDE disk is formatted and working in WinXP => now the drivers should be ok
/2/ create a new virtual harddisk, partition it for windows and set the boot flag active - I suppose, that this step is done by following: - lvcreate -L25G -n domU-winxp vol0 [where vol0 is my volume group and 25G the size of the disk] - then run fdisk /dev/vol0/domU-winxp and a) create a dos partition table with the 'o' command, write changes to disk with 'w' b) but: when I try to create the windows partition with 'np1', the start sector cannot be chosen to be 63 but minimum must be 2048! I set the type to 0x07 with the 't' command and make it bootable with the 'a' command.
I get: Disk /dev/vol0/domU-winxp: 26.8 GB, 26843545600 bytes 255 heads, 63 sectors/track, 3263 cylinders, total 52428800 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd02fe7f2
Device Boot Start End Blocks Id System /dev/vol0/domU-winxp1 * 2048 52428799 26213376 7 HPFS/NTFS/exFAT
Then write the whole stuff with 'w' command. - I run 'partprobe /dev/vol0/domU-winxp' to sync the kernel to the new disk partition
/3/ copy data with ntfsclone - here it get's tricky. I suppose that I shall use ntfsclone inside the VM when booting from the sysrescuecd? - then, I would store the ntfscloned NTFS partition to a file, I guess, maybe a shared drive I can mount when in the systemrescuecd operating system? - that I did, using sshfs I mounted a external drive in the systemrescuecd environment and used following command to clone my WinXPBoot partition: ntfsclone -s --output /mnt/backup/winxp.img /dev/sdb1 - when that was done, I booted the new XEN HVM with sysrescuecd and the newly created /dev/vol0/domU-winxp - in sysrescuecd environment, I connect via sshfs to the same shared drive to access my winxp.img file also from there - using ntfsclone again, I put the winxp.img onto the newly created partition which still starts at sector 2048: ntfsclone -r --overwrite /dev/xvda1 /mnt/backup/prg/winpx.img
/4/ run ntfsreloc (bundled on sysrescuecd, or you can compile your own) to adjust filesystem geometry for a NTFS partition on the new partition - I do this in the sysrescuecd environment: 'ntfsreloc -s 63 -w -p /dev/xvda1' and I get:
heads sectors start partition: 255 63 2048 filesystem: 255 56 56 backup sector:255 56 56 target: 255 56 63 done! - ah well, that doesn't look too good. As I said earlier, the original SCSI disk under VMWare has 56 sectors/track ... and it seems that using ntfsclone didn't remove such adjustments.
- however, I followed Fjar's hints, so now I give it a try: of course, the system cannot boot, as I didn't install a MBR, jet. This is obviously missing.
Fajar: how do you normally get the MBR installed and do your conversions from SCSI to IDE also lead to these problems with 56 -> 63 sectors issues? Which kind of software is good to get the NTFS from 56 to 63, or maybe this is not necessary?
Still a bit lost, Stefan. On Tue, 2013-06-04 at 16:33 +0700, Fajar A. Nugraha wrote:
What I usually do: - make sure the XP image has IDE drivers installed - create a new virtual harddisk, partition it for windows and set the boot flag active - copy data with ntfsclone - run ntfsreloc (bundled on sysrescuecd, or you can compile your own) to adjust filesystem geometry for a NTFS partition on the new partition
I don't suppose we could impose on you to write a short "HOWTO import from VMDK" or similar doc on the wiki could we?
Please be aware that due to an ongoing SPAM attack we are having to manually give new users write permissions. Either mail me your Xen wiki user name or ask on freenode #xendocs where someone will take care of you.
Thanks, Ian
_______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|