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!
How do you create an iso compatible with virtualbox?
-
- Posts: 3
- Joined: Thu Aug 18, 2011 6:13 am
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How do you create an iso compatible with virtualbox?
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.
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?
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.
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?
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.
Regards,
John.
-
- Posts: 3
- Joined: Thu Aug 18, 2011 6:13 am
Re: How do you create an iso compatible with virtualbox?
I use the "cat" utility provided with my copy of ubuntu.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How do you create an iso compatible with virtualbox?
Combuster wrote:you haven't told us anything meaningful.
It might help to give us the idea that you've actually read that. Like posting the exact commands.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.
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.
-
- Posts: 3
- Joined: Thu Aug 18, 2011 6:13 am
Re: How do you create an iso compatible with virtualbox?
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?
Combuster wrote:Other than that, the probable usage of cat alone is not going to make a valid ISO image.
If you have seen bad English in my words, tell me what's wrong, please.
Re: How do you create an iso compatible with virtualbox?
Hi,
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
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.smilinggoomba wrote:I use the "cat" utility provided with my copy of ubuntu.
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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.