China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 05:40
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » A brief introduction to the newly added tool loadbin in grubutil View 2,015 Replies 4
Original Poster Posted 2007-12-06 21:15 ·  中国 上海 浦东新区 电信
初级用户
Credits 80
Posts 38
Joined 2007-03-24 09:32
19-year member
UID 82765
Gender Male
Status Offline
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/
Floor 2 Posted 2007-12-06 21:27 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
A bit difficult, heh heh.
Windows 一键还原
http://www.yjhy.com
Floor 3 Posted 2007-12-07 19:58 ·  中国 辽宁 辽阳 联通
初级用户
★★
DOS之迷
Credits 174
Posts 81
Joined 2007-11-07 21:13
18-year member
UID 102004
Gender Male
Status Offline
愛意之无尽@灵犀!
QQ:71216716 E_mail:l.h.r.@163.com
Floor 4 Posted 2007-12-09 15:36 ·  中国 广东 深圳 龙岗区 电信
高级用户
★★★
Credits 793
Posts 312
Joined 2004-09-02 00:00
21-year member
UID 31104
Gender Male
Status Offline
I'm not sure if "都grub本来就不熟悉,较难理解" is a complete and clear sentence. If it's supposed to be "I'm not familiar with GRUB at all, and it's difficult to understand", then the translation would be "I'm not familiar with GRUB at all, and it's difficult to understand". But based on the given content, if it's as is, and assuming it's in Chinese and needs to be translated, it would be "I'm not familiar with GRUB at all, and it's difficult to understand" (if that's the intended meaning). Wait, no, actually the original Chinese "都grub本来就不熟悉,较难理解" has a bit of a word order issue. Let me rephrase and translate properly: "I've always been unfamiliar with GRUB, and it's relatively hard to understand." But according to the requirements, just translate directly. So it's "I've always been unfamiliar with GRUB, and it's relatively hard to understand"
Floor 5 Posted 2007-12-09 23:42 ·  中国 陕西 安康 电信
初级用户
★★
Credits 171
Posts 78
Joined 2006-11-22 11:26
19-year member
UID 71373
Gender Male
Status Offline
Forum Jump: