I use a Custom Filesystem - What Bootloader Solution is right for me?: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
m (Fixed link)
m (fixed typo)
Line 63: Line 63:
The kernel command loads a multiboot compliant kernel, and in this case, we have specified an absolute number of sectors to load. The 'kernel' command can automatically detect if the file it's loading from the sectors is an ELF program. In other words, your 'bootloader' may even be a full ELF program, using this trick. In fact, you may even decide to place your kernel's executable image ''as the first N sectors, and have GRUB ELF load the kernel as absolute sectors, and not have to worry about parsing your custom FS at all.''
The kernel command loads a multiboot compliant kernel, and in this case, we have specified an absolute number of sectors to load. The 'kernel' command can automatically detect if the file it's loading from the sectors is an ELF program. In other words, your 'bootloader' may even be a full ELF program, using this trick. In fact, you may even decide to place your kernel's executable image ''as the first N sectors, and have GRUB ELF load the kernel as absolute sectors, and not have to worry about parsing your custom FS at all.''


Your kernel image, now loaded into memory (if it's an ELF, you an link it to 1MB physical), can then set itself up painlessly, and it also gets the benefit of the GRUB multiboot Data structure passed to it.
Your kernel image, now loaded into memory (if it's an ELF, you can link it to 1MB physical), can then set itself up painlessly, and it also gets the benefit of the GRUB multiboot Data structure passed to it.


This method completely invalidates the need to write a real mode bootloader.
This method completely invalidates the need to write a real mode bootloader.