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-24 18:27
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » [Download] GRUB4DOS Enhanced Edition View 5,053 Replies 2
Original Poster Posted 2004-11-02 00:00 ·  中国 广东 广州 中移铁通
中级用户
Credits 214
Posts 34
Joined 2004-03-10 00:00
22-year member
UID 19742
Gender Male
Status Offline
Download: http://grub4dos.sourceforge.net/tools/grub4dos_sp.tar.gz

This is a version with some patches added without the basis of GRUB4DOS. The functions include:

1. grub4dos pre13
This version is based on the latest grub4dos pre13

2. Etherboot 5.3.8
Some network card driver modules are updated. The network cards compiled in this enhanced version are 3c50x, eepro100, rtl8159 and ns8390. The first three are relatively familiar to everyone, and the last one is the driver of NE2000, which means you can test the network function under qemu.

3. env patch
This is a patch for setting environment variables added by me. The usage is:
set value=name or set -o
Set variables or switches
show
Display variable value
This patch enables users to set variables or switches in grub. Currently, only the FreeBSD patch uses this part of the function.

3. FreeBSD module patch
This patch is added according to the code of FreeBSD's loader(8), which enables FreeBSD modules to be directly loaded under grub. FreeBSD modules can be not only core code but also data, such as user configuration files (user_config), boot screen (spash_image), virtual disk (mfs_root), etc. In addition, I also modified the initrd function, so that FreeBSD can load the initialized ramdisk like Linux.

The FreeBSD patch uses the above-mentioned env function. In terms of variables, all variables starting with "FreeBSD." will be copied to the kernel space. In terms of switches, -a is used. When turned on, the module is aligned according to the page boundary when loaded.

Example:
kernel (hd0,0)/kernel - load kernel
module (hd0,0)/msdos.ko - load module
module (hd0,0)/cfg --type=user_config - load data module (type is user_config)
initrd (hd0,0)/memdisk.gz - load initialized ramdisk. This is actually equivalent to module (hd0,0)/memdisk.gz --type=mfs_root
initrd (hd0,0)/disk2.gz - Unlike Linux, FreeBSD allows loading multiple initialized ramdisks.
lsmod - display currently loaded modules
set FreeBSD.vfs.root.mountfrom=ufs:/dev/md0c - This shows how to set the core variables of FreeBSD. This sentence means to tell the core to start from the first initialized ramdisk. If you want to choose to start from the second initialized ramdisk, use md1c, start from the hard disk, use ad0s1a, start from the floppy disk, use fd0a, etc.

4. TAGIMAGE patch (NBI patch)
This enables grub to load NBI files created by mknbi. An interesting usage is the image file created by mknbi-dos. When loaded, it will generate a virtual floppy disk in memory. This is a bit similar to the floppy disk generated by memdisk.gz. But it also has an additional function, that is, the generated floppy disk can be deleted with the tool rmrd, which is not possible in memdisk.gz for the time being.

Generate nbi file:
mknbi-dos flop.img > flop.nb
Load nbi file:
kernel (hd0,0)/flop.nb
Load nbi file in network: (this is actually the function implemented by etherboot/netboot)
ifconfig --address=my_ip --server=server_ip
kernel (nd)/flop.nb
Another more interesting usage is to use it to load another grub. nbgrub is actually a grub packaged in NBI format. Now with this patch, you can directly use kernel to load another version of the nbgrub file.

5. GRUB IMAGE patch
This is an extension of the above nbgrub concept. With this patch added, grub can directly load grldr or grldr without going through nbgrub indirectly. That is to say, the following three methods can be used to load another version of grub:
kernel (hd0,0)/nbgrub
kernel (hd0,0)/stage2
kernel (hd0,0)/grldr
Note that this patch does not currently support other forms of grub images, such as pxegrub, grub4lin and grub.exe.

6. 128-byte presetmenu space
This version does not set presetmenu, which means it will not automatically search for the location of menu.lst. But it reserves 128 bytes of presetmenu space, and you can set the required presetmenu yourself. For example:
Find menu.lst on the hard disk:
find --set-root /boot/grub/menu.lst
configfile /boot/grub/menu.lst
Network boot using bootp
bootp
configfile (nd)/menu.lst
Network boot with manual setting of parameters
ifconfig --address=192.168.2.100 --server=192.168.2.1
kernel (nd)/flop.nb
You can modify presetmenu with WinGrub or GRUB4DOS Unix Tools (http://grub4dos.sourceforge.net/tools/grub_utools.tar.gz).

Floor 2 Posted 2004-11-02 00:00 ·  中国 福建 泉州 电信
银牌会员
★★★
Credits 1,276
Posts 469
Joined 2002-12-23 13:00
23-year member
UID 586
Gender Male
From 福建泉州
Status Offline
I don't understand very well, but it seems quite good. I'll try it later
QQ:366840202
http://chenall.net
Floor 3 Posted 2004-11-03 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
I didn't understand it either, mainly because I'm too inexperienced with the network.

Very good, support it.

----------------------------

Supplement: grub4lin can already be directly started by the GRUB's kernel command, no need to use other patches anymore.
因为我们亲手创建,这个世界更加美丽。
Forum Jump: