OSDev.org

The Place to Start for Operating System Developers
It is currently Thu May 23, 2019 1:01 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: BIN to ISO ?
PostPosted: Thu Feb 28, 2019 5:07 pm 
Offline

Joined: Thu Feb 28, 2019 6:50 am
Posts: 11
So far, my makefile is giving me .bin files "os-image.bin". Now, I want to make a bootable ISO out of it, is there an easy way to do this ?
Thanks in advance.


Top
 Profile  
 
 Post subject: Re: BIN to ISO ?
PostPosted: Thu Feb 28, 2019 6:37 pm 
Offline
Member
Member

Joined: Wed Nov 01, 2017 7:41 pm
Posts: 35
Hello, dude you can do it in makefile. Just add a target with these commands:
Code:
mkdir -p isodir/boot/grub
cp grub.cfg isodir/boot/grub/
cp your-kernel-name.bin isodir/boot/

grub2-mkrescue -o your-kernel-name.iso isodir/


Just remember to setup grub.cfg properly o/

_________________
OS Development is awesome!

|AetherOS Project|


Top
 Profile  
 
 Post subject: Re: BIN to ISO ?
PostPosted: Fri Mar 01, 2019 4:30 am 
Offline

Joined: Thu Feb 28, 2019 6:50 am
Posts: 11
I am not using GRUB, I did my own bootloader. Will it work anyway ?


Top
 Profile  
 
 Post subject: Re: BIN to ISO ?
PostPosted: Fri Mar 01, 2019 6:18 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1521
Maybe. (Not with grub2-mkrescue, that only works with GRUB.)

You can boot a CD with INT 0x13 floppy disk emulation, INT 0x13 hard disk emulation, or no emulation. With emulation, you can use an existing floppy disk or hard disk bootloader, but you must build a floppy/hard disk image and then put that image into the ISO, and there are some limitations that might make your existing bootloader incompatible.

The wiki page for bootable CDs is here.


Top
 Profile  
 
 Post subject: Re: BIN to ISO ?
PostPosted: Sat Mar 02, 2019 10:46 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 271
If you're not using GRUB, then you could try to use a cdrom image creator like mkisofs.
https://wiki.osdev.org/Mkisofs

Or if you want a dependency-less solution, you can create the image yourself with a little C code, it isn't that hard. But you have to read the aforementioned El Torito spec very carefully. This is a good doc with byte offset tables. I've choosen this method because I'm creating a hybrid USB stick/GPT/MBR/CDROM/UEFI images in no-emulation mode.

A relatively easy to read example ISO creator in C from FreeBSD's makefs.

Cheers,
bzt


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

All times are UTC - 6 hours


Who is online

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