OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Nov 19, 2019 2:54 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to get QEMU to recognize hard drive
PostPosted: Mon Nov 12, 2018 2:49 pm 
Offline

Joined: Mon Nov 12, 2018 2:35 pm
Posts: 1
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!


Top
 Profile  
 
 Post subject: Re: How to get QEMU to recognize hard drive
PostPosted: Mon Nov 12, 2018 3:17 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 21, 2011 9:47 pm
Posts: 286
Location: Tustin, CA USA
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.

_________________
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], CHOSTeam, Google [Bot], MSN [Bot], quirck and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group