OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 12:11 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Installing kernel on virtual hard disk
PostPosted: Wed Jun 21, 2017 7:37 am 
Offline
Member
Member

Joined: Sat Apr 29, 2017 6:56 am
Posts: 26
Hello can any one tell me how to install my os on virtual or real hard disk from disk image os


Top
 Profile  
 
 Post subject: Re: Installing kernel on virtual hard disk
PostPosted: Wed Jun 21, 2017 9:16 am 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
yerri07 wrote:
Hello can any one tell me how to install my os on virtual or real hard disk from disk image os

Can you be more specific (details)?

Basically, you write your OS to said virtual or real HDD.


Top
 Profile  
 
 Post subject: Re: Installing kernel on virtual hard disk
PostPosted: Wed Jun 21, 2017 9:36 am 
Offline
Member
Member
User avatar

Joined: Tue Mar 06, 2007 11:17 am
Posts: 1225
In my OS, I use an existing FAT partition. I can boot from floppy, but I need to write the boot sector and copy the kernel and other optional external program files.

But normally I use FreeDOS or MS-DOS to boot the system, and I read the configuration code from an existing FAT32 partition, from disk, from DOS, as a set of COM files.

Then finally I launch a kernel loader from DOS which loads my kernel.

The result is that I can load my kernel without destroying any partitions or the current configuration.

My OS is like a portable DOS DPMI application just that it's stand-alone, and I plan to expand it as much as any other OS.

You can see how I install my OS by copying a directory containing it into the root directory of a FAT partition, and then boot with DOS, and from DOS I load my stand-alone kernel:
http://f.osdev.org/viewtopic.php?t=32121

_________________
Live PC 1: Image Live PC 2: Image

YouTube:
http://youtube.com/@AltComp126/streams
http://youtube.com/@proyectos/streams

http://master.dl.sourceforge.net/projec ... 7z?viasf=1


Top
 Profile  
 
 Post subject: Re: Installing kernel on virtual hard disk
PostPosted: Wed Jun 21, 2017 10:08 am 
Offline
Member
Member

Joined: Sat Apr 29, 2017 6:56 am
Posts: 26
LtG wrote:
yerri07 wrote:
Hello can any one tell me how to install my os on virtual or real hard disk from disk image os

Can you be more specific (details)?

Basically, you write your OS to said virtual or real HDD.



Like the linux or any other windows install on hard disk and virtual disk(Virtual Machine) , how the process go. How can i do so for my os


Top
 Profile  
 
 Post subject: Re: Installing kernel on virtual hard disk
PostPosted: Wed Jun 21, 2017 11:28 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
You just copy the files to the disk and install whatever bootloader you are using. Without more details of your OS it's difficult to be more specific about the details.


Top
 Profile  
 
 Post subject: Re: Installing kernel on virtual hard disk
PostPosted: Thu Jun 22, 2017 8:31 am 
Offline
Member
Member

Joined: Thu Aug 13, 2015 4:57 pm
Posts: 384
Virtual HDD might be simpler at first, so I'll use it as an example, I'll also assume Qemu, if you're using some other hypervisor/emulator then you'll need to check what disk image format it supports.

You just create a file with whatever contents you want the virtual HDD to have, assuming RAW format. So first 512 bytes of the file are the first sector contents. Just write MBR there (assuming you want to boot the Qemu using this disk image), and write whatever you like in other sectors, it's your OS, so it's up to you.

If that doesn't answer your question, then you'll have to be more specific. Note, when I earlier asked for more details, I wasn't asking about other OS's but rather about yours, the question itself is a bit too vague to answer properly.

Btw, how do you boot your OS now? Have you read the PC boot stuff:
http://wiki.osdev.org/Boot_Sequence
http://wiki.osdev.org/System_Initialization_(x86)

You should have some idea what you want to achieve here, explaining that and related details would enable us to answer better. Like do you want the disk image to have some specific file system or not, how your OS expects to be booted, what boot loader/MBR you want to use, how your OS files should be laid out in the disk image/file system, etc.. These are all details you will have to _decide_, so we can't know them..


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 251 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