Linux - VirtualizationThis forum is for the discussion of all topics relating to Linux Virtualization. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 444
Rep:
Disk read error for Windows 7 partition
I've converted a physical Windows 7 partition to an image file using `dd`, and can't get the partition itself or the image to boot virtually, via either virt-manager or kvm. Both fail on boot with the error: "A disk read error occurred."
Perhaps I've used a bad `dd` command, but I simply did: `sudo dd if=/dev/sdb7 of=my-w7-image.img conv=noerror`
Also tried converting the image to qcow2 format with `qemu-img` and that seemed to work (and the new image checks out without errors, though I suppose that means nothing if the original image is bad). I get the same error what booting this qcow2 image virtually.
I've tried to fix the boot loader with a W7 boot disc, and it wants an admin password that I don't have. I've also tried booting with other recovery discs, but they either don't find the disk or partition, or they don't think it's a bootable W7 partition.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 444
Original Poster
Rep:
Quote:
Originally Posted by jefro
I might be inclined to use a P2V app.
I have dd's many a distro over to a file. It is a raw file then and you can just use it like that to see where you stand before you go converting it.
Otherwise you could create a drive and boot to a live cd (image or usb or such) and then dd over ftp to the new file.
Well, I tried VMware's P2V converter app before I went this route, and I got the same errors when trying to boot the resulting image file, so I assumed I'd be better off with a pure dd.
I don't necessarily want to convert the image to another format, just boot the image (or the original partition) from within my current OS. So far I've not been able to boot either one.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 444
Original Poster
Rep:
Quote:
Originally Posted by jefro
Oh darn, I should have seen this.
dd if=/dev/sdb7
You didn't get a drive you got a partition. You need a mbr.
Ack. Right. Thanks. So I can use `dd` to copy the MBR, but is it possible to add the MBR to the existing image of the partition I'd created, or to re-image and somehow include the MBR? Or do I need to image the entire disk in order to get one W7 partition to boot?
Well, possible but not practical. You have to create a virtual hard drive (you lack a lot) so you could maybe do a binary copy of mbr + part.img to get a copy of the drive. One issue also exists is the sda7 deal. You'd at least have to fix either boot or partition structure.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.