LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   lilo Question (https://www.linuxquestions.org/questions/slackware-14/lilo-question-266897/)

aje 12-15-2004 10:12 PM

lilo Question
 
If I install lilo to a floppy, do I basically boot from that floppy to choose between OS's on startup?

wartstew 12-16-2004 12:01 AM

Yes, but I've never actually done it.

I'm guessing that you are doing this because you installed Linux on a partition on a machine with the Evil Empire's OS, and are afraid to mess up the normal booting procedure of the machine.

If so, you are smart to be afraid, you can easily make your computer not boot at all from the hard drive if you don't know what you are doing.

but ...

Here is my recomendation to get lilo on the hard drive of a dual boot machine:

1) Don't install lilo on the mbr (master boot record, example: "install= /dev/hda" in lilo.conf). You can, it it works, but I think it is more trouble prone. Instead install it to the partition that you have your Linux file system installed (example: install=/dev/hda2). This way windows never knows anything happened and better yet, won't decide to overwrite the mbr as part of an update, or a repair triggered by a virus scare.

2) After doing #1, the computer will still boot into windows the same as it always has.

3) To switch it to boot to lilo, either go into the windows "storage manager" or "fdisk" depending on your Windows version and set the "active" or boot partition to the Linux partition.

4) The system will then boot to lilo, which hopefully then has the entry to boot back into Windows if you want, or to Linux. Everything should work great now.

5) If you ever wipe out the Linux partition, you can then set the active partition back to the Windows partition (probably using a bootable floppy with Win98's "fdisk" on it, or I think you can also do it using the WIndows 2K/XP install CDROM, but I can't remember how), and boot Windows just like before.

Lilo is powerful and versatile, but does have a steep learning curve. Read up on it and you'll be glad you did ... unless you'd rather start using GRUB instead of lilo which is getting real powerful too, and probably at this point, better than lilo in many ways.

Jeebizz 12-16-2004 12:01 AM

No, if you install lilo on the floppy, then the floppy will boot directly to linux, and your hard drive will boot whatever main operating system you have, most likely windows. If you wish to boot linux from the hard drive instead, you must install lilo on the MBR portion of your hard drive, thus replacing the windows boot record with linux, and you can boot from linux or windows using lilo on your hard drive, or you can leave the MBR alone and have lilo reside on the root portion of your linux partition, and have the windows boot loader give you a choice between continuing loading windows, or booting into windows. Installing lilo on the floppy is more of a last ditch effort, if you cannot install lilo on the MBR or root linux partition, and usually it would get you directly into linux, and not give you a choice to boot windows or linux if you boot lilo from a floppy.

Jeebizz 12-16-2004 12:17 AM

Scratch that very first part, since I overlooked my own answer, you could boot any os from lilo on the floppy, since you would have told lilo to add any other os to it's config file, but if you are only trying to boot into linux, and you can already boot into your other OS from the hard drive, then there would be no point into having a menu on lilo giving you that option, and instead having lilo on the floopy boot into linux.

dls 12-16-2004 06:02 AM

what I have done on my box is (in other words my working configuration)

1) left the Windows 2000 boot manager intact

2) for the additional distros on my box (Mepis, Xandros, Fedora 2, Suse 9) I have installed their particular boot manager (lilo or grub) to their root partiton (and made a backup boot disk)

3) from a console (super user mode) entered the following command (with the partition in question already being mounted):

dd if=/dev/hda3 of=/bootmepis.lnx count=1

dd if=/dev/hda4 of=/bootxandros.lnx count=1

dd if=/dev/hda6 of=/bootfedora2.lnx count=1 (this is in a logical partition)

dd if=/dev/hda7 of=/bootsuse.lnx count=1 (also a logical partition)

4) make sure the floppy drive is mounted with a formatted (fat12) disk in it and then:

