????????????????
Booting GNU/Linux II
Breaking the 1024 cylinder barrier
Until recently, 'LiLo', the standard bootloader in all LM releases up
to 7.0, didn't support BIOS LBA translations. Because of a
traditional restriction of the IDE interface, the BIOS can't 'see'
anything which lies beyond the 1024th 'cylinder' of a disk. To
circumvent this problem, a BIOS hack was made, called 'Large
Block Access' (LBA).
But since 'LiLo' didn't support LBA and needed the files in the
'/boot' directory, it was necessary for this directory to be on a
partition which was entirely below the 1024th cylinder (usually
within the first eight GB of a disk).
Since version 21.4.2, LiLo supports LBA and thus booting from
beyond the 1024th cylinder if you add the option lba32 to the first
section of '/etc/lilo.conf'. This version is included in LM 7.1, which
however uses GNU GRUB (GRand Unified Bootloader) as the
standard boot manager. GNU GRUB uses BIOS translations by
default and thus is even better suited to boot from large disks.
But what if you've already installed a pre-7.1 release of LM and now
can't boot it from the disk, because you've put your boot partition
beyond that barrier (despite the warnings of the installer ...)?
If you have a working boot-floppy, that's easy. Boot the system from
floppy, get the latest LiLo RPM from your favourite Cooker mirror,
install it with rpm -U [packagename]. RPM has back-uped your
original '/etc/lilo.conf' to '/etc/lilo.conf.rpmsave'. Move it back to its
old name (mv /etc/lilo.conf.rpmsave /etc/lilo.conf), add the
option lba32 and run lilo. Reboot and you should be able to boot
GNU/Linux from the disk.
If you don't have a working boot-floppy, things are a bit more
complicated. Use your other operating system to download
Explore2fs, which will allow you to read GNU/Linux partitions from
Windows. Go to its 'Options' dialogue and turn on 'INT13h' support.
Use it to copy the GNU/Linux kernel ('/boot/vmlinuz-[version]') to a
Windows partition. This step will allow you to use the loadlin
program.
section index / top
'loadlin' - Booting GNU/Linux From MS-DOS
'loadlin' lets you boot GNU/Linux via MS-DOS. You might prefer this
to using LiLo if you don't want it to change the boot-record of your
hard drive, or if LiLo can't boot your system since the 'root' partition
lies beyond the 1024 cylinder barrier.
You will need to know how GNU/Linux calls the partition where the
'boot' directory is located. Usually this is the first GNU/Linux
partition on your disk. Use either 'Explore2fs' or cfdisk
/dev/[diskname] (usually hda) to find out.
If you need help with GNU/Linux' partition naming scheme, read the
appropriate paragraph on the 'Mounting' page.
1.Create a directory like 'c:\linux'. Copy 'loadlin.exe' from the
'dosutils' directory of your LM CD there.
2.Copy your GNU/Linux kernel image ('vmlinuz-[version]') from
'/boot' to 'c:\linux' and rename it to 'bzimage'.
3.To boot GNU/Linux, boot into MS-DOS mode and - being in
'c:\', type
linux\loadlin bzimage root=/dev/[GNU/Linux root
partition] ro
'bzimage' is the name of your kernel image file, 'root' points to
the partition where the GNU/Linux root partition '/' resides and
'ro' is short for 'read-only' (see above).
Ready. Remember that every time you update the kernel you have
to put an updated version into 'c:\linux\', too.
You can make this much more convenient, e.g. by starting 'loadlin'
via the Windows boot menu.
section index / top
Uninstalling LiLo, GNU GRUB and GNU/Linux
Note that uninstalling GNU/Linux and the bootloader are two
different things! Uninstalling one of them does not remove the other.
Uninstalling LiLo
In Linux:
lilo -u /dev/[disk]
This will restore the previous boot record.
In DOS / Windows (either system or boot floppy):
fdisk /mbr
This will overwrite the boot record with a new, DOS / Windows only
entry.
Uninstalling GNU GRUB
There seems to be no way uninstalling GNU GRUB from within
Linux. Overwrite the boot sector from DOS/Windows using the
undocumented command:
fdisk /mbr
Removing GNU/Linux
Note that DOS 'fdisk' can't delete Linux partitions. In Linux, open a
virtual terminal and type (as 'root')
cfdisk
or - on LM 7.0 and later -:
diskdrake
Now delete all GNU/Linux partitions and set the flag of the Windows
root partition to 'active'. If you can't boot into Linux anymore, create
a rescue floppy from the image in 'images/' on your Mandrake CD.
Since LM 7.1, you can also use the rescue system on the first CD:
just boot from the CD and type
rescue
on the boot prompt.
Both systems use the older fdisk program, started with
fdisk /dev/[disk]
Use 'p' to print the partition table, 'd' to delete partitions and 'w' to
write the changed partition table and quit the program.
Use either the proprietary Partition Magic or the free GNU Parted
(7.1: package 'parted', second CD. Run parted as 'root' and then
type help) to regain the disk space previously allocated to
GNU/Linux.