Booting Windows 10 to a virtual disk pointing to raw partitions

خرید بک لینک

For years, I've been running Windows as a guest inside of my Linux install by using /dev/md0 to point to a disk containing the relevant partitions, and the space in between them backed by files on disk. So something like you'd get with

losetup /dev/loop0 start.dat
losetup /dev/loop1 boot.dat
losetup /dev/loop2 end.dat
mdadm --build /dev/md0 --level=linear --raid-devices=5 /dev/loop0 /dev/sda1 /dev/sda2 /dev/loop1 /dev/loop2

and then a raw VMDK pointing at that device. Sadly, I didn't keep adequate notes when I set this up long ago, and I just switched computers and am trying to set it up again.

Previously, I was using a Windows 7 guest and only one loopback device, but a GPT disklabel. (I'm wondering now if that silently mangled a little data at the very end of my /dev/sda2, since it seems like GPT writes its backup tables there?)

But now when it boots, I get "FATAL: No bootable medium found! System halted."

On the assumption that grub needed to be reinstalled, I cloned my /boot partition to a file (boot.dat), mounted it at /mnt, and attempted to reinstall grub with

grub2-install --target=i386-pc --boot-directory=/mnt /dev/md0

but it says

error: disk ‘mduuid/00000000000000000000000000000000’ not found.

and the --debug output seems to indicate that it's happily probing /dev/sda for things instead of staying constrained to /dev/md0.

I also tried using createrawvmdk to only expose the Windows partitions, but I get the same thing there (and I don't have any way to manipulate the bits that way, though I suppose I could boot up a VM pointing to a live CD or something.)

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 271 تاريخ: پنجشنبه 14 مرداد 1395 ساعت: 7:36

صفحه بندی