cp /*.lnx /dev/fd0

5) boot into Windows 2000 (or XP or NT)

6) copy the *.lnx files from the floppy to the windows root directory

7) edit the boot.ini file to add the following line(s) (the file is natively read only):

C:\bootmepis.lnx="Mepis Linux"

C:\bootxandros.lnx="Xandros Linux"

C:\bootfedora2.lnx="Fedora 2 Linux"

C:\bootsuse.lnx="Suse Linux"

8) make sure that the timeout value does NOT = 0 (zero), save the file, reset the properties to read only

9) reboot and make your choice - which in the case of the linux distros you will go to its boot manager

who knows you may even be able to add OS2 in the same way (creating the OS2 file from within linux first)

dslboy 12-16-2004 06:09 AM

It is as easy as making the linux partition bootable again, use cfdisk. Then add your windows partition to /etc/fstab

if you cant boot at all, just boot from a cd and type bare.i root=/dev/hdx noinitrd ro (where x is the name of your linux /)
Then just type cfdisk /dev/hdx and toggle bootable flag on/off...

I guess root (/) linux is on your primary hdd at least.
Primary is hda1 secondary is hdb1, if its the second partition on your primary, it is hda2, just to clear things up, if you did not know this before... ;)

urka58 12-16-2004 11:19 AM

Installing lilo on floppy is the safest choice as you do not overwrite any existing boot sector .You can boot either windows or Linux.
The only problem you can encounter is booting from floppy can be noticeably slow on some configurations, but you can easily override the problem adding the option "compact" to your /etc/lilo.conf.
I have either my laptop and my home computer with lilo on the floppy since a couple of years, and for my purposes is the best configuration.
Ciao

dls 12-16-2004 01:38 PM

the info in my previous reply does not overwrite the MBR in any way. In fact it specifically avoids such an operation. Also in that post you will note that I keep boot floppies for all the distros I have installed regardless of whether they use lilo or grub.

(There are 2 proprietary apps that I require that are not duplicated by any OSS. The developers do plan on porting to linux [or MAC] and the apps will not function with WINE. So I am stuck with Win2k as my primary boot.)

uriah heep 12-16-2004 02:18 PM

alternative way
 
I keep my boot drives in plug in caddies. Slide in linux to use linux then to use win2k pull linux caddy out and put win2k in. caddies are cheap and so are hard drives.

jschiwal 12-16-2004 02:27 PM

In your case, I would do what dis suggests, and hang on to the boot floppy just in case. Google for the terms "NTldr lilo boot howto" for a number of howto's on how to use the NTLDR to boot into linux. Editing the boot.ini file does involve first changing the attributes so you can load it into an editor and then changing them back again. What you end up with is a windows boot menu to select the operating system you want to boot up, but you aren't touching the mbr at all so the risks you are worried about don't exist.

aje 12-16-2004 06:49 PM

Is it possible to just not install lilo to anything, but switch from windows to linux depending on whether or not a syslinux boot disk is present during startup or not?

This is how I'm interpreting some advice from another message board and it seems fairly simple .... I'm not necessary afraid to go through the steps to create a dual boot like described many times in this thread (Thanks a bunch :) ) I was just wondering if the information was true.

wartstew 12-16-2004 11:40 PM

Quote:

Originally posted by aje
Is it possible to just not install lilo to anything, but switch from windows to linux depending on whether or not a syslinux boot disk is present during startup or not?
Yes. You normally put the linux kernel (and initial ramdisk "initrd" if any) on the floppy too so syslinux can find it easily, but that is getting harder to do as many modern kernels are compiled with all kinds of capabilities and then are too big to fit on the floppy disk. With the "isolinux" version of syslinux you get 2.88 megs to deal with on a bootable CDROM which will probably work better anyway.

(System overload! [too] many different ways to boot Linux!)

Quote:

This is how I'm interpreting some advice from another message board and it seems fairly simple .... I'm not necessary afraid to go through the steps to create a dual boot like described many times in this thread (Thanks a bunch :) ) I was just wondering if the information was true.
I would go for the dual boot if you can. Just do some homework before you do. Read official documents and/or ask questions which include a description of your current system then submit your proposed config files.

Most of the information you see here is true even though I've disputed some of the comments people have posted about things they believed you *can't* do, The real problem is that some of the solutions described here may not completely apply to your computer's hardware or current configuration. So to be sure, you should do more research and/or ask more specific questions.


All times are GMT -5. The time now is 02:22 AM.