OSDev.org
https://forum.osdev.org/

How to get QEMU to recognize hard drive
https://forum.osdev.org/viewtopic.php?f=1&t=33315
Page 1 of 1

Author:  nlobo [ Mon Nov 12, 2018 2:49 pm ]
Post subject:  How to get QEMU to recognize hard drive

Hi!
I'm currently working on an x86 OS and have most of the very basics such as GDT, IDT, console output, keyboard input and a physical memory manager. I would like to start working on reading and writing to disk. However, I have not been able to get grub to recognize the harddrive. I started by following the bare bones tutorial which uses grub to create an iso file and uses qemu to start the os from this file as a cdrom. I've tried adding an additional virtual harddrive when booting qemu and also tried loading grub into a virtual harddrive but I have not been successful with either of these approaches. Can anyone tell me a better way to load the operating system using qemu such that it also can recognize a virtual harddrive? Any reading suggestions would also help.
Thanks!

Author:  eryjus [ Mon Nov 12, 2018 3:17 pm ]
Post subject:  Re: How to get QEMU to recognize hard drive

If your host is Linux, take a look here. https://github.com/eryjus/century-os/bl ... efile#L113 I'm not sure how well it would translate to cygwin if you are using that.

It took me a while to sort this out to be robust enough to include in make, including setting up sudo to allow password-less commands. You could of course move all this to a shell script.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/