Page 1 of 1
How to make an ISO for my OS? (using custom bootloader)
Posted: Fri Sep 29, 2017 4:03 am
by QuerkyBren
Hi! I have been tearing my hair out trying to put my operating system on an ISO file.
Currently my makefile creates two files. a boot.bin file (which contains my bootloader) and a kernel.bin file (which contains my kernel).
The two files are combined into a single .bin using the cat command.
How will i create an ISO file from these two?
The operating system i use is Linux Mint 18.2
I will send a link containing my operating system.
Re: How to make an ISO for my OS? (using custom bootloader)
Posted: Fri Sep 29, 2017 10:13 am
by xenos
This should help:
El-Torito
Mkisofs
Re: How to make an ISO for my OS? (using custom bootloader)
Posted: Sat Sep 30, 2017 1:55 pm
by MichaelPetch
You can use genisoimg. I have a
Stackoverflow Answer that will probably help you out with usage. The answer there was someone trying to get thir custom bootloader onto an ISO image.
Re: How to make an ISO for my OS? (using custom bootloader)
Posted: Sun Oct 01, 2017 5:32 pm
by FelixBoop
if you use mkisofs, you'll want to look at the "-no-emul-boot", "-boot-info-table", "-boot-load-size", and "-b" options. You'll also want to leave some space in your boot loader for the Boot Info Table. (This took me forever to realize, so here's an example:)
Code: Select all
jmp 0000:start
times 8-($-$$) db 0 ;this space is reserved for a quick set up and a jump instruction.
;this space reserved for boot info table
bit_PrimaryVolumeDescriptor resd 1
bit_BootFileLocation resd 1
bit_BootFileLength resd 1
bit_Checksum resd 1
bit_Reserved resb 40
start:
;do something here
mkisofs will automagically fill it in for you if you tell it to. If you don't leave space, though, your code will get overwritten and will most likely crash.
You can set it up to tell the BIOS emulate a floppy drive, like in the case of an older system (
I think this means that it will only be emulated with int 13h. It still acts like an ATAPI drive if you go directly, I think).
Or, you can tell the BIOS to not emulate the floppy system at all. This is probably what you want for a modern OS.
Good luck!