Unable to create bootable iso using mkiosfs
Posted: Sat Sep 04, 2010 3:33 am
Hi Friends,
I am new to this forum and OS development. This is my first post.
I am trying to create a bootable iso using mkisofs. I have a working boot code and a small kernel which works fine(in bochs) when I create the image using below code from makefile:
$(V)dd if=/dev/zero of=$(OBJDIR)/kern/bochs.img~ count=10000 2>/dev/null
$(V)dd if=$(OBJDIR)/boot/boot of=$(OBJDIR)/kern/bochs.img~ conv=notrunc 2>/dev/null
$(V)dd if=$(OBJDIR)/kern/kernel of=$(OBJDIR)/kern/bochs.img~ seek=1 conv=notrunc 2>/dev/null
$(V)mv $(OBJDIR)/kern/bochs.img~ $(OBJDIR)/kern/bochs.img
Well this creates a "bochs.img" file, and it works just fine mounted as a hard disk under bochs. My problem is when I try to create the bochs.img as a floppy image file (1.44mb) by replacing first line above by:
$(V)dd if=/dev/zero of=$(OBJDIR)/kern/bochs.img~ bs=512 count=2880 2>/dev/null
rest of the code is same as above, the floppy image does not boot on bochs.
What I want to do is to be able to boot from the floppy image and then use that image to create a bootable iso image which can boot as an emulated floppy. But I guess if the floppy image itself does not boot I will not be able to build an iso which can boot as an emulated floppy.
I tried one more thing, I tried to use my original bochs.img to build a bootable iso file using -hard-disk-boot option in mkisofs but it does not build iso complaining something about the image not having partitions.
Could someone please help me out on this?
Thanks
I am new to this forum and OS development. This is my first post.
I am trying to create a bootable iso using mkisofs. I have a working boot code and a small kernel which works fine(in bochs) when I create the image using below code from makefile:
$(V)dd if=/dev/zero of=$(OBJDIR)/kern/bochs.img~ count=10000 2>/dev/null
$(V)dd if=$(OBJDIR)/boot/boot of=$(OBJDIR)/kern/bochs.img~ conv=notrunc 2>/dev/null
$(V)dd if=$(OBJDIR)/kern/kernel of=$(OBJDIR)/kern/bochs.img~ seek=1 conv=notrunc 2>/dev/null
$(V)mv $(OBJDIR)/kern/bochs.img~ $(OBJDIR)/kern/bochs.img
Well this creates a "bochs.img" file, and it works just fine mounted as a hard disk under bochs. My problem is when I try to create the bochs.img as a floppy image file (1.44mb) by replacing first line above by:
$(V)dd if=/dev/zero of=$(OBJDIR)/kern/bochs.img~ bs=512 count=2880 2>/dev/null
rest of the code is same as above, the floppy image does not boot on bochs.
What I want to do is to be able to boot from the floppy image and then use that image to create a bootable iso image which can boot as an emulated floppy. But I guess if the floppy image itself does not boot I will not be able to build an iso which can boot as an emulated floppy.
I tried one more thing, I tried to use my original bochs.img to build a bootable iso file using -hard-disk-boot option in mkisofs but it does not build iso complaining something about the image not having partitions.
Could someone please help me out on this?
Thanks