Please see the latest updated version: grub4dos Beginner's Tutorial - Introduction Chapter, Application Chapter
http://www.cn-dos.net/forum/viewthread.php?tid=28300&fpage=1
Description: Update some content. For easy reading, merge "Introduction Chapter" and "Application Chapter". The PDF graphic version can be downloaded from my network disk or from the Space Forum. (It seems that the site can no longer attach files currently)
-------------------------------------------------
grub4dos Beginner's Tutorial - Application Chapter
lianjiang 2007.03.14 Second Revision
1 Application on Hard Disk
2 Application on CD
3 Application on Floppy Disk
4 Application on USB Flash Drive
5 Conclusion
6 Acknowledgments
Note: 1) Many materials cited in this tutorial are from the Internet, and the copyright belongs to the original website or the original author.
2) Please refer to "grub4dos Beginner's Tutorial - Introduction Chapter" first.
3) The application environment is Windows/DOS.
4) I have just come into contact with grub and have a very superficial understanding of grub. Please point out any errors.
******************************************************************
1 Application on Hard Disk
To apply grub on a hard disk, you first need to install it. The installation/booting methods are mainly 3 types, namely a, enter grub4dos through the boot menu of Windows NT; b, boot grub through DOS; c, boot grub through MBR.
After installing grub, you need to prepare the menu file menu.lst.
1.1 Loading Floppy Disk Image
For Windows users, using grub to load a floppy disk image is one of the most commonly used functions. Since Windows 2K/XP has been separated from DOS, performing some operations under DOS such as system backup/recovery has become a difficult problem for beginners. Previously, we might need to use a boot CD, etc., to enter DOS. The characteristics of the CD determine that it is difficult to update the tools on the CD in a timely and convenient manner. The appearance and application of grub have solved this problem. We can not only enter the DOS environment without using other media, but also update tools in a timely manner. Many of the various system maintenance tools downloaded from the Internet are in img format. Without extracting the files, we can use them by slightly modifying menu.lst, and various tools can coexist harmoniously, which is very convenient to use.
How to add the downloaded xxx.img to the grub boot menu?
You just need to save xxx.img to the C:\boot\grub directory, edit menu.lst, and add the following content.
title Boot from Floppy image XXX
map --mem /boot/grub/xxx.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
Note: These lines of content cannot be added at the very beginning because the previous ones are some settings that are effective globally.
All the tools you need can be added in this way.
Maybe you have many tools, and adding them all to the menu will make it messy. Usually, there may be only one or two commonly used tools, and many are only used occasionally. For this situation, you can take the following method. That is, write the commonly used ones into the menu, and at the same time write the content of a general startup img file in the menu. For example, the above
title Boot from Floppy image XXX
map --mem /boot/grub/xxx.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
In this way, after starting grub and entering the menu, select "Boot from Floppy image XXX", press "e" to enter the editing state, move the direction keys, modify xxx.img to the file name you need to start, press Enter, and press "b" to start. (If the img file is saved in another path, change it to the corresponding path.)
1.2 Booting WinPE
Some system maintenance operations are not convenient or even cannot be performed under DOS. The appearance of WinPE has brought us a lot of convenience. The following takes the widely praised光棍版 WinPE modified by LaoMaotao as an example to introduce how to use grub to boot WinPE. (The光棍版 WinPE already has an installation program. Here, I will introduce adding a general winpe option in menu.lst.)
Steps: 1. Download the光棍版 WinPE, extract it to get BootCD.ISO.
2. Use a virtual CD-ROM or UltraISO, etc., to extract WINPE.IS_, WINNT.XPE, and WXPE\SETUPLDR.BIN from the ISO, copy these 3 files to C:\, and rename SETUPLDR.BIN to ldrxpe. If external programs are needed, also copy XPEMENU.INI and the "external program" directory to the root directory of any disk.
3. Add the following in menu.lst
title Micro Windows XPE (by LaoMaotao)
chainloader /ldrxpe
In this way, when you start grub and select "Micro Windows XPE (by LaoMaotao)", you can boot WinPE.
1.3 Booting Systems
For a single hard disk with multiple systems installed and multiple hard disks with multiple systems installed, grub can be used to conveniently manage the booting of each system.
For example, you can add the following options in menu.lst:
title Boot the operating system on the first primary partition (hd0,0) of the first hard disk
rootnoverify (hd0,0)
makeactive
chainloader +1
title Boot the operating system on the second primary partition (hd0,1) of the first hard disk
rootnoverify (hd0,1)
makeactive
chainloader +1
title Boot the operating system on the first primary partition (hd1,0) of the second hard disk
rootnoverify (hd1,0)
makeactive
chainloader +1
title Boot Windows NT/2000/XP/2003
find --set-root /ntldr
chainloader /ntldr
title Boot Microsoft Windows Vista
find --set-root /bootmgr
chainloader /bootmgr
title Boot DOS/Windows 95/98/Me
find --set-root /io.sys
chainloader /io.sys
******************************************************************
2 Application on CD
The following introduces two methods to apply grub on a CD.
2.1 Bootable CD guided by grub
Use grldr as the boot file of the CD to guide the CD, load menu.lst, and select the boot item through the menu.
Steps: 1) Prepare necessary img files, and grldr, menu.lst (prepare font, background image, memdisk.gz, etc., files as needed).
2) Edit menu.lst. The format to guide the img file on the CD is as follows:
title Win98 (MAP-HOOK-1)
map --mem (cd)/boot/grub/win98.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
The menu can also guide the img file on the hard disk, for example:
title GreenGhost (MEMDISK)
kernel (hd0,4)/boot/grub/memdisk.gz c=200 h=2 s=36 floppy
initrd (hd0,4)/boot/grub/gghost.img c=200 h=2 s=36 floppy
3) Organize files. For example, create a grubcd directory under E:\temp, copy menu.lst to this directory, and the menu.lst file will be in the root directory of the CD. Create a boot\grub directory under this directory to save various img, font, etc., files. Note: The file names of all files referenced in menu.lst that are displayed on the hard disk need to be lowercase, and uppercase ones need to be changed to lowercase.
4) Make ISO. Use UltraISO to create a new ISO file, add all files in the E:\temp\grubcd directory to the ISO file; perform "Boot CD" - "Load Boot File", select the grldr file. Then perform "File" - "Properties", select the "Allow lowercase letters" option, and save the ISO file.
You can also use tools such as mkisofs.exe or CDIMAGE.EXE to make a bootable ISO.
5) Burn the made bootable ISO with Nero, etc. If conditions permit, you can test it in a virtual machine first and then burn it, or use CD-RW/DVD+RW to burn it.
2.2 Bootable CD with BCDW guiding GRUB
This method is to use BCDW to make a bootable CD, and execute grub through BCDW to load the grub menu.
Steps: 1) First download the BCDW software package, extract it to get the required files.
2)Organize files. For example, create a bcdwcd directory under E:\temp. The files in this directory will be in the root directory of the CD. Create a boot\grub directory and a bcdw directory under it. Copy bcdw.bin, bcdw.ini, and loader.bin from the bcdw directory in the software package to the created bcdwcd\bcdw directory; copy grldr, various img, font, etc., files to the bcdwcd\boot\grub directory. The editing method of the menu.lst file is the same as introduced in 2.1 above.
3) Edit the bcdw.ini file. Open bcdw.ini, find the part, for example:
C:\ ; Boot from drive C:
\WNPE\setupldr.bin ; Bart's Preinstalled Environment
\I386\setupldr.bin ; Microsoft Windows XP Setup
\BCDW\bcdw2dos.ima \WIN9X\setup.exe ; Microsoft Windows 98 Setup
The above is an example of the BCDW boot menu. Add the grub item in it to become:
\boot\grub\grldr ; Grub4dos
C:\ ; Boot from drive C:
\WNPE\setupldr.bin ; Bart's Preinstalled Environment
\I386\setupldr.bin ; Microsoft Windows XP Setup
\BCDW\bcdw2dos.ima \WIN9X\setup.exe ; Microsoft Windows 98 Setup
4)The method of making the ISO file and burning the ISO is basically the same as in 2.1. The difference is that when making the ISO file, loader.bin needs to be used as the boot file of the ISO. You can also use tools such as mkisofs.exe or CDIMAGE.EXE to make a bootable ISO.
******************************************************************
3 Application on Floppy Disk
There are mainly two ways to apply grub on a floppy disk, namely booting grub through DOS and installing the GRLDR boot record to the boot sector of the floppy disk (for the installation method, refer to "grub4dos Beginner's Tutorial - Introduction Chapter").
3.1 Application of Floppy Disk Booted by grub through DOS
First, make the floppy disk into a bootable disk. The simplest way is that the floppy disk only needs three files: io.sys, msdos.sys, and command.com.
Then copy grub.exe and menu.lst to the root directory of the floppy disk.
Create a new autoexec.bat file, which only needs to write 4 letters.
grub
Then edit menu.lst. Due to the limited capacity of the floppy disk, it is generally difficult to directly call the img file on the floppy disk in the menu. Therefore, it can mainly be used to boot the img file on the hard disk and also to manage the booting of each system. The files with specified paths used in the menu file (such as fonts, img files, etc.) should be prepared in advance, otherwise the option cannot run. (There are also examples on the Internet of including many maintenance tools in the limited capacity of the floppy disk. Those who are interested can search by themselves.)
An example of the menu.lst file:
timeout 10
default 0
splashimage (fd0)/boot/grub/xp2008.gz
fontfile (fd0)/boot/grub/fonts
title GreenGhost (MAP-HOOK)
map --mem (hd0,4)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title Find /menu.lst on the hard disk
find --set-root /menu.lst
configfile /menu.lst
title Boot the operating system on the first primary partition (hd0,0) of the first hard disk
rootnoverify (hd0,0)
makeactive
chainloader +1
title Boot the operating system on the second primary partition (hd0,1) of the first hard disk
rootnoverify (hd0,1)
makeactive
chainloader +1
title Boot the operating system on the first primary partition (hd1,0) of the second hard disk
rootnoverify (hd1,0)
makeactive
chainloader +1
title Reboot
reboot
title Shutdown
halt
3.2 Application of Floppy Disk with GRLDR Boot Record Installed in the Boot Sector
After the GRLDR boot record is installed, only grldr and menu.lst and the files referenced in menu.lst need to be retained on the floppy disk. The use of the menu.lst file is the same as in "3.1 Booting grub through DOS" on the floppy disk.
******************************************************************
4 Application on USB Flash Drive
To apply grub on a USB flash drive, it is similar to a floppy disk. There are mainly two ways, namely booting grub through DOS and installing the GRLDR boot record to the boot sector of the USB flash drive (for the installation method, refer to "grub4dos Beginner's Tutorial - Introduction Chapter").
First, use the built-in tools of the USB flash drive or usboot, flashboot, etc., to make the USB flash drive into a DOS bootable disk. At the same time, set the corresponding options in the computer's CMOS to see if the USB flash drive can boot into DOS. If it can, you can continue reading; if it cannot boot, you can try different modes, use other making tools, etc., and continue reading after it can boot.
In different boot modes, after the USB flash drive boots into DOS, it may be drive A or drive C on your computer.
Since the USB flash drive has a large capacity, various tools and WinPE can be stored on the USB flash drive.
When it is displayed as drive A, the usage method is similar to that of a floppy disk.
The usage of starting the img image file in the menu.lst file is as follows:
title GreenGhost (MAP-HOOK)
map --mem (fd0)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
When it is displayed as drive C, the usage method is similar to that of a hard disk.
The usage of starting the img image file in the menu.lst file is as follows:
title GreenGhost (MAP-HOOK)
map --mem (hd0,0)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
In the above example, the menu.lst uses an absolute path to reference files, that is, (fd0)/boot/grub/gghost.img and (hd0,0)/boot/grub/gghost.img. This usage is no problem for a specific machine. But when the same USB flash drive is used on different machines, it may cause a problem. That is, different menu.lst files may be needed for different machines, otherwise the tool cannot be started normally. Then, is there any way to avoid this trouble? The answer is yes, that is, use "find --set-root" and a relative path to achieve. In this way, you don't have to worry about whether the USB flash drive is recognized as fd or hd.
For example, you can create a characteristic file in the root directory of the USB flash drive, such as myudisk.txt
In this way, to start the img image file on the USB flash drive, you can use the following method:
title GreenGhost (MAP-HOOK)
find --set-root /myudisk.txt
map --mem /boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
To boot WinPE on the USB flash drive, you can use:
title Micro Windows XPE (by LaoMaotao)
find --set-root /myudisk.txt
chainloader /ldrxpe
Refer to other examples, and by editing your menu.lst, you can give full play to the performance of the USB flash drive.
******************************************************************
5 Conclusion
This article only writes about some of the most basic applications of grub4dos. More functions of Grub4dos need you to try and explore.
I hope this article will help you use grub4dos faster.
I am looking forward to sharing your achievements.
Note: My network disk: http://lianjiang2004.ys168.com also provides the download of some grub-related files and materials.
Recommended forums:
Space Forum: http://bbs.znpc.net
China DOS Union Forum: http://www.cn-dos.net/forum/
Wuyou Boot Forum: http://bbs.wuyou.com
******************************************************************
6 Acknowledgments
The completion of this article refers to and quotes from many materials, and many of them can no longer find the original source. After the first draft was completed, many netizens pointed out the shortcomings and put forward modification suggestions, and also received the support and encouragement of the software developers. Thanks are extended here.
lianjiang 2007.03.13 First Draft
2007.03.13 First Revision
2007.03.14 Second Revision
[ Last edited by lianjiang2004 on 2007-3-29 at 09:01 PM ]
http://www.cn-dos.net/forum/viewthread.php?tid=28300&fpage=1
Description: Update some content. For easy reading, merge "Introduction Chapter" and "Application Chapter". The PDF graphic version can be downloaded from my network disk or from the Space Forum. (It seems that the site can no longer attach files currently)
-------------------------------------------------
grub4dos Beginner's Tutorial - Application Chapter
lianjiang 2007.03.14 Second Revision
1 Application on Hard Disk
2 Application on CD
3 Application on Floppy Disk
4 Application on USB Flash Drive
5 Conclusion
6 Acknowledgments
Note: 1) Many materials cited in this tutorial are from the Internet, and the copyright belongs to the original website or the original author.
2) Please refer to "grub4dos Beginner's Tutorial - Introduction Chapter" first.
3) The application environment is Windows/DOS.
4) I have just come into contact with grub and have a very superficial understanding of grub. Please point out any errors.
******************************************************************
1 Application on Hard Disk
To apply grub on a hard disk, you first need to install it. The installation/booting methods are mainly 3 types, namely a, enter grub4dos through the boot menu of Windows NT; b, boot grub through DOS; c, boot grub through MBR.
After installing grub, you need to prepare the menu file menu.lst.
1.1 Loading Floppy Disk Image
For Windows users, using grub to load a floppy disk image is one of the most commonly used functions. Since Windows 2K/XP has been separated from DOS, performing some operations under DOS such as system backup/recovery has become a difficult problem for beginners. Previously, we might need to use a boot CD, etc., to enter DOS. The characteristics of the CD determine that it is difficult to update the tools on the CD in a timely and convenient manner. The appearance and application of grub have solved this problem. We can not only enter the DOS environment without using other media, but also update tools in a timely manner. Many of the various system maintenance tools downloaded from the Internet are in img format. Without extracting the files, we can use them by slightly modifying menu.lst, and various tools can coexist harmoniously, which is very convenient to use.
How to add the downloaded xxx.img to the grub boot menu?
You just need to save xxx.img to the C:\boot\grub directory, edit menu.lst, and add the following content.
title Boot from Floppy image XXX
map --mem /boot/grub/xxx.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
Note: These lines of content cannot be added at the very beginning because the previous ones are some settings that are effective globally.
All the tools you need can be added in this way.
Maybe you have many tools, and adding them all to the menu will make it messy. Usually, there may be only one or two commonly used tools, and many are only used occasionally. For this situation, you can take the following method. That is, write the commonly used ones into the menu, and at the same time write the content of a general startup img file in the menu. For example, the above
title Boot from Floppy image XXX
map --mem /boot/grub/xxx.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
In this way, after starting grub and entering the menu, select "Boot from Floppy image XXX", press "e" to enter the editing state, move the direction keys, modify xxx.img to the file name you need to start, press Enter, and press "b" to start. (If the img file is saved in another path, change it to the corresponding path.)
1.2 Booting WinPE
Some system maintenance operations are not convenient or even cannot be performed under DOS. The appearance of WinPE has brought us a lot of convenience. The following takes the widely praised光棍版 WinPE modified by LaoMaotao as an example to introduce how to use grub to boot WinPE. (The光棍版 WinPE already has an installation program. Here, I will introduce adding a general winpe option in menu.lst.)
Steps: 1. Download the光棍版 WinPE, extract it to get BootCD.ISO.
2. Use a virtual CD-ROM or UltraISO, etc., to extract WINPE.IS_, WINNT.XPE, and WXPE\SETUPLDR.BIN from the ISO, copy these 3 files to C:\, and rename SETUPLDR.BIN to ldrxpe. If external programs are needed, also copy XPEMENU.INI and the "external program" directory to the root directory of any disk.
3. Add the following in menu.lst
title Micro Windows XPE (by LaoMaotao)
chainloader /ldrxpe
In this way, when you start grub and select "Micro Windows XPE (by LaoMaotao)", you can boot WinPE.
1.3 Booting Systems
For a single hard disk with multiple systems installed and multiple hard disks with multiple systems installed, grub can be used to conveniently manage the booting of each system.
For example, you can add the following options in menu.lst:
title Boot the operating system on the first primary partition (hd0,0) of the first hard disk
rootnoverify (hd0,0)
makeactive
chainloader +1
title Boot the operating system on the second primary partition (hd0,1) of the first hard disk
rootnoverify (hd0,1)
makeactive
chainloader +1
title Boot the operating system on the first primary partition (hd1,0) of the second hard disk
rootnoverify (hd1,0)
makeactive
chainloader +1
title Boot Windows NT/2000/XP/2003
find --set-root /ntldr
chainloader /ntldr
title Boot Microsoft Windows Vista
find --set-root /bootmgr
chainloader /bootmgr
title Boot DOS/Windows 95/98/Me
find --set-root /io.sys
chainloader /io.sys
******************************************************************
2 Application on CD
The following introduces two methods to apply grub on a CD.
2.1 Bootable CD guided by grub
Use grldr as the boot file of the CD to guide the CD, load menu.lst, and select the boot item through the menu.
Steps: 1) Prepare necessary img files, and grldr, menu.lst (prepare font, background image, memdisk.gz, etc., files as needed).
2) Edit menu.lst. The format to guide the img file on the CD is as follows:
title Win98 (MAP-HOOK-1)
map --mem (cd)/boot/grub/win98.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
The menu can also guide the img file on the hard disk, for example:
title GreenGhost (MEMDISK)
kernel (hd0,4)/boot/grub/memdisk.gz c=200 h=2 s=36 floppy
initrd (hd0,4)/boot/grub/gghost.img c=200 h=2 s=36 floppy
3) Organize files. For example, create a grubcd directory under E:\temp, copy menu.lst to this directory, and the menu.lst file will be in the root directory of the CD. Create a boot\grub directory under this directory to save various img, font, etc., files. Note: The file names of all files referenced in menu.lst that are displayed on the hard disk need to be lowercase, and uppercase ones need to be changed to lowercase.
4) Make ISO. Use UltraISO to create a new ISO file, add all files in the E:\temp\grubcd directory to the ISO file; perform "Boot CD" - "Load Boot File", select the grldr file. Then perform "File" - "Properties", select the "Allow lowercase letters" option, and save the ISO file.
You can also use tools such as mkisofs.exe or CDIMAGE.EXE to make a bootable ISO.
5) Burn the made bootable ISO with Nero, etc. If conditions permit, you can test it in a virtual machine first and then burn it, or use CD-RW/DVD+RW to burn it.
2.2 Bootable CD with BCDW guiding GRUB
This method is to use BCDW to make a bootable CD, and execute grub through BCDW to load the grub menu.
Steps: 1) First download the BCDW software package, extract it to get the required files.
2)Organize files. For example, create a bcdwcd directory under E:\temp. The files in this directory will be in the root directory of the CD. Create a boot\grub directory and a bcdw directory under it. Copy bcdw.bin, bcdw.ini, and loader.bin from the bcdw directory in the software package to the created bcdwcd\bcdw directory; copy grldr, various img, font, etc., files to the bcdwcd\boot\grub directory. The editing method of the menu.lst file is the same as introduced in 2.1 above.
3) Edit the bcdw.ini file. Open bcdw.ini, find the part, for example:
C:\ ; Boot from drive C:
\WNPE\setupldr.bin ; Bart's Preinstalled Environment
\I386\setupldr.bin ; Microsoft Windows XP Setup
\BCDW\bcdw2dos.ima \WIN9X\setup.exe ; Microsoft Windows 98 Setup
The above is an example of the BCDW boot menu. Add the grub item in it to become:
\boot\grub\grldr ; Grub4dos
C:\ ; Boot from drive C:
\WNPE\setupldr.bin ; Bart's Preinstalled Environment
\I386\setupldr.bin ; Microsoft Windows XP Setup
\BCDW\bcdw2dos.ima \WIN9X\setup.exe ; Microsoft Windows 98 Setup
4)The method of making the ISO file and burning the ISO is basically the same as in 2.1. The difference is that when making the ISO file, loader.bin needs to be used as the boot file of the ISO. You can also use tools such as mkisofs.exe or CDIMAGE.EXE to make a bootable ISO.
******************************************************************
3 Application on Floppy Disk
There are mainly two ways to apply grub on a floppy disk, namely booting grub through DOS and installing the GRLDR boot record to the boot sector of the floppy disk (for the installation method, refer to "grub4dos Beginner's Tutorial - Introduction Chapter").
3.1 Application of Floppy Disk Booted by grub through DOS
First, make the floppy disk into a bootable disk. The simplest way is that the floppy disk only needs three files: io.sys, msdos.sys, and command.com.
Then copy grub.exe and menu.lst to the root directory of the floppy disk.
Create a new autoexec.bat file, which only needs to write 4 letters.
grub
Then edit menu.lst. Due to the limited capacity of the floppy disk, it is generally difficult to directly call the img file on the floppy disk in the menu. Therefore, it can mainly be used to boot the img file on the hard disk and also to manage the booting of each system. The files with specified paths used in the menu file (such as fonts, img files, etc.) should be prepared in advance, otherwise the option cannot run. (There are also examples on the Internet of including many maintenance tools in the limited capacity of the floppy disk. Those who are interested can search by themselves.)
An example of the menu.lst file:
timeout 10
default 0
splashimage (fd0)/boot/grub/xp2008.gz
fontfile (fd0)/boot/grub/fonts
title GreenGhost (MAP-HOOK)
map --mem (hd0,4)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title Find /menu.lst on the hard disk
find --set-root /menu.lst
configfile /menu.lst
title Boot the operating system on the first primary partition (hd0,0) of the first hard disk
rootnoverify (hd0,0)
makeactive
chainloader +1
title Boot the operating system on the second primary partition (hd0,1) of the first hard disk
rootnoverify (hd0,1)
makeactive
chainloader +1
title Boot the operating system on the first primary partition (hd1,0) of the second hard disk
rootnoverify (hd1,0)
makeactive
chainloader +1
title Reboot
reboot
title Shutdown
halt
3.2 Application of Floppy Disk with GRLDR Boot Record Installed in the Boot Sector
After the GRLDR boot record is installed, only grldr and menu.lst and the files referenced in menu.lst need to be retained on the floppy disk. The use of the menu.lst file is the same as in "3.1 Booting grub through DOS" on the floppy disk.
******************************************************************
4 Application on USB Flash Drive
To apply grub on a USB flash drive, it is similar to a floppy disk. There are mainly two ways, namely booting grub through DOS and installing the GRLDR boot record to the boot sector of the USB flash drive (for the installation method, refer to "grub4dos Beginner's Tutorial - Introduction Chapter").
First, use the built-in tools of the USB flash drive or usboot, flashboot, etc., to make the USB flash drive into a DOS bootable disk. At the same time, set the corresponding options in the computer's CMOS to see if the USB flash drive can boot into DOS. If it can, you can continue reading; if it cannot boot, you can try different modes, use other making tools, etc., and continue reading after it can boot.
In different boot modes, after the USB flash drive boots into DOS, it may be drive A or drive C on your computer.
Since the USB flash drive has a large capacity, various tools and WinPE can be stored on the USB flash drive.
When it is displayed as drive A, the usage method is similar to that of a floppy disk.
The usage of starting the img image file in the menu.lst file is as follows:
title GreenGhost (MAP-HOOK)
map --mem (fd0)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
When it is displayed as drive C, the usage method is similar to that of a hard disk.
The usage of starting the img image file in the menu.lst file is as follows:
title GreenGhost (MAP-HOOK)
map --mem (hd0,0)/boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
In the above example, the menu.lst uses an absolute path to reference files, that is, (fd0)/boot/grub/gghost.img and (hd0,0)/boot/grub/gghost.img. This usage is no problem for a specific machine. But when the same USB flash drive is used on different machines, it may cause a problem. That is, different menu.lst files may be needed for different machines, otherwise the tool cannot be started normally. Then, is there any way to avoid this trouble? The answer is yes, that is, use "find --set-root" and a relative path to achieve. In this way, you don't have to worry about whether the USB flash drive is recognized as fd or hd.
For example, you can create a characteristic file in the root directory of the USB flash drive, such as myudisk.txt
In this way, to start the img image file on the USB flash drive, you can use the following method:
title GreenGhost (MAP-HOOK)
find --set-root /myudisk.txt
map --mem /boot/grub/gghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
To boot WinPE on the USB flash drive, you can use:
title Micro Windows XPE (by LaoMaotao)
find --set-root /myudisk.txt
chainloader /ldrxpe
Refer to other examples, and by editing your menu.lst, you can give full play to the performance of the USB flash drive.
******************************************************************
5 Conclusion
This article only writes about some of the most basic applications of grub4dos. More functions of Grub4dos need you to try and explore.
I hope this article will help you use grub4dos faster.
I am looking forward to sharing your achievements.
Note: My network disk: http://lianjiang2004.ys168.com also provides the download of some grub-related files and materials.
Recommended forums:
Space Forum: http://bbs.znpc.net
China DOS Union Forum: http://www.cn-dos.net/forum/
Wuyou Boot Forum: http://bbs.wuyou.com
******************************************************************
6 Acknowledgments
The completion of this article refers to and quotes from many materials, and many of them can no longer find the original source. After the first draft was completed, many netizens pointed out the shortcomings and put forward modification suggestions, and also received the support and encouragement of the software developers. Thanks are extended here.
lianjiang 2007.03.13 First Draft
2007.03.13 First Revision
2007.03.14 Second Revision
[ Last edited by lianjiang2004 on 2007-3-29 at 09:01 PM ]
Recent Ratings for This Post
( 4 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| electronixtar | +8 | 2007-03-14 02:27 |
| vkill | +8 | 2007-03-14 02:30 |
| NaturalJ0 | +7 | 2007-03-27 21:56 |
| xing7749 | +8 | 2007-03-28 10:25 |
Windows 一键还原
http://www.yjhy.com
http://www.yjhy.com



