5

I have Debian Linux and Windows 10 installed alongside on my first hard drive. I want to start my Debian install from within Windows through Qemu and the Hax hypervisor. This is how is partitioned my disk :

  1. 190 GB NTFS with Windows 10
  2. Recovery partition of Windows 10 = 486 mb
  3. extfs4 partition with Debian = 120 GB
  4. free space = 4 GB

When I'm on Windows,I use a linux file system to read and write on the linux partition...with it i can associate a new drive letter to it. So,I would like for example give to QEMU the drive letter where is stored Linux,but I don't know how to do that...this is the qemu commands sequence that I use usually to boot Linux...

C:\Programmi\qemu\qemu-system-x86_64 -m 3072 -cpu Haswell,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on -machine pc-q35-2.9 -smp 4,cores=2 -usb -device usb-kbd -device usb-tablet -smbios type=2 -device ich9-intel-hda -device hda-duplex **-accel hax** -device ide-drive,bus=ide.1,drive=DebHDD -drive id=DebHDD,if=none,file= **WHAT SHOULD I PUT HERE ?**,format=qcow2 -device ide-drive,bus=ide.0,drive=DebDVD

How would I make it work?

1
  • I arrived here looking for the the answer to this after several hours of search. There are plenty of tutorials on how to boot a windows image form a physical partition in a Linux host, but no information at all on the opposite: Start Linux (guest) from a physical partition on a Windows (host) . Even QEMU documentation is lacking.
    – obaqueiro
    Commented May 30, 2020 at 2:06

1 Answer 1

3

Found the answer very deep in the documentation:

https://qemu.weilnetz.de/doc/qemu-doc.html#host_005fdrives

Hard disks Hard disks can be used with the syntax: \.\PhysicalDriveN where N is the drive number (0 is the first hard disk). /dev/hda is supported as an alias to the first hard disk drive \.\PhysicalDrive0.

WARNING: unless you know what you do, it is better to only make READ-ONLY accesses to the hard disk otherwise you may corrupt your host data (use the -snapshot command line so that the modifications are written in a temporary file).

1
  • 1
    How well did this work?
    – alvitawa
    Commented Feb 1, 2023 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .