LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-19-2006, 04:46 PM   #1
ezor
Member
 
Registered: Mar 2006
Location: Toytown, NY
Distribution: Suse10.2 FreeBSD6.2
Posts: 83

Rep: Reputation: 15
The Saga Of Lilo Land


I have three computers here and they have one common denominator: all had Suse (with Grub) installed before the Slack installations.

Box #1 on which I first attempted to install Slack only, no dual boot. It has a NEC 40gb IDE drive, circa 1998. My memory is vague, but there were problems doing a Slack only install. I remember that after reformatting the HD with a Windows 98 cd, the Slack install went well, and it's up and running.

Note: In the following dual installations, Windows is XP Home, Slack is 10.2 with the default kernal.

Box #2 is a two year old Emachines I received as a gift a couple years ago. It has a Maxtor 40gb IDE HD. During the first install, I screwed up and installed Lilo to boot. After a second install wherein I installed Lilo to mbr, all went well, so I thought. Upon booting, Lilo presents itself, I select Linux and it loads. If I select Windows, that loads. But, when I try to reboot out of Windows, the machine hangs up and the only remedy is to pull the plug.

Box #3 I made myself. It has an 80gb Seagate IDE HD. After installing Lilo to mbr, nothing boots and I must use the floppy to boot Slack. Cannot get to Windows except with the Windows install cd with which I can get Windows restarted and my files are intact. Strangely, there are two places where Windows recovery reboots, and there is Lilo asking if I want Windows or Linux.

When doing fdisk on boxes #2 & #3, I get the following warning:

The number of cylinders for this disk is set to 9729. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (eg. old versions of Lilo) 2) booting and partioning software from other OSs (eg. DOS FDISK, OS/2 FDISK)"
Note: The number of cylinders is different for #2 box where I'm typing this.

Both Hds are partitioned the same with hda1 being the Windows partition, hda2 the Linux swap, and hda3 being Linux. hda1 is set to "boot." However, I notice, on both drives, that partition #2 begins at the same point that partition #1 ends, Eg. they both have the same number. Could there be an overlap here that causes something to be overwritten? Partition #3 begins one digit after where partition # 2 ends.

Here is the Lilo.conf file for both boxes, typed in:

# Lilo configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
message = /boot/boot_message.text
prompt
timeout = 1200
# Overwrite dangerous defaults that rewrite the partition table:
change rules
reset
# Normal VGA console
vga = normal
(I'm skipping the rest of the video stuff)
# End LILO global section
# Windows bootable partition begins
other = /dev/hda
label = Windows
table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda3
label = Linux
read-only
# Linux bootable partition config ends

So I tried to do a Slack only on computer #2. Same result - could only boot Slack from floppy. Tried to format the HD with Win98 cd, and it wouldn't do it, but it added a DOS partition. (???) Thought if I'd start with a clean slate, something might work, so I deleted all partitions with fdisk. Now, when I boot from floppy, **Lilo appears**, but of course there's nothing to load, so I get a kernel panic.

Reading further into the Slackware linux Guide (it has more Lilo info deeper into the book) it states "Previous versions of Lilo contained an infamous flaw known as the 1024 cylinder limit. Lilo was unable to boot kernels on partitions past the 1024th cylinder. recent editions of Lilo have eliminated this problem." Note my previous reference to the fdisk warning. So, do I have a 'non-recent' edition of Lilo or what?

In the bios, I have the virus warning disabled as I read it can cause install problems.

Is there a workaround, or must I get a later ed of Lilo or Grub for a boot loader?
 
Old 03-19-2006, 06:08 PM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by ezor
Box #2 is a two year old Emachines I received as a gift a couple years ago. It has a Maxtor 40gb IDE HD. During the first install, I screwed up and installed Lilo to boot. After a second install wherein I installed Lilo to mbr, all went well, so I thought. Upon booting, Lilo presents itself, I select Linux and it loads. If I select Windows, that loads. But, when I try to reboot out of Windows, the machine hangs up and the only remedy is to pull the plug.
I don't understand what you mean by "installed Lilo to boot."

The best way to dual boot Win and Linux is to install Win first, in partition 1. It will mark out all its territory and set the flags it needs. Then, install Linux in another partition. Then install Lilo to the MBR. I don't understand why Windows hangs when trying to reboot. When you shutdown from Windows and you restart the PC, does it come up normally?

Quote:
Originally Posted by ezor
Box #3 I made myself. It has an 80gb Seagate IDE HD. After installing Lilo to mbr, nothing boots and I must use the floppy to boot Slack. Cannot get to Windows except with the Windows install cd with which I can get Windows restarted and my files are intact. Strangely, there are two places where Windows recovery reboots, and there is Lilo asking if I want Windows or Linux.
This is not normal behavior. I'd like to know how you are installing Lilo (which command line).

Quote:
Originally Posted by ezor
When doing fdisk on boxes #2 & #3, I get the following warning:

The number of cylinders for this disk is set to 9729. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (eg. old versions of Lilo) 2) booting and partioning software from other OSs (eg. DOS FDISK, OS/2 FDISK)"
Note: The number of cylinders is different for #2 box where I'm typing this.
This message is normal.

