how to make a image?

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
asmboozer

how to make a image?

Post by asmboozer »

hi all,


if no GRUB used, how to install the kernel?

what's the step to make loader?

i have read the FAQ
http://www.osdev.org/osfaq2/index.php/RollingYourOwnBootLoader
but I still could not understand how to make the image.
bluecode

Re:how to make a image?

Post by bluecode »

OSFAQ might help
asmboozer

Re:how to make a image?

Post by asmboozer »

bluecode wrote: OSFAQ might help
hhi,
it only refers to how to make the image, instead of install the kernel,and doesn't mention how the loader can access the installed kernel?

maybe I have to study the GRUB?
Dex4u

Re:how to make a image?

Post by Dex4u »

Maybe you could study bootprogs code, http://alexfru.chat.ru/epm.html#bootprog
bluecode

Re:how to make a image?

Post by bluecode »

hi,

I recommend using grub, because it makes the life of every OSdever much easier and everyone that uses many different os's can easily configure grub to also boot your os.
If you do not want to program your own bootloader I suggest you read about fat12/16/32 (or the filesystem you prefer, but fat is very easy). Then you read about BIOS interrupt 0x13, with which you can read your fd/hdd. Then you write a routine to load a file from whatever device you prefer. The next step is to set up everything for your kernel and to prepare the kernel executable itself (how much you have to do here depends on the type of your kernel executable). Then you just jmp/call the address of the kernel entry point and enjoy yourself ;)
LongHorn

Re:how to make a image?

Post by LongHorn »

you meant boot loader? Well it is simple. If you want to make a simple boot loader. Then don't worry about file systems. Just know the length of your kernel. write the kernel after the boot loader. use bios interrupts to load the kernel from floppy.
ofcourse this is to load it from floppy. If you want to load it from hard disk i couldn't help you. Then i would recommend GRUB. Anybody done a boot loader to load from hard disk(not an image)?
the attachment might be helpfull if you want to load your kernel from fat12fs.
viral

Re:how to make a image?

Post by viral »

plz help me in making a hdd image having two partition:

Primary: Partition 1 : FileSystem FAT32
Extended:Partition 2: Logical Partition 1: FileSystem FAT12

how can i create and format such images? WinImage doent give support to make multiple file system images(i guess)..
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:how to make a image?

Post by Pype.Clicker »

The best way i've found is to use an emulator such as Qemu and a floppy with an old system such as MS-DOS (well, anything else you're happy with would be equally ok).
Boot the floppy in the emulator, run "fdisk" and "format", and voil?: you're done ... moving files might be more tricky, though.
Post Reply