Page 1 of 1

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

Posted: Fri Jan 14, 2011 11:12 am
by piyush.neo
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?

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

Posted: Sun Jan 16, 2011 2:16 pm
by Andyhhp
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

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

Posted: Sun Jan 16, 2011 2:59 pm
by piyush.neo
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..:)