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.
How to make an ISO for my OS? (using custom bootloader)
-
- Posts: 1
- Joined: Fri Sep 29, 2017 3:53 am
How to make an ISO for my OS? (using custom bootloader)
- Attachments
-
- Komputilo_OS.tar.gz
- Here it is
- (12.92 KiB) Downloaded 61 times
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: How to make an ISO for my OS? (using custom bootloader)
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)
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:)
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!
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
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!
SAUCE CD IV - The most schwaaay OS.