Page 1 of 1
creating a bootable .iso
Posted: Wed Jan 05, 2011 7:51 pm
by ishkabible
fist off im trying to create a bootable image so i can test what i will make later. i just want to have a working bootloader and later learn to display pixels to the screen. later i would like to learn to make an actual OS but for now i think i should learn how to do things. im comfortable in x86 and c/c++ and i want to go very low level, lower level than i have yet gone with x86. im trying to start with a bootloader shown on the FASM site becuase FASM is my favorite assembler.
http://flatassembler.net/examples.php here is the link, it's the FAT12 bootloader. it comes with 4 different binary's along with there source, i put them all in an iso and tried to use it with Oracle VM VirtualBox. it said it found no bootable media. i had no clue if it would work or not when i tried it but i figured it was worth a shot. i have no clue what else to tell you to help me help you so i presume you will have to ask me questions in order to guide me down the correct path so feel free.
edit: lol i typed 'shot' '****' fixed it now but i wondering how decent a placement that was for the key
Re: creating a bootable .iso
Posted: Thu Jan 06, 2011 12:49 am
by thepowersgang
Tip: Look up the format used for CDs before trying a boot loader on them. (Where do you think the term .iso comes from?)
CDs use the ISO-9660 filesystem, not FAT.
In your early testing, I would suggest using a floppy disk image instead. (They're usually FAT formatted, the FDD is simple to write a driver for, and there are heaps of utilities for working with disk images)
Re: creating a bootable .iso
Posted: Thu Jan 06, 2011 4:54 am
by Combuster
There's also a
Bootable CD tutorial (actually, there are two) on the wiki. Please try to search a bit before posting.
Re: creating a bootable .iso
Posted: Mon Jan 10, 2011 4:41 pm
by ishkabible
dose anyone know of a program to make FAT images and mount them to a virtual drive so i can test them on a VM?
Re: creating a bootable .iso
Posted: Mon Jan 10, 2011 5:09 pm
by ishkabible
ok win image can make .vfd files but i can't find a way to mount them to a virtual drive. what program would i use to mount them to a virtual drive on windows?
Re: creating a bootable .iso
Posted: Mon Jan 10, 2011 5:47 pm
by ishkabible
how would i make a bootable .iso in windows? all i want it to do is go off in an infinite loop.
Re: creating a bootable .iso
Posted: Mon Jan 10, 2011 6:54 pm
by ishkabible
ok i got it to boot kinda, it shows me a bunch of text that was generated by winimage witch is what made the .vfd file not the .iso. i would like to know if there is a utility that allows me to create the floppy images from command line that is also fre
Re: creating a bootable .iso
Posted: Mon Jan 10, 2011 10:31 pm
by JackScott
Cygwin is the answer to your problems. It recreates a UNIX-like environment within Windows, which you can use to run the 'mkisofs' ISO-generation tool. It's also the best choice for running a
GCC Cross-Compiler on Windows, which is the recommended compiler for OSDev. The UNIX tool 'dd' will help create floppy disk images for you, though you have to know what you want to create in the first place.
The tools are all there... you'll just need the knowledge to use them.
As a side note, learning
to ask smart questions might prove worthwhile.
Re: creating a bootable .iso
Posted: Tue Jan 11, 2011 1:03 pm
by shedokan
He is better off using
http://vfd.sourceforge.net/
It can create a foppy image and by using partcopy you can move the boot sector on it.
And move regular files using windows.
Re: creating a bootable .iso
Posted: Wed Jan 12, 2011 6:22 pm
by ishkabible
i have considered using cygwin to compile c/c++ code but instead i have been using MinGW, becuase i don't like MSVC++ i opted for either Cygwin and Mingw. I'm downloading Cygwin right now, this should work nicely
thanks!!
edit: also vfd didn't work on my computer, it gave me an error saying i can't run window's 95/me/2000 but im running vista. no clue what it's issue is. i think using the commonly used tools will prove beneficial to me because i know little of OS dev.
Re: creating a bootable .iso
Posted: Thu Jan 13, 2011 8:23 am
by Tosi
If you're downloading Cygwin please don't use the compiler that comes with it and instead make a
cross-compiler. It's pretty easy and it prevents so many FAQs and problems that it's more than worth it.
As for VFD, it won't work on my system so I don't know how to use it but I do know it does not work on 64-bit versions of Windows, if you're using that. There is a similar program (I think it's imdisk) linked to on the Wiki that does work on 64-bit Vista and Windows 7, so you might want to try that.
Re: creating a bootable .iso
Posted: Thu Jan 13, 2011 9:55 am
by Combuster
Alternatively, you might want to use a tool like mtools (or less recommended, bfi) so that you can build your entire disk image from a build script without needing a (emulated) physical drive as an intermediate.