loadbin is a new tool in grubutil. It can convert various system files into the format of the Linux kernel, so as to achieve the purpose of booting in multiple boot managers.
For different boot files, loadbin provides corresponding header files,
There are three ways to boot the system file. Take ntldr as an example:
1. Directly use the header file ldntldr.bin. Use the header file as the kernel and ntldr as the initrd:
kernel ldntldr.bin
initrd ntldr
boot
2. Use the mkimage tool to combine the header file and the system file to generate a single boot file:
mkimage ldntldr.bin ntldr ntldr.bin
Then use ntldr.bin as the kernel:
kernel ntldr.bin
boot
Since many boot managers do not pass the correct DL value when booting the Linux kernel, it is necessary to set it in the header file. You can use the -x parameter to specify the DL value when generating a single boot file, for example:
mkimage -x 0x80 ldntldr.bin ntldr ntldr.bin
Some systems, such as grub2, also support partition parameters. You can specify it in the following way:
mkimage -x 0x80,0 ldgrub2.bin core.img grub2.bin
After booting, grub2 will automatically set the root device to the first primary partition (hd0,1) of the first hard disk.
If booting from a CDROM, you can use device number 0xe0, for example
mkimage -x 0xe0 ldgrub.bin stage2 grub.bin
In this way, after grub is started, it can use the (cd) device to access files.
3. The same as 2, first generate a single boot file ntldr.bin, and then you can use grldr.mbr to boot:
Install to mbr:
grubinst -b=ntldr.bin DEVICE
Generate the corresponding ntldr.mbr, and start in boot.ini:
grubinst -o -b=ntldr.bin ntldr.mbr
The supported boot file formats are currently:
1. GRUB Legacy
Header file ldgrub.bin, corresponding system file is stage2
2. GRUB2
The header file is ldgrub2.bin, and the corresponding system file is core.img
3. GRUB4DOS and NTLDR
The header file is ldntldr.bin, and the corresponding system files are ntldr and grldr
As for the boot manager, as long as it supports the Linux kernel format, loadbin can be used, including grub legacy, grub2, grub4dos, syslinux/isolinux/pxelinux, lilo, etc.
Download address:
http://download.gna.org/grubutil/
For different boot files, loadbin provides corresponding header files,
There are three ways to boot the system file. Take ntldr as an example:
1. Directly use the header file ldntldr.bin. Use the header file as the kernel and ntldr as the initrd:
kernel ldntldr.bin
initrd ntldr
boot
2. Use the mkimage tool to combine the header file and the system file to generate a single boot file:
mkimage ldntldr.bin ntldr ntldr.bin
Then use ntldr.bin as the kernel:
kernel ntldr.bin
boot
Since many boot managers do not pass the correct DL value when booting the Linux kernel, it is necessary to set it in the header file. You can use the -x parameter to specify the DL value when generating a single boot file, for example:
mkimage -x 0x80 ldntldr.bin ntldr ntldr.bin
Some systems, such as grub2, also support partition parameters. You can specify it in the following way:
mkimage -x 0x80,0 ldgrub2.bin core.img grub2.bin
After booting, grub2 will automatically set the root device to the first primary partition (hd0,1) of the first hard disk.
If booting from a CDROM, you can use device number 0xe0, for example
mkimage -x 0xe0 ldgrub.bin stage2 grub.bin
In this way, after grub is started, it can use the (cd) device to access files.
3. The same as 2, first generate a single boot file ntldr.bin, and then you can use grldr.mbr to boot:
Install to mbr:
grubinst -b=ntldr.bin DEVICE
Generate the corresponding ntldr.mbr, and start in boot.ini:
grubinst -o -b=ntldr.bin ntldr.mbr
The supported boot file formats are currently:
1. GRUB Legacy
Header file ldgrub.bin, corresponding system file is stage2
2. GRUB2
The header file is ldgrub2.bin, and the corresponding system file is core.img
3. GRUB4DOS and NTLDR
The header file is ldntldr.bin, and the corresponding system files are ntldr and grldr
As for the boot manager, as long as it supports the Linux kernel format, loadbin can be used, including grub legacy, grub2, grub4dos, syslinux/isolinux/pxelinux, lilo, etc.
Download address:
http://download.gna.org/grubutil/


