This commit is contained in:
gferg 2003-03-21 16:32:45 +00:00
parent b8eee11a18
commit 2086cbf7d7
1 changed files with 421 additions and 132 deletions

View File

@ -45,12 +45,13 @@ Al Dev (Alavoor Vasudevan)
" name="
alavoor[AT]yahoo.com
">
<date>v4.7, 15 March 2003
<date>v4.9, 20 March 2003
<abstract>
This is a detailed guide to kernel configuration, compilation, upgrades,
and troubleshooting for ix86-based systems. Can be useful for other architectures
as well.
as well. This document is kept small & simple so that even non-technical home computer
users will be able to compile the Linux Kernel and run Linux.
</abstract>
<toc>
@ -67,12 +68,16 @@ You compile Linux kernel for one of following reasons:
<p>
<item> For <bf>Defence Industries</bf> or <bf>Military applications</bf>, you must
read the kernel source code and compile with your own hands. No exceptions!!
(U.S Dept of Defence compiles the Linux kernel before distributing computers).
(U.S Dept of Defence compiles the Linux kernel before distributing the computers).
<p>
<item> Every country and every Government in the world compiles the kernel on
site for security and integrity.
Every Government/Corporation audits and verifies each and every line of the OS kernel before
using the computer.
Every Government/Corporation audits and verifies each and every line of the OS kernel
source code before using the computer.
<p>
<item> Military Intelligence agencies around the world reads and compiles
the Linux kernel source code. They know what each and every line of Linux kernel
source code is doing!!
<p>
<item> Each and every University in the world compiles the OS kernel before using
any computer!
@ -82,9 +87,15 @@ any computer!
<item> For very advanced scientific applications - you may need to do kernel compile
<p>
<item> It is an International Law (the U.N. laws) - "You cannot use a computer
WITHOUT compiling the OS kernel". If you disobey this law you will be "punished"
with lot of computer problems!! You must compile the kernel with your own hands
and not rely on someone else to do it for you!!
WITHOUT compiling the OS kernel with your own hands". If you disobey this law
you will be "punished" with lot of computer problems!! You must compile the kernel
with your own hands and not rely on someone else to do it for you!!
<p>
<item> It is Illegal, Unlawful, Felony and Fraud to use a computer without
compiling the OS Kernel with your VERY OWN hands!
<p>
<item> In USA, all the corporations mandate compilation of OS kernel before using the
computer and hence there is Linux, Linux & Linux everywhere in United States!
<p>
<item> And for many hundreds of reasons - too numerous to list!
</itemize>
@ -94,6 +105,10 @@ And, if you are successful in compiling the Linux kernel then you
can skip the remaining chapters.
<p>
Note: This document is kept small & simple so that even non-technical home computer
users will be able to compile the Linux Kernel and run Linux!
@ -108,7 +123,7 @@ You may want to check there for changes).
Mirror sites are at -
<url name="angelfire" url="http://www.angelfire.com/country/aldev0">,
<url name="geocities" url="http://www.geocities.com/alavoor/index.html">.
These sites have <bf>lots of linux goodies</bf> and tips.
These sites have lots of linux goodies and tips.
Kernel re-compile is required in order to make the kernel very lean
and which will result in FASTER operating system . It is also
@ -126,38 +141,6 @@ in this page you can find open-source/freeware backup tools listed under 'Backup
Backup is just a suggestion and it is not mandatory to do backup before
building the Linux kernel.
<sect1> For the Impatient<label id="impatient">
<p>
<enum>
<item> Unpack the sources
<item> Optional - You can copy the .config file from your old linux kernel source tree
to new kernel tree (may save time, if you want to reuse the old settings).
<item> make clean; make mrproper
<item> make xconfig
<item> make dep
<item> make
<item> make bzImage
<item> make modules
<item> make modules_install
<item> make install
<item> make rpm # To build rpm packages
<item> configure LILO or GRUB.
<item> Optional - make clean (If you want to free up disk space)
</enum>
On Redhat, instead of using 'make' commands you can use rpm command to build kernel.
If you want to build binary RPMs (kernel*.i386.rpm), do this:
<enum>
<item> Install kernel*.src.rpm
<item> cd /usr/src/redhat/SPECS
<item> rpmbuild -ba kernel*.spec # or rpm -ba kernel*.spec # for old systems
<item> cd /usr/src/redhat/i386; rpm -i kernel*.rpm
</enum>
See details of above steps in the following sections....
<sect1> Minor Upgrading of Kernel <label id="upgrading">
<p>
If you had already built the kernel and you want to upgrade to next patch release,
@ -179,6 +162,38 @@ After this, look in the next section to do make and install.
<sect1> For the Impatient<label id="impatient">
<p>
<enum>
<item> Unpack the sources
<item> Optional - You can copy the .config file from your old linux kernel source tree
to new kernel tree (may save time, if you want to reuse the old settings).
<item> make clean; make mrproper
<item> make xconfig
<item> make dep
<item> make # And you can go to lunch or go to bed (have nice Linux dreams in sleep) and when you come back the system is ready!
<item> make bzImage
<item> make modules
<item> make modules_install
<item> make install # But NOT recommended - use cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker
<item> make rpm # To build rpm packages
<item> configure LILO or GRUB.
<item> Optional - make clean (If you want to free up disk space)
</enum>
On Redhat, instead of using 'make' commands you can use rpm command to build kernel.
If you want to build binary RPMs (kernel*.i386.rpm), do this:
<enum>
<item> Install kernel*.src.rpm
<item> cd /usr/src/redhat/SPECS
<item> rpmbuild -ba kernel*.spec # or rpm -ba kernel*.spec # for old systems
<item> cd /usr/src/redhat/i386; rpm -i kernel*.rpm
</enum>
See details of above steps in the following sections....
<sect1> Building New Kernel - Explanation of Steps<label id="steps">
<p>
<bf>Details of the steps mentioned in the previous section: </bf>
@ -214,6 +229,8 @@ dev86*.rpm on cdrom or from
, <url name="bin86-kondara" url="http://rpmfind.net/linux/RPM/kondara/jirai/i586/bin86-0.4-8k.i586.html">
).
<p>
<!-- intentional blank line with a period -->
<p>
<item>
<bf>Optional : </bf>
@ -227,6 +244,8 @@ to new kernel tree (may save time, if you want to reuse the old settings).
or alternatively, you can use "make oldconfig"
which default all questions based on the contents of your existing ./.config file.
<p>
<!-- intentional blank line with a period -->
<p>
<item>
<bf>Clean : </bf>
@ -236,6 +255,7 @@ Before doing mrproper below, you may want to backup the .config file.
bash# make clean
bash# make mrproper # Must do this if want to start clean slate or if you face lot of problems
</code>
<p>
<item>
@ -303,6 +323,7 @@ bash# man modprobe
Save and Exit "make xconfig".
All the options which you selected is now saved into configuration file
at <it>/usr/src/linux/.config</it> (dot config file).
<p>
<item>
@ -311,12 +332,12 @@ And now, do -
<code>
bash# make dep
</code>
<p>
<p>
<item>
<bf>Give Name to Kernel: </bf>
<bf>Give a unique Name to your new Kernel: </bf>
You can give a name to your kernel, so that it is unique and does not
interfere with others.
<code>
@ -325,8 +346,6 @@ bash# vi Makefile
</code>
Here look for EXTRAVERSION = -19.8.0Blah_Blah_Blah
and change to something like EXTRAVERSION = -19.8.0MyKernel.26Jan2003
<p>
<p>
<item>
@ -353,6 +372,7 @@ bash# insmod loop
bash# lsmod
</code>
You can set PATH the insmod searches in /etc/modules.conf
<p>
@ -381,6 +401,10 @@ Now, give the make command -
This will put the kernel in /usr/src/linux/arch/i386/boot/bzImage
</code>
And now, you can go to lunch or go to bed (have nice Linux dreams in sleep) and
when you come back the system is ready! You can check with command 'less nohup.out' to see
the log of output.
<p>
<item>
@ -392,13 +416,12 @@ new kernel <bf>MAY NOT</bf> boot.
bash# cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker.26mar2001
</code>
<bf>NOTE : </bf> For latest kernels (kernel versions 2.4.0 or greater) you may
want to give these commands, so that /boot/initrd*.img is created as well
entries in grub are made automatically:
<code>
bash# make modules_install # Must do this before doing 'make install'
bash# make install
</code>
<bf>NOTE : </bf>
If you are planning to use the initrd in LILO or GRUB then you may want to
build initrd and place it in /boot/initrd*.img.
See the Appendix A at <ref id="createinitrd" name="Creating initrd.img file">.
<p>
<!-- intentional blank line with a period -->
<p>
<item>
@ -436,32 +459,22 @@ You must re-run lilo even if the entry 'myker' exists, everytime you create a ne
<p>
<p>
<bf>Configure GRUB: </bf>
GRUB differs from bootloaders such as LILO in that it can lie to Windows and make
GRUB is recent and much better tool than LILO and it is my first preference to use GRUB.
LILO is an older technology.
GRUB differs from bootloaders such as LILO in that <it>"it can lie to MS Windows and make
Windows believe that it's installed on the first partition even if
it's not. So you can keep your current Linux system where it is and install
it's not"</it>. So you can keep your current Linux system where it is and install
Windows on the side.
See
<itemize>
<item> <url url="http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/intro.html">
<item> GNU GRUB <url url="http://www.gnu.org/software/grub">
<item> <url name="Redhat Manual" url="http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/ch-grub.html">.
<item> <url name="Multiboot-with-GRUB minihowto" url="http://www.tldp.org/HOWTO/mini/Multiboot-with-GRUB.html">
<item> <url name="Grub Manual" url="http://www.mcc.ac.uk/grub/grub_toc.html">
</itemize>
<code>
bash# man grub
bash# man grubby # (command line tool for configuring grub, lilo, and elilo)
bash# man grub-install
</code>
Edit the file /etc/grub.conf to make entries for the new kernel.
<p>
See the <ref id="grubconf" name="GRUB details and sample grub.conf"> file.
<p>
<item> Reboot the machine and at lilo press tab key and
type 'myker' If it boots then you did a good job! Otherwise at lilo
select your old kernel, boot and re-try all over again. Your old kernel
<bf>is still INTACT and SAFE</bf> at say <it>/boot/vmlinuz-2.0.34-0.6</it>
<p>
<p>
<item> If your new kernel 'myker' boots and works properly, you can create the
@ -474,26 +487,13 @@ See also mkbootdisk -
bash# rpm -i mkbootdisk*.rpm
bash# man mkbootdisk
</code>
<p>
<p>
<item>
<bf>Clean: </bf>
Optional - make clean (If you want to free up disk space)
<p>
<!--
No need of this - use 'make install' to create initrd.img
<p>
<item>
<bf>Optional - Initrd.img : </bf>
<p>
To create /boot/initrd.img see the documentation at
/usr/src/linux/Documentation/initrd.txt
and
<url name="Loopback-Root-mini-HOWTO" url="http://www.tldp.org/HOWTO/mini/Loopback-Root-FS-3.html#ss3.3">.
You do not need to create as you use the existing /boot/initrd.img.
-->
</enum>
@ -572,53 +572,6 @@ or <url name="firewall.src.rpm" url="http://rpmfind.net/linux/RPM/contrib/noarch
Refer to HOWTO docs relating to your devices at <url url="http://www.linuxdoc.org">
<sect1> Sample lilo.conf <label id="liloconf">
<p>
Read this section only if you are using LILO and if you are using GRUB skip
this section.
Given below is a sample /etc/lilo.conf file. You should follow the
naming conventions like ker2217 (for kernel 2.2.17), ker2214 (for kernel 2.2.14).
You can have many kernel images on the same /boot system.
On my machine I have something like:
<code>
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=firewall
image=/boot/vmlinuz-2.2.14-5.0
label=ker2214
read-only
root=/dev/hda9
image=/boot/vmlinuz-2.2.17-14
label=ker2217
read-only
root=/dev/hda9
#image=/usr/src/linux/arch/i386/boot/bzImage
# label=myker
# root=/dev/hda7
# read-only
image=/boot/bzImage.myker.11feb2001
label=myker11feb
root=/dev/hda9
read-only
image=/boot/bzImage.myker.01jan2001
label=myker01jan
root=/dev/hda9
read-only
image=/boot/bzImage.myker-firewall.16mar2001
label=firewall
root=/dev/hda9
read-only
</code>
<sect> Troubleshoot Common Mistakes <label id="troubleshoot">
@ -770,6 +723,11 @@ bash# rpm -i /mnt/cdrom/contrib/kernel-modules*.rpm
</code>
<p>
<sect1> See Docs
<p>
More problems. You can read the /usr/src/linux/README (at least once)
and also /usr/src/linux/Documentation.
<sect1>make clean <p>
If your new kernel does really weird things after a routine kernel upgrade,
@ -1869,7 +1827,8 @@ before an upgrade. They are available with anonymous ftp from
<url url="http://www.crynwr.com/kchanges">
<p>
<sect>Other relevant HOWTOs that might be useful<p>
<sect> Relevant HOWTOs
<p>
<itemize>
<item> Sound-HOWTO: sound cards and utilities
<item> SCSI-HOWTO: all about SCSI controllers and devices
@ -2075,5 +2034,335 @@ You can read the latex, LyX output using LyX a X-Windows front end to latex.
<sect> Appendix A - Creating initrd.img file <label id="createinitrd">
<p>
<sect1> Kernel Docs
<p>
To create /boot/initrd.img see the documentation at
/usr/src/linux/Documentation/initrd.txt
and see also
<url name="Loopback-Root-mini-HOWTO"
url="http://www.tldp.org/HOWTO/mini/Loopback-Root-FS-3.html#ss3.3">.
You do not need to create the image as you can use the existing /boot/initrd.img.
<sect1> Using mkinitrd
<p>
You can read the mkinitrd man page. It creates an image in a single command. This
is command is peculiar to RedHat.
See the next section for the manual method of creating an initrd image.
<code>
man mkinitrd
su - root
# The command below creates the initrd image file
mkinitrd ./initrd-2.4.18-19.8.0custom.img 2.4.18-19.8.0custom
ls -l initrd-2.4.18-19.8.0custom.img
-rw-r--r-- 1 root root 127314 Mar 19 21:54 initrd-2.4.18-19.8.0custom.img
</code>
<sect1> Linuxman Book
<p>
A cut from <url url="http://www.linuxman.com.cy/rute/node1.html"> chapter 31.7.
SCSI Installation Complications and initrd
Some of the following descriptions may be difficult to understand without
knowledge of kernel modules explained in Chapter 42. You may want to come back
to it later.
Consider a system with zero IDE disks and one SCSI disk containing a LINUX
installation. There are BIOS interrupts to read the SCSI disk, just as there
were for the IDE, so LILO can happily access a kernel image somewhere inside
the SCSI partition. However, the kernel is going to be lost without a kernel
module [See Chapter 42. The kernel doesn't support every possible kind of
hardware out there all by itself. It is actually divided into a main part (the
kernel image discussed in this chapter) and hundreds of modules (loadable parts
that reside in /lib/modules/) that support the many type of SCSI, network,
sound etc., peripheral devices.] that understands the particular SCSI driver.
So although the kernel can load and execute, it won't be able to mount its root
file system without loading a SCSI module first. But the module itself resides
in the root file system in /lib/modules/. This is a tricky situation to solve
and is done in one of two ways: either (a) using a kernel with preenabled SCSI
support or (b) using what is known as an initrd preliminary root file system
image.
The first method is what I recommend. It's a straightforward (though
time-consuming) procedure to create a kernel with SCSI support for your SCSI
card built-in (and not in a separate module). Built-in SCSI and network drivers
will also autodetect cards most of the time, allowing immediate access to the
device--they will work without being given any options [Discussed in Chapter
42.] and, most importantly, without your having to read up on how to configure
them. This setup is known as compiled-in support for a hardware driver (as
opposed to module support for the driver). The resulting kernel image will be
larger by an amount equal to the size of module. Chapter 42 discusses such
kernel compiles.
The second method is faster but trickier. LINUX supports what is known as an
initrd image ( initial rAM disk image). This is a small, +1.5 megabyte file
system that is loaded by LILO and mounted by the kernel instead of the real
file system. The kernel mounts this file system as a RAM disk, executes the
file /linuxrc, and then only mounts the real file system.
31.6 Creating an initrd Image
Start by creating a small file system. Make a directory ~/initrd and
copy the following files into it.
<code>
drwxr-xr-x 7 root root 1024 Sep 14 20:12 initrd/
drwxr-xr-x 2 root root 1024 Sep 14 20:12 initrd/bin/
-rwxr-xr-x 1 root root 436328 Sep 14 20:12 initrd/bin/insmod
-rwxr-xr-x 1 root root 424680 Sep 14 20:12 initrd/bin/sash
drwxr-xr-x 2 root root 1024 Sep 14 20:12 initrd/dev/
crw-r--r-- 1 root root 5, 1 Sep 14 20:12 initrd/dev/console
crw-r--r-- 1 root root 1, 3 Sep 14 20:12 initrd/dev/null
brw-r--r-- 1 root root 1, 1 Sep 14 20:12 initrd/dev/ram
crw-r--r-- 1 root root 4, 0 Sep 14 20:12 initrd/dev/systty
crw-r--r-- 1 root root 4, 1 Sep 14 20:12 initrd/dev/tty1
crw-r--r-- 1 root root 4, 1 Sep 14 20:12 initrd/dev/tty2
crw-r--r-- 1 root root 4, 1 Sep 14 20:12 initrd/dev/tty3
crw-r--r-- 1 root root 4, 1 Sep 14 20:12 initrd/dev/tty4
drwxr-xr-x 2 root root 1024 Sep 14 20:12 initrd/etc/
drwxr-xr-x 2 root root 1024 Sep 14 20:12 initrd/lib/
-rwxr-xr-x 1 root root 76 Sep 14 20:12 initrd/linuxrc
drwxr-xr-x 2 root root 1024 Sep 14 20:12 initrd/loopfs/
</code>
On my system, the file initrd/bin/insmod is the statically linked [meaning it
does not require shared libraries.] version copied from /sbin/insmod.static--a
member of the modutils-2.3.13 package. initrd/bin/sash is a statically linked
shell from the sash-3.4 package. You can recompile insmod from source if you
don't have a statically linked version. Alternatively, copy the needed DLLs
from /lib/ to initrd/lib/. (You can get the list of required DLLs by running
ldd /sbin/insmod. Don't forget to also copy symlinks and run strip -s {lib} to
reduce the size of the DLLs.)
Now copy into the initrd/lib/ directory the SCSI modules you require. For
example, if we have an Adaptec AIC-7850 SCSI adapter, we would require the
aic7xxx.o module from /lib/modules/{version}/scsi/aic7xxx.o. Then, place it in
the initrd/lib/ directory.
<code>
-rw-r--r-- 1 root root 129448 Sep 27 1999 initrd/lib/aic7xxx.o
</code>
The file initrd/linuxrc should contain a script to load all the modules needed
for the kernel to access the SCSI partition. In this case, just the aic7xxx
module [ insmod can take options such as the IRQ and IO-port for the device.
See Chapter 42.]:
<code>
#!/bin/sash
aliasall
echo "Loading aic7xxx module"
insmod /lib/aic7xxx.o
</code>
Now double-check all your permissions and then chroot to the file system for
testing.
<code>
chroot ~/initrd /bin/sash
/linuxrc
</code>
Now, create a file system image similar to that in Section 19.9:
<code>
dd if=/dev/zero of=~/file-inird count=2500 bs=1024
losetup /dev/loop0 ~/file-inird
mke2fs /dev/loop0
mkdir ~/mnt
mount /dev/loop0 ~/mnt
cp -a initrd/* ~/mnt/
umount ~/mnt
losetup -d /dev/loop0
</code>
Finally, gzip the file system to an appropriately named file:
<code>
gzip -c ~/file-inird > initrd-<kernel-version>
</code>
31.7 Modifying lilo.conf for initrd
Your lilo.conf file can be changed slightly to force use of an initrd file
system. Simply add the initrd option. For example:
<code>
boot=/dev/sda
prompt
timeout = 50
compact
vga = extended
linear
image = /boot/vmlinuz-2.2.17
initrd = /boot/initrd-2.2.17
label = linux
root = /dev/sda1
read-only
</code>
Notice the use of the linear option. This is a BIOS trick that you can read
about in lilo(5). It is often necessary but can make SCSI disks nonportable to
different BIOSs (meaning that you will have to rerun lilo if you move the disk
to a different computer).
<sect> Appendix B - Sample lilo.conf <label id="liloconf">
<p>
Read this section only if you are using LILO and if you are using GRUB skip
this section.
Given below is a sample /etc/lilo.conf file. You should follow the
naming conventions like ker2217 (for kernel 2.2.17), ker2214 (for kernel 2.2.14).
You can have many kernel images on the same /boot system.
On my machine I have something like:
<code>
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=firewall
image=/boot/vmlinuz-2.2.14-5.0
label=ker2214
read-only
root=/dev/hda9
image=/boot/vmlinuz-2.2.17-14
label=ker2217
read-only
root=/dev/hda9
#image=/usr/src/linux/arch/i386/boot/bzImage
# label=myker
# root=/dev/hda7
# read-only
image=/boot/bzImage.myker.11feb2001
label=myker11feb
root=/dev/hda9
read-only
image=/boot/bzImage.myker.01jan2001
label=myker01jan
root=/dev/hda9
read-only
image=/boot/bzImage.myker-firewall.16mar2001
label=firewall
root=/dev/hda9
read-only
</code>
<sect> Appendix C - GRUB Details And A Sample grub.conf <label id="grubconf">
<p>
See
<itemize>
<item> <url url="http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/intro.html">
<item> GNU GRUB <url url="http://www.gnu.org/software/grub">
<item> <url name="Redhat Manual" url="http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/ch-grub.html">.
<item> <url name="Multiboot-with-GRUB minihowto" url="http://www.tldp.org/HOWTO/mini/Multiboot-with-GRUB.html">
<item> <url name="Grub Manual" url="http://www.mcc.ac.uk/grub/grub_toc.html">
</itemize>
<code>
bash# man grub
bash# man grubby # (command line tool for configuring grub, lilo, and elilo)
bash# man grub-install
</code>
Edit the file /etc/grub.conf to make entries for the new kernel.
See the sample file below:
<code>
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,8)
# kernel /boot/vmlinuz-version ro root=/dev/hda9
# initrd /boot/initrd-version.img
#boot=/dev/hda
# By default boot the second entry
default=1
# Fallback to the first entry.
fallback 0
# Boot automatically after 2 minutes
timeout=120
splashimage=(hd0,8)/boot/grub/splash.xpm.gz
title Windows 2000
unhide (hd0,0)
hide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,0)
chainloader +1
makeactive
title Red Hat Linux (2.4.18-19.8.0.19mar2003)
root (hd0,8)
kernel /boot/bzImage.2.4.18-19.8.0.19mar2003 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0custom.img.19mar03
title Red Hat Linux (2.4.18-19.8.0custom)
root (hd0,8)
kernel /boot/vmlinuz-2.4.18-19.8.0custom ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0custom.img
title Red Hat Linux (2.4.18-14)
root (hd0,8)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-14.img
title MyKernel.26jan03 (Red Hat Linux 2.4.18-14)
root (hd0,8)
kernel /boot/bzImage.myker.26jan03 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0.img
title Windows 98
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
rootnoverify (hd0,2)
chainloader +1
makeactive
title DOS 6.22
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,1)
chainloader +1
makeactive
title Partition 2 (floppy)
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
chainloader (fd0)+1
title Partition 3 (floppy)
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
chainloader (fd0)+1
</code>
</article>