Difference between revisions of "Boot FreeLoader from GRUB"

From ReactOS Wiki
Jump to: navigation, search
m (add category)
m (remove confusing partition reference as msdos3)
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Background ==
+
GRUB is a popular boot manager for people with many different operating systems installed on one machine or hard disk. [[FreeLoader]] is the bootloader for ReactOS and also a possible boot manager. If you have GRUB already installed and then install ReactOS, FreeLoader's abilities become redundant and annoying. This document shows how to keep FreeLoader from doing much beyond acting as a bootloader for ReactOS.
GRUB is a popular boot manager for people with many different operating systems installed on one machine or hard disk. [[FreeLoader]] is ReactOS's bootloader and also a possible boot manager. If you have GRUB already installed and then install ReactOS, FreeLoader's abilites become redundant and annoying. This document shows how to keep FreeLoader from doing much but acting as a bootloader for ReactOS.
 
  
 
== Method ==
 
== Method ==
FreeLoader can be loaded as a "multiboot kernel" by multiboot compliant bootstrap loaders like GRUB. To load FreeLoader from GRUB, put something like this in the GRUB's '''menu.lst''' configuration file:
+
FreeLoader can be loaded as a "multiboot kernel" by multiboot compliant bootstrap loaders like GRUB. To load FreeLoader from GRUB, put something like this in the GRUB's <code>menu.lst</code> configuration file:
 +
 
 +
title ReactOS
 +
root (hd0,0)
 +
kernel /freeldr.sys
  
<pre>
 
title ReactOS
 
root (hd0,0)
 
kernel /freeldr.sys
 
</pre>
 
  
 
Note:
 
Note:
* (hd0,0) refers to the first partition on the first disk.
+
* <code>(hd0,0)</code> refers to the first partition on the first disk.
* (hd1,0) refers to the first partition on the second disk.
+
* <code>(hd1,0)</code> refers to the first partition on the second disk.
* (hd0,1) refers to the second partition on the first disk.
+
* <code>(hd0,1)</code> refers to the second partition on the first disk.
  
You should make sure that the path referred to by "kernel" and '''freeldr.sys''' is on a FAT16/32 partition.
+
Another generic way to discover the exact GRUB name of your ReactOS partition is to open the GRUB console and type:
 +
> root (hd
 +
and press '''TAB''' button; If you only have one hard drive it will auto-complete the "0," If you have more than one it will list the available hard drives. After you have selected a hard drive you can hit the tab key after the comma and it will again either give you 0 if you only have one partition on that hard drive, or it will give you a list of possible partitions to choose from.
 +
Note that there is no comma between hd0 and the partition number.
  
You can also override settings in the [FREELOADER] section of FreeLoader's '''freeldr.ini''' configuration file by passing them on the command like, like this:
+
You should make sure that the path referred to by "kernel" and <code>freeldr.sys</code> is on a FAT16/32 partition.
  
<pre>
+
You can also override settings in the <tt>[FREELOADER]</tt> section of FreeLoader's <code>freeldr.ini</code> configuration file by passing them on the command line, like this:
title ReactOS
 
root (hd0,0)
 
kernel /freeldr.sys DefaultOS=ReactOS TimeOut=0
 
  
title ReactOS (Debug)
+
title ReactOS
root (hd0,0)
+
root (hd0,0)
kernel /freeldr.sys DefaultOS=ReactOS_Debug TimeOut=0
+
kernel /freeldr.sys DefaultOS=ReactOS TimeOut=0
</pre>
 
  
After selecting "ReactOS" from the GRUB menu you won't have to make another selection on the freeloader menu because of the "TimeOut=0".
+
title ReactOS (Debug)
 +
root (hd0,0)
 +
kernel /freeldr.sys DefaultOS=ReactOS_Debug TimeOut=0
 +
 
 +
After selecting "ReactOS" from the GRUB menu you will not have to make another selection on the freeloader menu because of the <tt>TimeOut=0</tt>.
 +
 
 +
Finally, the working section for GRUB1 looks like:
 +
title ReactOS
 +
          root(hd0,2)
 +
          chainloader +1
 +
          makeactive
 +
          kernel /freeldr.sys
 +
 
 +
''makeactive'' command here is necessary since without it, FreeLDR can't find file freeldr.ini and requests reinstallation of freeloader.
  
 
== GRUB 2 ==
 
== GRUB 2 ==
The next generation of GRUB, GRUB 2 uses other language in its configuration file '''grub.cfg'''. Here is an example how to add a menu entry for ReactOS:
+
The next generation of GRUB, GRUB 2 uses other language in its configuration file <tt>grub.cfg</tt>. Here is an example how to add a menu entry for ReactOS:
 +
 
 +
menuentry "ReactOS" {
 +
set root=(hd0,1)
 +
multiboot /freeldr.sys
 +
}
  
<pre>
+
Note that partition numbering has been changed, and <tt>(hd0,1)</tt> refers to the first partition on the first disk.
menuentry "ReactOS" {
 
set root=(hd0,1)
 
multiboot /freeldr.sys
 
}
 
</pre>
 
  
Note that partition numbering has been changed, and (hd0,1) refers to the first partition on the first disk.
+
The last example in Grub1 section written for GRUB2  would be:
  
== Links ==
+
menuentry "ReactOS" {
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/boot/grub013.zip
+
set root=(hd0,1)
 +
chainloader +1
 +
parttool (hd0,1) boot+
 +
multiboot /freeldr.sys
 +
}
  
 
== External links ==
 
== External links ==
 +
* http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/boot/grub/grub013.zip
 
* [http://www.gnu.org/software/grub/manual/html_node/ GRUB Manual]
 
* [http://www.gnu.org/software/grub/manual/html_node/ GRUB Manual]
 
* [http://www.gnu.org/software/grub GRUB homepage]
 
* [http://www.gnu.org/software/grub GRUB homepage]
Line 53: Line 68:
 
* [http://tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/index.html Linux+Win+Grub HowTo]
 
* [http://tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/index.html Linux+Win+Grub HowTo]
 
* [http://www.skyjammer.com/files/knoppix/ Win32 Grub]
 
* [http://www.skyjammer.com/files/knoppix/ Win32 Grub]
* [http://www.ameritech.net/users/gholmer/booting.html Booting with GRUB]
+
* [http://web.archive.org/web/20060111092704/http://users.ameritech.net/gholmer/booting.html Booting with GRUB]
 
* [http://grub4dos.sourceforge.net/ WinGRUB]
 
* [http://grub4dos.sourceforge.net/ WinGRUB]
* [http://www.geocities.com/lode_leroy/grubinstall/ GRUB Installer for Windows]
+
* [http://web.archive.org/web/20091027053752/http://geocities.com/lode_leroy/grubinstall/ GRUB Installer for Windows]
* [http://grub.linuxeden.com/ GRUB for DOS] - Bridging DOS/Windows to Unix/Linux ( Chinese site )
+
* [http://web.archive.org/web/20080315155840/http://grub.linuxeden.com/ GRUB for DOS] Bridging DOS/Windows to Unix/Linux ( Chinese site )
 +
* [https://sites.google.com/site/grubdos/ GRUB for DOS – Bridging DOS/Windows to Unix/Linux]
  
 
[[Category:Tutorial]]
 
[[Category:Tutorial]]

Latest revision as of 09:10, 7 December 2018

GRUB is a popular boot manager for people with many different operating systems installed on one machine or hard disk. FreeLoader is the bootloader for ReactOS and also a possible boot manager. If you have GRUB already installed and then install ReactOS, FreeLoader's abilities become redundant and annoying. This document shows how to keep FreeLoader from doing much beyond acting as a bootloader for ReactOS.

Method

FreeLoader can be loaded as a "multiboot kernel" by multiboot compliant bootstrap loaders like GRUB. To load FreeLoader from GRUB, put something like this in the GRUB's menu.lst configuration file:

title		ReactOS
root		(hd0,0)
kernel		/freeldr.sys


Note:

  • (hd0,0) refers to the first partition on the first disk.
  • (hd1,0) refers to the first partition on the second disk.
  • (hd0,1) refers to the second partition on the first disk.

Another generic way to discover the exact GRUB name of your ReactOS partition is to open the GRUB console and type:

> root (hd

and press TAB button; If you only have one hard drive it will auto-complete the "0," If you have more than one it will list the available hard drives. After you have selected a hard drive you can hit the tab key after the comma and it will again either give you 0 if you only have one partition on that hard drive, or it will give you a list of possible partitions to choose from. Note that there is no comma between hd0 and the partition number.

You should make sure that the path referred to by "kernel" and freeldr.sys is on a FAT16/32 partition.

You can also override settings in the [FREELOADER] section of FreeLoader's freeldr.ini configuration file by passing them on the command line, like this:

title ReactOS
root	(hd0,0)
kernel	/freeldr.sys DefaultOS=ReactOS TimeOut=0
title ReactOS (Debug)
root	(hd0,0)
kernel	/freeldr.sys DefaultOS=ReactOS_Debug TimeOut=0

After selecting "ReactOS" from the GRUB menu you will not have to make another selection on the freeloader menu because of the TimeOut=0.

Finally, the working section for GRUB1 looks like:

title ReactOS
         root(hd0,2)
         chainloader +1
         makeactive
         kernel /freeldr.sys

makeactive command here is necessary since without it, FreeLDR can't find file freeldr.ini and requests reinstallation of freeloader.

GRUB 2

The next generation of GRUB, GRUB 2 uses other language in its configuration file grub.cfg. Here is an example how to add a menu entry for ReactOS:

menuentry "ReactOS" {
	set root=(hd0,1)
	multiboot /freeldr.sys
}

Note that partition numbering has been changed, and (hd0,1) refers to the first partition on the first disk.

The last example in Grub1 section written for GRUB2 would be:

menuentry "ReactOS" {
	set root=(hd0,1)
	chainloader +1
	parttool (hd0,1) boot+
	multiboot /freeldr.sys
}

External links