LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lilo on a floppy, multiple kernels (https://www.linuxquestions.org/questions/linux-newbie-8/lilo-on-a-floppy-multiple-kernels-180435/)

escapee 05-11-2004 04:36 PM

Lilo on a floppy, multiple kernels
 
I have a dual boot system involving two hardrives. Primary master: One partition of WinXp, Primary Slave: Two partitons; half FAT storage, the other half Slackware (latest version).

I chose not to install LILO initially, opting for a floppy only boot. Now that Ive compiled my first custom kernel, I find I have a use for Lilo. The boot floppy I have only boots the one kernel.

So, Id like to install Lilo to a floppy with support for multiple kernels. Ive found and read a few guides, but they all vary enough to confuse the newb. They refer to files and locations I dont have (boot.b, chain.b or /boot/map). I assume skipping the inital Lilo install is the cause of these missing files. I dont even have a /etc/lilo.conf, though I assume thats just a text file I could make.

How to create the files needed by lilo, what files to copy for my particular setup (Ill list my /boot contents if needed) and maybe a sample lilo.conf, this is what I need.

Any help would be appreciated, Im eager to try my first kernel, but not hose my system.

:Pengy:

Mara 05-11-2004 05:10 PM

First make sure you have LILO installed...if not, install it (from your installation cd).

Please tell us how whould your configuration look like? I assume the kernels will be on the disk (as you won't fit 2 kernels on a floppy). Am I right?

escapee 05-11-2004 05:19 PM

Thank you for replying. :)

I assume the presence of a lilo executable and a liloconfig shell script in /sbin confirms its installation. Though all the guides I find refer to boot.b, which I dont have.

Yes, the kernels would be in /boot, on the hardrive. Im currently using the boot floppy made during the inital install, nothing out of the ordinary so far as thats concerned.

Happy to provide any further info.

Mara 05-11-2004 05:29 PM

Very short, basic ersion will look like the example below. If you use initrd images you need to add them for both images ('initrd=filename' line). You also need to replace /dev/hda? with proper partition names.
Code:

boot=/dev/fd0
default="linux"
prompt
nowarn
timeout=100
message=/boot/message
image=/boot/vmlinuz
        label="linux"
        root=/dev/hda?
        read-only
image=/boot/vmlinuz2
        label="linux2"
        root=/dev/hda?
        read-only


escapee 05-11-2004 05:33 PM

Yes, that would be a lilo.conf file if Im not mistaken. That much Im clear on, my confusion lies in creating the floppy itself. Here's a sample of one of the guides I found:

LILO Installation on a floppy (For Reference)

In order to be able to boot your Linux system, you need to install LILO ( Linux Loader). You may install it in one of three places:
o The Master Boot Record (MBR)
o The first sector of your root partition
o On a floppy
This section of the lab is designed to provide the instructions on how to install LILO on a floppy.
1. Login as root
2. Insert an empty floppy
3. Format the floppy: fdformat /dev/fd0H1440 (if necessary)
4. Create an ext2 file system on the floppy:/sbin/mke2fs /dev/fd0
5. Mount the floppy device: mount /dev/fd0 /mnt/floppy
6. Copy the boot files:
cp /boot/boot.b /mnt/floppy
cp /boot/vmlinuz-2.2.12.20 /mnt/floppy (or whatever kernel) Create a copy of /etc/lilo.conf file:
7.
cp /etc/lilo.conf /etc/lilo.floppy Modify /etc/lilo.floppy. It should look like this:
8.
boot=/dev/fd0
map=/mnt/floppy/map
install=/mnt/floppy/boot.b
prompt
timeout=50
image=/mnt/floppy/vmlinuz-2.2.12.20 <-- or whatever kernel version you have
label=linux
root=/dev/hda5 <-- or wherever the root partition is
read-only Run LILO to install it on the floppy:
9.
/sbin/lilo -C /etc/lilo.floppy Unmount the floppy drive:
10.
umount /mnt/floppy Reboot the computer using the newly created floppy.

escapee 05-11-2004 05:36 PM

Sorry, hit submit too soon;

This section I have problems with:
6. Copy the boot files:
cp /boot/boot.b /mnt/floppy

boot.b, where does this come from? Maybe Im on the wrong track. What files are needed to make a bootable floppy that contains Lilo and kernel choices? The lilo.conf file is straigthforward enough, the rest is my problem.

Mara 05-11-2004 05:38 PM

That's a reference for a boot floppy with both LILO and the kernel. In your case the kernel may be on the disk, so all you need to do is to configure lilo.conf (yes, the file was lilo.conf) and type
lilo
as root (with a floppy in your floppy drive). That's all.

escapee 05-11-2004 05:45 PM

Wow, that easy. Thank you. :)

Just so Im clear: Create a lilo.conf file in a text editor, place it in /etc, then type
lilo
as root with the floppy ready. Lilo will then install itself to the target of 'boot=' I assume.

320mb 05-11-2004 06:13 PM

Quote:

The boot floppy I have only boots the one kernel.
well, use syslinux and make another boot floppy.......you should always have one anyways..........
from a term window or command line type..........
Code:

makebootdisk /boot/vmlinuz
and wa la............a new floppy using newer kernel.

escapee 05-11-2004 06:22 PM

Happy to report success. Created the lilo.conf in /etc, ran lilo as root, and done. Rebooted and the 2.4.26 kernel I compiled last night fired right up.

320mb: Yes, thats the standard bootdisk as far as I understand. I plan on keeping one of those with the original kernel for safety. The Lilo menu is so convient though. Im off to compile 2.6 now. ;)


All times are GMT -5. The time now is 01:28 PM.