How to make an bootable iso (not cd or flash drive)?

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
piyush.neo
Posts:6
Joined:Fri Jan 14, 2011 11:00 am
How to make an bootable iso (not cd or flash drive)?

Post by piyush.neo » Fri Jan 14, 2011 11:12 am

0 down vote favorite

i am following your tutorial series. I am working on Linux (Ubuntu) platform.
I am unable to make an bootable iso for my binary file. Though in tutorial VFD(virtual floppy disk) is used but it is for windows platform. Here is my code for bootloader ( just for testing)

Code: Select all

;*********************************************
;    Boot1.asm
;        - A Simple Bootloader for testing if cd is booting or not
;
;    Operating Systems Development Tutorial
;*********************************************

[BITS 16]    ;tell the assembler that its a 16 bit code
[ORG 0x7C00]    ;Origin, tell the assembler that where the code will

Start:

    cli                    ; Clear all Interrupts
    hlt                    ; halt the system

times 510 - ($-$$) db 0                ; We have to be 512 bytes. Clear the rest of the bytes with 0

dw 0xAA55                    ; Boot Signature
i tried master ISO on Ubuntu. It is converting the binary file to ISO but not to bootable ISO. Bochs is showing error "cd is not eltorito" which i googled and found to be standard for bootable ISO.What additional things i have to add to it to make it bootable. i have already added boot signature in the end. Can anyone suggest a reliable application to make a bootable ISO on Ubuntu? My work is stuck due to this.... OR i am pretty sure a lot of people must be involved in OS development on Linux platform. How do you people test?

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Re: How to make an bootable iso (not cd or flash drive)?

Post by Andyhhp » Sun Jan 16, 2011 2:16 pm

On any linux distributions, just use dd to copy the bootsector.

Loop mount the iso image and dd directly to the loop device.

e.g.

Code: Select all

losetup /dev/loop<NUM> /path/to/image.iso
dd if=/path/to/bootloader/binary of=/dev/loop<NUM> bs=512 count=1
~Andrew
Image

piyush.neo
Posts:6
Joined:Fri Jan 14, 2011 11:00 am

Re: How to make an bootable iso (not cd or flash drive)?

Post by piyush.neo » Sun Jan 16, 2011 2:59 pm

Andyhhp wrote:On any linux distributions, just use dd to copy the bootsector.

Loop mount the iso image and dd directly to the loop device.

e.g.

Code: Select all

losetup /dev/loop<NUM> /path/to/image.iso
dd if=/path/to/bootloader/binary of=/dev/loop<NUM> bs=512 count=1
~Andrew
Thanks for reply..though i have figured it out ....i will be back soon with new ones..:)

Post Reply