Qemu - boot Windows 7/8/10 or Linux from HDD

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
stemsee

Qemu - boot Windows 7/8/10 or Linux from HDD

#1 Post by stemsee »

It took me 10 minutes and 10 attempts using the commandline to boot windows and linux using qemu from my harddrive from within puppy linux.

My puppy linux grub is installed on sda1 along with windows 10 boot files.
My frugal folder is on sda2 alongside windows system folder.
After booting into puppy tahr I open a terminal and type

Code: Select all

qemu-system-i386 --enable-kvm -k en_UK -hda /dev/sda
or for x86_64 system

Code: Select all

qemu-system-x86_64 --enable-kvm -k en_UK -hda /dev/sda

this calls up grub boot menu and I use 'Alt Gr' key and the key on its right to navigate grub menu. I booted puppy tahr and windows 10 initially responded but I need to pass through the graphics hardware to qemu in order for it to boot to desktop. This will be a cinch. I remeber seeing the gpu pass through command somewhere I just need to find it.


stemsee

#3 Post by stemsee »

I got as far as successfully configuring xorgwizard, but exiting that it didn't get back to commandline so couldn't type xwin. But I am confident this will work for both windows and linux when either the drivers for the qemu mb have been installed on the guest or the hardware is passed thru directly to qemu.

Basically this technique is very close to what Parrallels acheives on Mac osx.

stemsee

#4 Post by stemsee »

So the way to do it is to use vfio vfio_pci. These modules need to be compiled. Then the gpu device if it has hdmi the dhmi must be unbound from the driver. Then load vfio modules and give gpu device to the vfio_pci. Then start qemu.

https://wiki.debian.org/VGAPassthrough

stemsee

#5 Post by stemsee »

I have recompiled 4.1.3-pae with vfio vfio_pci vga iommu etc.

Will post later after testing and uploading. Will also compile 4.1.3-64

stemsee

#6 Post by stemsee »

I will post the kernels shortly.

This command got me to puppy desktop without pass through for puppy tahr frugal install.

Code: Select all

qemu-system-x86_64 --enable-kvm -k en-gb -hda /dev/sda -vga vmware

stemsee

#7 Post by stemsee »

So I am posting from a qemu hdd frugal tahr install, on a frugal tahr install (the same frugal tahr). Just needed to allocate memory and 4 cpu.

Code: Select all

qemu-system-x86_64 --enable-kvm -k en-gb -hda /dev/sda -vga vmware -smp 4 -m 1024
Attachments
qemucap.jpg
(138.74 KiB) Downloaded 473 times

stemsee

#8 Post by stemsee »

Now i booted tahr64 on qemu look at the hardinfo cpublowfish score of 9.8.8 !!. Shows four cpu at 2600 and it feels like it. Virtual screen resolution is full 1920 x 1200
Attachments
cap3.png
(159.03 KiB) Downloaded 457 times
cap2.png
(161.88 KiB) Downloaded 465 times
cap1.png
(201.53 KiB) Downloaded 463 times

gcmartin

#9 Post by gcmartin »

stemsee wrote:I will post the kernels shortly.

This command got me to puppy desktop without pass through for puppy tahr frugal install.

Code: Select all

qemu-system-x86_64 --enable-kvm -k en-gb -hda /dev/sda -vga vmware
Looks like a really good approach without a need to setup virtual disks.

Questions before proceeding with this
  • Is /dev/sda the device you booted the host?
  • Does /dev/sda have the Microsoft Bootmanager as its start or some other bootmanager (ie GRUB/GRUB2/LILO/IsoLinux...)?
  • Is your host running a Live/Frugal/Full Linux?
Thanks in advance for anything you are willing to share.
BTW: I have always had several of the PUPs run at incredible speed. In couple cases, the PUPs run "faster" than the host system. (Of course, this is merely an observation in its desktop performance with its local apps. A compile done earlier this year was actually measured to have a shorter time running in the guest than on the host.)
Last edited by gcmartin on Wed 19 Aug 2015, 15:23, edited 1 time in total.

stemsee

#10 Post by stemsee »

grub4dos bootloader
same boot partition
same frugal folder-distro as host
tahr64 same boot menu-partition as host
boot pfix nocopy,ram

I beleive that win 10 isnàt booting simply because my laptop doesnàt have enough ram!

EDIT I am booting EmSee'Tahr with 64bit kernel

64bit tahr is blazingly fast, the browser is loading too fast!!

stemsee

#11 Post by stemsee »

Conky and 3d graphics smooth and fast.

stemsee

#12 Post by stemsee »

I have write access to the physical drive sda and partitions sda1 sda2. I just ran grub4dos on them successfully in qemu.

Youtube video is working good.

stemsee

#13 Post by stemsee »

Fatdog 64 701 and LH'603 both playup ' the cursor does not appear in fd and is erratic in lh.

stemsee

#14 Post by stemsee »

DebianDog is very well behaved in this environment, especially for videos. Mouse lags when video is playing. But I am running off a usb drive, so it is [robably that. The usb partitions are mounted as sda1-4 not sdb1-4. Gparted recognises all partitions.

stemsee

#15 Post by stemsee »

try this 64bit kernel with vfio vfio_pci vga iommu etc

https://mega.nz/#!cEwHxYrT!XjIZDldY1uib ... BRAuRnjCt0

The kernel is in /boot

gcmartin

#16 Post by gcmartin »

Info on findings of USB vs ATA drive data transfer rates ... removed!
Info on findings of QEMU guest speed benefits ... removed!
Last edited by gcmartin on Thu 20 Aug 2015, 12:28, edited 4 times in total.

stemsee

#17 Post by stemsee »

@gcmartin

You are attempting to hijack the thread and insert things of your own personal interest which have nothing whatsoever to do with the thread and its title! WHY??

Start your own thread about usb ata drive testing. The slight coincidence that I mention it 'seems' fast in qemu is not enough excuse to cover your butt when attempting to hijack my thread, mentioning my name is not sufficient excuse.

Why do you consistently and persistently inject your own "headlines" into other people's threads when clearly they are out of place? Your perspective seems all wrong. I suggest you undertake some form of psychotherapy, that you may avoid annoying innocent members of the public for the entirety of your forum life!

gcmartin

#18 Post by gcmartin »

Removed as requested.

Post Reply