Page 1 of 1
How do you create an iso compatible with virtualbox?
Posted: Thu Aug 18, 2011 6:22 am
by smilinggoomba
I'm a beginner programmer who just finished the wiki's Bare Bones tutorial. I made a floppy image and booted it with qemu, but when I made an iso and tried to boot it with virtualbox, it gave me the error:
"Could not get the storage format of 'awesome.iso' ". Any help? Thanks!
Re: How do you create an iso compatible with virtualbox?
Posted: Thu Aug 18, 2011 7:15 am
by Combuster
Virtualbox should not be able to trip over correct ISO images, otherwise you'd permanently require physical media to install an OS in the VM.
Therefore your image or your use thereof is broken. Why? I don't know because
you haven't told us anything meaningful.
Re: How do you create an iso compatible with virtualbox?
Posted: Thu Aug 18, 2011 8:01 am
by turdus
If I'm right, your problem is that VB does not like your plain iso, which looks like a dd image.
You have 2 options:
1. use VB tools (VBoxManage convertfromraw) to convert iso to vdi (slow, but simple)
2. harder to prepare, but easier to use method
2.1 create a flat, non-compressed, pre-allocated vdi image
2.2 with a hexeditor locate the grub identifier and the MBR in it
2.3 chop everything after, including the MBR, so you'll have a plain vdi header (1024 bytes in my case)
2.4 after compilation you can create vdi by merging this header and the fresh iso like
cat vdiheader.bin mydisk.iso >mydisk.vdi
and voilá, it works like a charm.
Re: How do you create an iso compatible with virtualbox?
Posted: Thu Aug 18, 2011 12:40 pm
by jnc100
I use grub-mkrescue to create ISO images with grub pre-installed. As far as I am aware these are 'standard' ISO images (if that term means anything) and they load fine with virtual box. How are you creating your image?
Regards,
John.
Re: How do you create an iso compatible with virtualbox?
Posted: Fri Aug 19, 2011 6:00 am
by smilinggoomba
I use the "cat" utility provided with my copy of ubuntu.
Re: How do you create an iso compatible with virtualbox?
Posted: Fri Aug 19, 2011 7:35 am
by Combuster
Forum rules wrote:Giving hackers the ability to reproduce the problem in a controlled environment is especially important if you are reporting something you think is a bug in code. When you do this, your odds of getting a useful answer and the speed with which you are likely to get that answer both improve tremendously.
It might help to give us the idea that you've actually read that. Like posting the exact commands.
Other than that, the probable usage of cat alone is not going to make a valid ISO image. Please go read one of several
tutorials on the wiki on how things are normally done. It is the only advice I can give because I only see that you did something really stupid but I lack every bit of information as to what and why you did it and therefore can't cover any lack of understanding on your part.
In other words: if you keep asking stupid questions, you'll never learn anything from the responses.
Re: How do you create an iso compatible with virtualbox?
Posted: Fri Aug 19, 2011 1:53 pm
by smilinggoomba
The complete command is: "cat stage1 stage2 pad kernel.bin > floppy.img". "Pad" is a file used as padding to avoid the kernel starting in the middle of a block, "Kernel.bin" is my kernel, and "stage1" & "stage2" are files from GRUB to boot my kernel.
Re: How do you create an iso compatible with virtualbox?
Posted: Fri Aug 19, 2011 2:13 pm
by egos
Combuster wrote:Other than that, the probable usage of cat alone is not going to make a valid ISO image.
Re: How do you create an iso compatible with virtualbox?
Posted: Sat Aug 20, 2011 6:29 am
by Brendan
Hi,
smilinggoomba wrote:I use the "cat" utility provided with my copy of ubuntu.
To boot from CD, you need to use and "ISO9660" format CD image (with or without optional extensions like Rock Ridge, Joliet, etc). On top of that the ISO9660 image must also use the "El Torito" extension.
That means that there's a lot of stuff to take care of before you've got a valid/usable boot CD (or CD image). For example, to use El Torito (to make the CD bootable) for "floppy emulation", you'd need a bunch of unused (2048-byte) sectors, a table describing the primary volume, a boot catalogue/table, an entry for your floppy image (saying where it starts, how big it is, etc), then the (1440 KiB?) floppy image. On top of that (for the ISO9660 file system) you'd need a root directory and 2 path tables.
All of these tables, structures, etc have specific requirements (specific contents, specific fields with specific values, etc, and some must be at a specific location on the CD/image).
Basically, it's radically different to a floppy disk (where no file system is used and you can do whatever you like), and there's no way that "cat" will ever work.
I'd recommend using an existing tool (like "nkisofs" which is probably already installed on your Ubuntu machine). The alternative is the "do it yourself" method - for that you'd need to get the specifications for both El Torito and ISO9660 and read/understand them before creating some sort of utility of your own.
Cheers,
Brendan