Quote:
Originally Posted by ezor
Both Hds are partitioned the same with hda1 being the Windows partition, hda2 the Linux swap, and hda3 being Linux. hda1 is set to "boot." However, I notice, on both drives, that partition #2 begins at the same point that partition #1 ends, Eg. they both have the same number. Could there be an overlap here that causes something to be overwritten? Partition #3 begins one digit after where partition # 2 ends.
I noticed this a few times and I think it's a problem of fdisk trying to share a cylinder which isn't completely used by the previous partition. This does save space, but it doesn't seem to work well in booting scenarios. I would fdisk again, and increase the cylinder number to the next number instead of taking the default.

Quote:
Originally Posted by ezor
Here is the Lilo.conf file for both boxes, typed in:

# Lilo configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
message = /boot/boot_message.text
prompt
timeout = 1200
# Overwrite dangerous defaults that rewrite the partition table:
change rules
reset
# Normal VGA console
vga = normal
(I'm skipping the rest of the video stuff)
# End LILO global section
# Windows bootable partition begins
other = /dev/hda
label = Windows
table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda3
label = Linux
read-only
# Linux bootable partition config ends
The first thing I notice is that the Windows config is not correct. You should have other = /dev/hda1 instead of other = /dev/hda. The rest of the entry is correct.

I would also get rid of the change rules and reset stuff and message in the header, but that's just me.

Quote:
Originally Posted by ezor
So I tried to do a Slack only on computer #2. Same result - could only boot Slack from floppy. Tried to format the HD with Win98 cd, and it wouldn't do it, but it added a DOS partition. (???) Thought if I'd start with a clean slate, something might work, so I deleted all partitions with fdisk. Now, when I boot from floppy, **Lilo appears**, but of course there's nothing to load, so I get a kernel panic.
It added a DOS partition just because that's how FAT is labeled (from Win98). On that drive you should install Win98 first, and make sure it comes up and down nicely by itself.

If you have a working Win98 installation, get an fdisk -l and write down all the details so you can recreate the same partition type *before* you install Win98 again. Create the partitions you want and install Win98 into the first one. Then install Slackware. Then install lilo using a lilo.conf similar to what you pasted here.

Quote:
Originally Posted by ezor
Reading further into the Slackware linux Guide (it has more Lilo info deeper into the book) it states "Previous versions of Lilo contained an infamous flaw known as the 1024 cylinder limit. Lilo was unable to boot kernels on partitions past the 1024th cylinder. recent editions of Lilo have eliminated this problem." Note my previous reference to the fdisk warning. So, do I have a 'non-recent' edition of Lilo or what?
This has been fixed for a long time. If you have the 10.2 download, you have 22.5.9 of Lilo which supports all kinds of nice stuff including the compact option which boots a lot faster (try it in your header section).

Quote:
Originally Posted by ezor
In the bios, I have the virus warning disabled as I read it can cause install problems.
Once you have the config like you want (/etc/lilo.conf) then run lilo in test mode:

lilo -v -t -b /dev/hda

And when you get no error messages run it to update the MBR:

lilo -v -b /dev/hda

Dual booting is scary if you are worried about losing an important Win machine. But in reality, lilo makes life very simple when you install it to the MBR after Win has been installed. And you can fix almost anything with a live CD.
 
Old 03-19-2006, 06:55 PM   #3
ezor
Member
 
Registered: Mar 2006
Location: Toytown, NY
Distribution: Suse10.2 FreeBSD6.2
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Randux
I don't understand what you mean by "installed Lilo to boot."

***
Typo - meant root
***

The best way to dual boot Win and Linux is to install Win first, in partition 1. It will mark out all its territory and set the flags it needs. Then, install Linux in another partition. Then install Lilo to the MBR. I don't understand why Windows hangs when trying to reboot. When you shutdown from Windows and you restart the PC, does it come up normally?

***
Windows was already installed
As I said, I have to pull the plug. Then when reboot, Lilo asks which OS. Linux works OK, just windows hangs when trying to reboot out of it.

This is not normal behavior. I'd like to know how you are installing Lilo (which command line).

***
During the install, in the install lilo section, and also after install from the command line "liloconfig" as root. Tried "simple," and "expert."
***

This message is normal.



I noticed this a few times and I think it's a problem of fdisk trying to share a cylinder which isn't completely used by the previous partition. This does save space, but it doesn't seem to work well in booting scenarios. I would fdisk again, and increase the cylinder number to the next number instead of taking the default.

***
I'll try this
***



The first thing I notice is that the Windows config is not correct. You should have other = /dev/hda1 instead of other = /dev/hda. The rest of the entry is correct.

***
I have edited lilo.conf and tried that, didn't work.
***

I would also get rid of the change rules and reset stuff and message in the header, but that's just me.

***
I'll try this too
***


It added a DOS partition just because that's how FAT is labeled (from Win98). On that drive you should install Win98 first, and make sure it comes up and down nicely by itself.

If you have a working Win98 installation, get an fdisk -l and write down all the details so you can recreate the same partition type *before* you install Win98 again. Create the partitions you want and install Win98 into the first one. Then install Slackware. Then install lilo using a lilo.conf similar to what you pasted here.

***
I tried this. I wanted to format the whole drive fat32, then do a new Slack only install. Problem is that the Win98 installer quits with an error when it attempts to reformat.
***


This has been fixed for a long time. If you have the 10.2 download, you have 22.5.9 of Lilo which supports all kinds of nice stuff including the compact option which boots a lot faster (try it in your header section).

***
Just read on Google that it's fixed with ver 0.21.42 or later so my lilo should be OK
***


Once you have the config like you want (/etc/lilo.conf) then run lilo in test mode:

lilo -v -t -b /dev/hda

And when you get no error messages run it to update the MBR:

lilo -v -b /dev/hda

***
Didn't know about test mode, so I'll do this
***

Dual booting is scary if you are worried about losing an important Win machine. But in reality, lilo makes life very simple when you install it to the MBR after Win has been installed. And you can fix almost anything with a live CD.
***
Actually, I've wiped Windows out on one box, and want Slack as only OS. Only reason I originally wanted dual boot is because of my pack rat mentality. Hate to throw anything away. I'll do a fresh install on the box that's down, use your suggestions, and report back.
***
 
Old 03-19-2006, 07:11 PM   #4
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
If you are going to do a Slack-only install, then use a good filesystem like reiserfs instead of FAT. But there's no reason not to multi-boot if you want to. I boot win and multiple linux distros and so do a lot of other people. It's easy to do.
 
Old 03-19-2006, 11:46 PM   #5
ezor
Member
 
Registered: Mar 2006
Location: Toytown, NY
Distribution: Suse10.2 FreeBSD6.2
Posts: 83

Original Poster
Rep: Reputation: 15
Randux,

It occured to me to look at lilo.conf on the box where I sucessfully installed Slack, no Windows, which is what I'm trying to do now on this box.

There, lilo.conf had different entries, eg, "lba32 # Allow booting past 1024th cylinder." So I edited lilo.conf to coincide exactly with that file. Then I ran lilo and rebooted. Still no boot from HD. Come to find out that during booting Lilo.config had changed back to what it was before I edited it.

The output from lilo -v -t -b /dev/hda on the problem box:

Ignoring entry 'boot'
Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling nap_insert_file

Boot image: /boot/vmlinuz-ide-2.4.31
Added Linux *

The boot sector and the map file have *not* been altered


This is the test result from the working box:

Ignoring entry 'boot'
reading boot sector from /dev/hda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: /boot/vmlinuz-ide-2.4.31
Added Linux *

The boot sector and the map file have *not* been altered

This must have something to do with booting beyond the 1024th cylinder, but I'm thoroughly confused.
 
Old 03-20-2006, 01:39 AM   #6
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
I don't see anything wrong with the output you're showing here. And LBA32 is the default- you don't have to specify it. Sometimes you get warnings about that, you can safely ignore them.

Are you still having problems? I couldn't tell from this latest entry. Remember, once the lilo output looks like (like above) do it without the -t switch, and it will update the MBR so you can boot. If you run with -t it doesn't update anything.
 
Old 03-20-2006, 03:12 PM   #7
ezor
Member
 
Registered: Mar 2006
Location: Toytown, NY
Distribution: Suse10.2 FreeBSD6.2
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Randux
I don't see anything wrong with the output you're showing here. And LBA32 is the default- you don't have to specify it. Sometimes you get warnings about that, you can safely ignore them.

Are you still having problems? I couldn't tell from this latest entry. Remember, once the lilo output looks like (like above) do it without the -t switch, and it will update the MBR so you can boot. If you run with -t it doesn't update anything.
Did it without the -t switch, didn't work. I've spent several hours on this and I give up. I'll have to boot from floppy. Just read in the Slack book that there are some machines on which Lilo just won't work. Maybe this is one of them. Prior to Slack, I had a dual boot Suse/WinXP with Grub. Install was simple.

Many thanks for trying to help.
 
Old 03-20-2006, 05:02 PM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
accidental multi post deleted

Last edited by Randux; 03-20-2006 at 05:04 PM.
 
Old 03-20-2006, 05:02 PM   #9
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
accidental multipost deleted

Last edited by Randux; 03-20-2006 at 05:04 PM.
 
Old 03-20-2006, 05:03 PM   #10
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by ezor
Did it without the -t switch, didn't work. I've spent several hours on this and I give up. I'll have to boot from floppy. Just read in the Slack book that there are some machines on which Lilo just won't work. Maybe this is one of them. Prior to Slack, I had a dual boot Suse/WinXP with Grub. Install was simple.

Many thanks for trying to help.
You are welcome, but I feel like we must be missing some small detail, because I don't believe that there can be a system that lilo can't boot. I agree with you, it should be simple, and normally it is.

I can tell you from my own experience that I think there is a bug in Slackware's liloconfig. But using Lilo manually it worked immediately- many of us here use it quite often.

If you want to cut and paste some doc I would be happy to try to resolve this. If not, I'm sure you will resolve it eventually. We don't really have much doc here, like what was the output fdisk -l, what was the response of lilo when you used -v -b /dev/hda, etc.

Also, look for saikee's links if you want to try grub. That guy boots over 100 distros using grub and lilo and everything in between.

Last edited by Randux; 03-20-2006 at 05:05 PM.
 
Old 03-20-2006, 05:10 PM   #11
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
There maybe a small thing that you maybe overlooking: A anti-virus or MBR setting in BIOS. That threw me for a loop trying to install lilo back awhile ago. I disabled that, and no problems since (The anti-virus setting stops things from being written to the MBR. )

Also, you did run 'lilo' after editing your lilo.conf? That wasn't clear.
 
Old 03-20-2006, 09:10 PM   #12
ezor
Member
 
Registered: Mar 2006
Location: Toytown, NY
Distribution: Suse10.2 FreeBSD6.2
Posts: 83

Original Poster
Rep: Reputation: 15
Randux,

I haven't really given up, but I don't want to take up a lot of your time. Somehow I think the problem is in the mbr, caused by the previous Suse install with Grub. When I installed Slack on box #1, it also wouldn't boot from HD. But there, when attempting to boot from HD, the word "Grub" came up in the upper left of screen. I knew there was some refuse from Grub in there that wasn't overwritten by Lilo. So I did a Win98 install and that must have cleaned out mbr, because on the next install all went well. I found a post here where someone seemed to have the same problem, and wiped the mbr from the command line to solve it, but didn't say how he did it. I'm googling for that. Actually, I'm learning a lot, and despite the frustration I'm just having fun. Thanks again, and when I get this fixed I'll post.

CwWilson721,

I did disable the virus feature in BIOS, and did run Lilo.

Thanks
 
Old 03-20-2006, 10:55 PM   #13
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Ezor, I don't know the internals of lilo or grub, but it seems like when the MBR is updated, everything would be replaced. It is certainly possible, but I think unlikely, that something would be left over from a previous MBR because it could lead to a mess like you are saying.

I believe there is a bug in liloconfig (the script that Slackware installation uses) because we found many reports of the MBR not getting updated when running a Slackware installation. I think a bad return code from lilo is not getting processed and the MBR doesn't get installed. The whole idea of wiping an MBR is not reasonable, I think. Anyway, this would certainly explain what you are reporting from your first install.

I saw the post you are talking about (wiping MBR) and there is nothing in there but vague comments- no factual information, no documentation, etc. I personally prefer to avoid wasting time on posts like that. I don't mean I wouldn't try to help someone who started a post like that, but as far as getting info for troubleshooting from a post like that, I don't think there's anything reliable in that post. The keys to figuring things out are stating the problem clearly, showing what documentation there is on exactly what went wrong and what messages you got, and then resolving it with a sensible series of steps or actions and stating it clearly so that it is understood. None of that happened in that other post.

It would help us if you could cut and paste the output of fdisk -l and the lilo.conf and also the lilo output when you run it.

You are not taking up anybody's time, I learn as much by reading about other people's questions as I do fooling around with my own system, and we are all here to help each other, especially in the Slackware community.
 
Old 03-21-2006, 11:25 AM   #14
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Did you run liloconfig in Simple or Expert mode? I always use Expert, and tell it everything, never have a problem
 
Old 03-21-2006, 12:28 PM   #15
dkpw
Member
 
Registered: Sep 2003
Location: Scotland
Distribution: LinuxMint16 & Ubuntu 12.0.4 LTS
Posts: 218

Rep: Reputation: 30
Whenever I moved from a SuSE (Grub) to Slackware installation, I had to zap the MBR with fdisk /mbr to remove all traces of Grub.

Not doing so meant no Slackware :-(

Regards,

dkpw

Last edited by dkpw; 03-21-2006 at 12:32 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO saga- did work, now doesn't hutyerah Linux - General 1 12-22-2005 11:10 PM
The 2.4 -> 2.6 Saga Continues ... sundialsvcs Linux From Scratch 2 08-11-2005 01:25 PM
Amigo XP Saga of S/N 1 g2jp36695 Amigo 3 06-19-2005 08:32 AM
Another Radeon saga... Berto Linux - Software 1 09-01-2004 09:05 PM
Wvdial Saga! el_felipe Linux - General 1 01-28-2002 01:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration