Lilo multibooting problem
There are total 3 os installed on my disk, windows xp on /dev/hda1,debian on /dev/hda9 and slackware on /dev/hda9. Slackware is my favor. Before my slackware was installed, debian had installed GRUB for bootintg menu witch have debian and xp enterance included. But after i installed my slackware, which use lilo as its loader, only has only 2 choice: Windows and my slackware! So, i followed some guideline to edit /etc/lilo.con to add an entry for debian:
other = /dev/hda9 label = Debian Table = /dev/hda But when i use lilo -t to test it, there is an error: The first section of the partition /dev/hda9 doesn't have a bootable signature. Why and how to fix it? Thanks. |
First, you say Debian and Slack are on /dev/hda9, I assume that is a typo...?
T make it go as-is the easy way, boot into Debian how-ever you can (ie, CD boot) and run grub and install it's bootloader on it's own partition ('root partition' in lilo speak - NOT MBR). Then boot back into Slack and run lilo - it should now recognize the Debian partition as bootable. |
The super grub disk will reinstall grub for you.
free download http://www.supergrubdisk.org/ Then you can just edit the menu.lst. Or install grub from the slack dvd in the extra folder. Then run: grubconfig you may have to edit the Debian entry to get it to boot Debian. |
Quote:
In fact, in my windows xp, i have added an entrance to grub at c:/boot.ini. of course i have download a dos version of grub in the windows partition. So, in lilo's boot menu, if i select windows, it will give me two choice: 'windows xp professional' and 'grub', then select grub, it would find my old grub menu(before i installed my slackware),does this mean my debian has its own bootloader on its partition?. Although i can boot my debian by this, but i really want to add a choice in lilo's menu as my slackware. |
If you want to use LILO instead of GRUB, you would have to create a kernel stanza similar to Slackware's -- and NOT similar to Windows'. Your current entry:
Code:
other = /dev/hda9 If you want to get LILO to boot Debian (without using GRUB at all), you would have to add an entry like the following: Code:
image = /boot/vmlinuz |
Quote:
Once in Debian, use it's grub command or setup tool, (sorry, I am not sure how Debian does it), to install a bootloader onto it's own partition, /dev/hda9. In lilo this is the 'boot' parameter, also called the 'root' partition - but NOT the MBR (Slack's lilo bootloader lives there now). Be sure NOT to install anything to MBR or you will then not be able to easily boot back into Slackware. Then, boot back into Slackware and run lilo -t as you did before and it should recognize the Debian partition as bootable and allow you to add the entry for it. |
Quote:
|
Quote:
|
Ah, didn't see that. Never mind then. :)
|
i still can't configure lilo successfully. I can find grub in my debian partition, there is a menu.lst file which has the following code:
Title Debian GUN/Linux kernel 2.6.18-6-686 root (hd0,0) kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hda1 ro initrd /boot/initrd.img-2.6-18-6-686 savedefault so, i add a new entrance to my lilo.conf like this: image = /boot/vmlinuz-2.6.18-6-686 initrd = /boot/initrd.img-2.6.18-6-686 root = /dev/hda1 label = Debian but i got such error when i run 'lilo -t': Fatal: Can't open /boot/vmlinuz-2.6.18-6-686:No such file or directory. it seems that, lilo uses wrong root directory, why? |
The lilo stanza for Debian is not correct...
Quote:
I will add some comments on other ways of doing this below, but for now let's pursue this simplest way... Two things must be satisfied to easily add the Debian boot to the Slackware managed lilo bootloader: 1. There must be a valid bootloader installed in the first 512 bytes of the Debian partition, /dev/hda9, capable of booting Debian when it is called. 2. There must be a valid 'other' stanza in the Slackware MBR bootloader to make the call to the Debian partition bootloader. This is called chain booting by the way. FIRST: The easiest way to install the bootloader on the Debian partition is to boot into Debian (ie, from CD or your M$ grub entry) and use it's own grub (or lilo) to install it's own bootloader to it's own partition (NOT MBR). Since you have grub already configured for Debian I suggested using it, but you could just as well use lilo with an entry like this... #Title Debian GUN/Linux kernel 2.6.18-6-686 boot = /dev/hda9 image = /boot/vmlinuz-2.6.18-6-686 initrd /boot/initrd.img-2.6-18-6-686 root = /dev/hda9 label = Debian The 'boot' line tells it where to install, the others tell it what to install. Running lilo under Debian with a lilo.conf based on this (you will need message and timeout options, etc.) will install a bootloader to /dev/hda9. SECOND: Once the bootloader has been installed to the Debian partition, you need to boot into Slackware and add a chain boot to the Debian partition, like this in your Slackware lilo.conf (in addition to your Slackware entries of course): #Chain to Debian partition other = /dev/hda9 label = Debian Table = /dev/hda Then run lilo from Slackware to install the MBR bootloader... Now when you boot you will get the Slackware and M$ options along with the Debian option. If you choose Debian it will use the bootloader from /dev/hda9 to boot Debian. As I said that is the easy way that should keep you safe from ending up with an unbootable system. Now, you CAN add a more complex Debian boot directly from Slackware by temporarily mounting the Debian partition and using a lilo stanza that points to the mount point (something like this - but this is not intended to be copied and pasted!)... image = /mnt/tmp/boot/vmlinuz-2.6.18-6-686 initrd = /mnt/tmp/boot/initrd.img-2.6-18-6-686 map = /mnt/tmp/boot/map_deb root = /dev/hda9 The important thing to note is that lilo must have access to the kernel and initrd files when it installs - not just the device path like /dev/hda9. It actually uses the physical location on the spinning disk to generate the bootloader because at boot time it has no knowledge of any filesystem or path - it loads the kernel by absolute location on the media. I use both methods - 'all-in-MBR' and 'chain loading', and chain loading is much easier to manage and less likely to result in an unbootable system. I am also a lilo fanboy :-) and find it much easier to manage when changing OSs and partition mapping and dare I say, more reliable than grub, but that is just my opinion. BUT - lilo requires some knowledge of how it all works... time well spent learning! Hope this helps, remember the steps, 1 - Install Debian bootloader on /dev/hda9 , 2 - Add 'other' = /dev/hda9 to slackware lilo.conf and install - guaranteed to work... |
but now, i have just modified my original slack entrance,i modified root /dev/hda8 to /dev/hda9 and installed lilo by 'lilo' command with no error. Unfortunately, i restart my computer, i select slackware entrance and boot my debian successfully. But the new problem is that, i have no way to enter my slackware again!
If i still want to use lilo and slackware, should i enter debian and install lilo in debian? |
Quote:
It doesn't work like that. Verify what you have running and post back... but don't make any changes until you are sure what effect it will have. |
Make no changes until you know what the effect will be...
kcynice, I have to go off for now and will not be back for about 12 hours.
From your last post and description of your system, I suspect that your boot is now 'confused' - I know I am. As long as your partitions are not changed and nothing is moved or reinstalled you can recover and have your multiboot system - but if you change bootloader parameters without good understanding of their effect you could end up with an unbootable system. Please re-read my previous post and Google for some lilo info and read the man pages to try to get your understanding of it on more solid ground. But resist the temptation to try things if your system is still bootable until you have a clear path to get it straightened out again. Until tomorrow... |
my original slackware entrance in lilo.conf is:
image = /boot/vmlinuz root = /dev/hda8 label = Linux read-only as i said, my debian lays on /dev/hda9. I just modified 'root = /dev/hda8' to 'root = /dev/hda9'. After i restarted my system, i entered the original choice, i found it seems like debian because the bash prompt string was the debian's. I don't know how to do it now. It seems that i use slackware's kernel but use debian's partition. |
All times are GMT -5. The time now is 10:02 AM. |