Hi,
freelancerdev wrote:
Sure, here it is!! ( This is the code from GRUB in its 0.93 version )
I copyied the code just as it is there.
Perhaps the problem is not the source code at all, perhaps it was my mistake
when installing it to the iso image. I'm not sure.
If it worked in GRUB 0.93, you changed nothing, and it doesn't work for you; then it'd have to be a problem with how you're using it (and not a problem with the source code itself).
Note that I'd recommend writing your own code anyway. More specifically, you'd (eventually) want:
- A 1st stage boot loader for "floppy on BIOS"
- A 1st stage boot loader for "MBR partitioned hard disk on BIOS"
- A 1st stage boot loader for "GPT partitioned hard disk on BIOS"
- A 1st stage boot loader for "no emulation El Torito/CD on BIOS"
- A 1st stage boot loader for "PXE/network boot on BIOS"
- Maybe a boot loader for UEFI (depending on which version/s of multi-boot you're planning to support)
For all of these cases, there's enough differences to make it impractical/silly to attempt to cover 2 or more situations with the same code. For example, for the boot loader in an ISO/CD image (the "no emulation El Torito" one), the BIOS loads the entire boot loader (up to about 600 KiB and not just the first 512 bytes); and the boot loader needs to use 2 KiB sectors (not 512 byte sectors), needs to use "int 0x15 extensions" (and never CHS), needs to handle the ISO9660 file system (and not raw sectors or partitions), etc.
Cheers,
Brendan