126 lines
5.6 KiB
HTML
126 lines
5.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Large Disk HOWTO: Booting</TITLE>
|
|
<LINK HREF="Large-Disk-HOWTO-6.html" REL=next>
|
|
<LINK HREF="Large-Disk-HOWTO-4.html" REL=previous>
|
|
<LINK HREF="Large-Disk-HOWTO.html#toc5" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Large-Disk-HOWTO-6.html">Next</A>
|
|
<A HREF="Large-Disk-HOWTO-4.html">Previous</A>
|
|
<A HREF="Large-Disk-HOWTO.html#toc5">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s5">5. Booting</A></H2>
|
|
|
|
<P>
|
|
<!--
|
|
booting!BIOS usage during
|
|
-->
|
|
|
|
<!--
|
|
disk!BIOS access during booting
|
|
-->
|
|
|
|
When the system is booted, the BIOS reads sector 0 (known as
|
|
the MBR - the Master Boot Record) from the first disk
|
|
(or from floppy or CDROM), and jumps to the code found there - usually
|
|
some bootstrap loader. These small bootstrap programs
|
|
found there typically have no own disk drivers and use
|
|
BIOS services. This means that a Linux kernel can only be
|
|
booted when it is entirely located within the first 1024
|
|
cylinders, unless you both have a modern BIOS (a BIOS that supports
|
|
the Extended INT13 functions), and a modern bootloader
|
|
(a bootloader that uses these functions when available).
|
|
<P>This problem (if it is a problem) is very easily solved:
|
|
make sure that the kernel (and perhaps other files used during bootup,
|
|
such as LILO map files) are located on a partition that is entirely
|
|
contained in the first 1024 cylinders of a disk that the BIOS can access -
|
|
probably this means the first or second disk.
|
|
<P>Thus: create a small partition, say 10 MB large, so that there
|
|
is room for a handful of kernels, making sure that it is entirely
|
|
contained within the first 1024 cylinders of the first or second
|
|
disk. Mount it on <CODE>/boot</CODE> so that LILO will put its stuff there.
|
|
<P>Most systems from 1998 or later will have a modern BIOS.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="linear"></A> <A NAME="LILO"></A> <A NAME="ss5.1">5.1 LILO and the `lba32' and `linear' options</A>
|
|
</H2>
|
|
|
|
<P>Executive summary: If you use LILO as boot loader, make sure you have
|
|
LILO version 21.4 or later. (It can be found at
|
|
<A HREF="ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/">ftp://metalab.unc.edu/pub/Linux/system/boot/lilo/</A>.)
|
|
Always use the <CODE>lba32</CODE> option.
|
|
<P>An invocation of <CODE>/sbin/lilo</CODE> (the boot map installer) stores a list
|
|
of addresses in the boot map, so that LILO (the boot loader) knows from
|
|
where to read the kernel image. By default these addresses are
|
|
stored in (c,h,s) form, and ordinary INT13 calls are used at boot time.
|
|
<P>When the configuration file specifies <CODE>lba32</CODE> or <CODE>linear</CODE>,
|
|
linear addresses are stored. With <CODE>lba32</CODE> also linear addresses
|
|
are used at boot time, when the BIOS supports extended INT13.
|
|
With <CODE>linear</CODE>, or with an old BIOS, these linear addresses are
|
|
converted back to (c,h,s) form, and ordinary INT13 calls are used.
|
|
<P>Thus, with <CODE>lba32</CODE> there are no geometry problems and there is
|
|
no 1024 cylinder limit. Without it there is a 1024 cylinder limit.
|
|
What about the geometry?
|
|
<P>The boot loader and the BIOS must agree as to the disk geometry.
|
|
<CODE>/sbin/lilo</CODE> asks the kernel for the geometry,
|
|
but there is no guarantee that the Linux kernel geometry coincides
|
|
with what the BIOS will use. Thus, often the geometry
|
|
supplied by the kernel is worthless. In such cases it helps
|
|
to give LILO the `<CODE>linear</CODE>' option. The advantage is that
|
|
the Linux kernel idea of the geometry no longer plays a role.
|
|
The disadvantage is that <CODE>lilo</CODE> cannot warn you when
|
|
part of the kernel was stored above the 1024 cylinder limit,
|
|
and you may end up with a system that does not boot.
|
|
<P>
|
|
<H2><A NAME="ss5.2">5.2 A LILO bug</A>
|
|
</H2>
|
|
|
|
<P>With LILO versions below v21 there is another disadvantage:
|
|
the address conversion done at boot time has a bug: when c*H is 65536
|
|
or more, overflow occurs in the computation.
|
|
For H larger than 64 this causes a stricter limit on c than the
|
|
well-known c < 1024; for example, with H=255 and an old LILO
|
|
one must have c < 258. (c=cylinder where kernel image lives,
|
|
H=number of heads of disk)
|
|
<P>
|
|
<H2><A NAME="ss5.3">5.3 1024 cylinders is not 1024 cylinders</A>
|
|
</H2>
|
|
|
|
<P>Tim Williams writes: `I had my Linux partition within the first 1024
|
|
cylinders and still it wouldnt boot. First when I moved it below 1 GB
|
|
did things work.' How can that be? Well, this was a SCSI disk with
|
|
AHA2940UW controller which uses either H=64, S=32 (that is, cylinders
|
|
of 1 MiB = 1.05 MB), or H=255, S=63 (that is, cylinders of 8.2 MB),
|
|
depending on setup options in firmware and BIOS. No doubt the BIOS
|
|
assumed the former, so that the 1024 cylinder limit was found at 1 GiB,
|
|
while Linux used the latter and LILO thought that this limit was at 8.4 GB.
|
|
<P>
|
|
<H2><A NAME="ss5.4">5.4 No 1024 cylinder limit on old machines with IDE</A>
|
|
</H2>
|
|
|
|
<P>The <CODE>nuni</CODE> boot loader does not use BIOS services
|
|
but accesses IDE drives directly. So, one can put it on a
|
|
floppy or in the MBR and boot from anywhere on any IDE drive
|
|
(not only from the first two). Find it at
|
|
<A HREF="//metalab.unc.edu/pub/Linux/system/boot/loaders/">//metalab.unc.edu/pub/Linux/system/boot/loaders/</A>.
|
|
<P>
|
|
<H2><A NAME="ss5.5">5.5 Other boot loaders</A>
|
|
</H2>
|
|
|
|
<P>LILO is a bit fragile, it requires the discipline of running
|
|
<CODE>/sbin/lilo</CODE> each time one installs a new kernel.
|
|
Some other boot loaders do not have this disadvantage.
|
|
Especially <CODE>grub</CODE> is popular these days; a major
|
|
disadvantage is that it does not support the
|
|
<CODE>lilo -R label</CODE> function.
|
|
<P>
|
|
<HR>
|
|
<A HREF="Large-Disk-HOWTO-6.html">Next</A>
|
|
<A HREF="Large-Disk-HOWTO-4.html">Previous</A>
|
|
<A HREF="Large-Disk-HOWTO.html#toc5">Contents</A>
|
|
</BODY>
|
|
</HTML>
|