Page 1 of 1

Bootloader help

Posted: Sat Feb 23, 2013 4:46 pm
by feare56
I can't figure out what is wrong. Every time I try to load a bootloader I always get an error saying "can't find stage2" or something along those lines. I am using magiciso to make the bootable iso file. Do I need a new program to make my bootable iso or am I doing something wrong. Right now I open magiciso and point the first stage to boot by the load boot image button and for loading the kernel I had no problem doing it that way but I always have problems with bootloaders.

Re: Bootloader help

Posted: Sat Feb 23, 2013 6:42 pm
by Combuster
I'm trying to stack a lot of random items but it always topples over. Help! What am I doing wrong?


Goal? Plan? Execution? Results? You only gave us one of the four essentials. (Hint: including "help" in the topic title gives a free 90% accurate prediction the poster didn't read/follow the forum rules)

Re: Bootloader help

Posted: Sat Feb 23, 2013 8:20 pm
by feare56
Well the problem is that with any bootloader I try, i use the method stated above and it works fine for just a kernel well mine for now. I am running the iso on virtualbox, and there is no goal or plan yet until i find out if it is my program i am using, magiciso, or if it is a different option than what i said before

Re: Bootloader help

Posted: Sun Feb 24, 2013 12:57 am
by Brendan
Hi,
feare56 wrote:Well the problem is that with any bootloader I try, i use the method stated above and it works fine for just a kernel well mine for now. I am running the iso on virtualbox, and there is no goal or plan yet until i find out if it is my program i am using, magiciso, or if it is a different option than what i said before
I've never used "magiciso", but I'd assume it expects a bootable disk image and sets up "hard disk emulation El Torito" or "floppy disk emulation El Torito". A bootable disk image is not a boot loader, a kernel or a second stage.

It's also probably not a good idea - "floppy/hard disk emulation El Torito" is inefficient and messy, and only really exists for old OSs (e.g. DOS). Newer OSs should use "no emulation El Torito", where your boot loader uses "int 0x13 extensions" to read any (2048-byte) sectors from the CD that you want (which typically means implementing a boot loader that works with the ISO9660 file system, where things like the kernel are stored on the CD as a normal file).


Cheers,

Brendan

Re: Bootloader help

Posted: Sun Feb 24, 2013 3:52 am
by egos
I think TS uses his kernel as boot loader image in "No emulation" mode. If so then probably kernel is placed and starts at 7C0h:0. I have advised to TS to use boot loaders from OS Boot Tools. In this case TS should consider its Boot Spec.

feare56, did you try to use these boot loaders?

Re: Bootloader help

Posted: Sun Feb 24, 2013 9:04 am
by feare56
Yea i have used those bootloaders but with magiciso i cant use it. What tools would be good for making a working bootable iso

Re: Bootloader help

Posted: Sun Feb 24, 2013 9:54 am
by egos
MagicISO or any other suitable tools.

Read OS Boot Tools description and Boot Spec. Yoda's kernel image has very low base so you can use something like "copy /b prefix.bin+kernel.bin kernel.sys" to make OS Boot Tools compatible kernel image if you want to keep your original base.

Re: Bootloader help

Posted: Sun Feb 24, 2013 10:38 am
by feare56
Ok but what other iso makers are good

Re: Bootloader help

Posted: Sun Feb 24, 2013 1:28 pm
by Brendan
Hi,
feare56 wrote:Ok but what other iso makers are good
If you know an actual programmer, you could probably give them $5 to write a utility for you. It's not hard.

For example, last time I did it I just hacked together NASM macros to generate a bootable ISO9660 (I was too lazy to use an actual programming language, like C or Python or BASIC or anything else). It probably took me a day to read the specs (for ISO9660 and El Torito) and another day to write and test everything.

[EDIT] Ironically, this "hacked together NASM macros" thing is still online - see this web page for an example of how easy it can be.
[/EDIT]


Cheers,

Brendan

Re: Bootloader help

Posted: Sun Feb 24, 2013 3:08 pm
by egos
During some time I used FASM macros and directives to generate ISO image. Now I use cdimage (oscdimg) and mkisofs.

Re: Bootloader help

Posted: Sun Feb 24, 2013 4:31 pm
by feare56
Ok thank you brendan