How to let a guest start from CDRom?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Mackerel
Posts: 4
Joined: Thu Feb 28, 2013 3:00 pm

How to let a guest start from CDRom?

Post by Mackerel »

Hi guys,

I have a simple question (I guess). I have my own hypervisor that kicks of my kernel via my ELF loader (the ELF file resides in a ramdisk). This works quite well and is hassle free.

Now I am thinking of expanding this scenario and let the guest boot via CD. Does anybody have leads as to how i would do so? My hypervisor so far sets up most of the real mode stuff for the guest. I can also start a guest in unrestricted guest mode (through which I successfully boot NetBSD these days). I am new to IO interaction (hard disks/cdroms) so I am kind of lost here.

Thanks!
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: How to let a guest start from CDRom?

Post by SpyderTL »

When you say "I have my own hypervisor", do you mean you wrote your own hypervisor, from scratch, or you have installed a hypervisor?
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Mackerel
Posts: 4
Joined: Thu Feb 28, 2013 3:00 pm

Re: How to let a guest start from CDRom?

Post by Mackerel »

I mean that I wrote my own minimalist hypervisor.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to let a guest start from CDRom?

Post by Combuster »

Then you'll have to complete a few things, roughly in this order:

1) Parse the CD image according to the El-Torito standard to get the boot image, and put it in the VM's RAM instead of loading and ELF.
2) Implement support for the BIOS interrupts to redirect to the CD (or the disk image to emulate during boot)
3) Implement SATA or IDE emulation so that an actual kernel can resume using the CD once in protected mode and using native drivers instead of the BIOS.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply