Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with lilo :( [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 11:17 am    Post subject: Problem with lilo :( [solved] Reply with quote

well i tried yesterday to install gentoo 1.4 on my home computer. I've followed instructions without any problems. But when i reboot my computer i've got something weird....

I've got Windows XP Pro on my hda (4 partitions) and installes gentoo on my hdb.
during the installation i've got no problem. In fact i just have a warning when runing /sbin/lilo telling me that lilo and my boot partition are not on hda. Well this is not important i think.
Then when i boot on my hdb here is what happens:

Requesting boot sequence on secondary IDE0................OK
Booting........................

until there no prob. But now:
L 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 (for about 1 screen and then it freezes)

I am at work actually so i can't post my lilo.conf but i'll do it when i'll be back home. If someone has already have this problem please help me. I need very quickly a Linux for my studies and i don't have a large broadhband in order to download anything.

PS: sorry for my poor English, i made my best ;)


Last edited by Grunk on Thu Oct 16, 2003 7:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 11:47 am    Post subject: Reply with quote

http://www.tldp.org/HOWTO/Bootdisk-HOWTO/a1483.html

heres a good url on what is the reason heres the excert were looking for

Code:

L    The first stage boot loader has been loaded and started, but it can't load the second stage boot loader. The two-digit error codes indicate the type of problem. (See also section ``Disk error codes''.) This condition usually indicates a media failure or a geometry mismatch (e.g. bad disk parameters).


a little more info is gonna be needed to solve this one like whats youre partition layout n stuff like that :D

ya and how old is that computer :wink: cheers
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 11:58 am    Post subject: Reply with quote

I've looked at the URL but i haven't found section "Disk error codes" so I don't know what the error means.

On hdb i've made three partitions.
hdb1: \boot +100M ext3
hdb2: swap +128M Linux swap
hdb3: \root the rest of the disk reiserfs

I'm not sure of those informations, I've wrotten them by memory. I'll update them this evening if they are wrong.

Well thx for your answer, i'll try to give more infos when i can, and i don't know exactly which infos i should give you...

[edit] my computer is quite recent. It's an Athlon XP 1700+ with 512 MO RAM, Nvidia Gforce 3 TI 200, SB Live! 5.1, hda is a Western Digital 80GO, hdb (the one on which i try to install gentoo) is a very old western digital 4GO. I'll buy another another hd when i'll have enough money.
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 12:08 pm    Post subject: Reply with quote

well if the pc is old this may be a bios limitation becuse lilo is having trouble finding its second stage wich is outside the MBR that being said i found another error code page but the 99 99 99 99 isnt on there
well ive dones some gogling and this deffinatly seems to be a configuration error we need to see youre /etc/lilo.conf and ...well thats it oh ya and the partition table from hda :D
Back to top
View user's profile Send private message
JonnieDago
n00b
n00b


Joined: 25 Apr 2003
Posts: 11

PostPosted: Wed Oct 15, 2003 12:11 pm    Post subject: Reply with quote

I had this EXACT problem the first time I attempted to install Gentoo.

I couldnt find anything about it until I brought it up to some guys on IRC.

As it turns out your /boot partition needs to be within the first 1024 cyl for LILO to work properly.
Also LILO has a tendancy to freak out on an NTFS partition.

What you may want to try is swapping the disks.
Make the 5 gig disk 0 and the 80 gig disk 1.
If you use grub and follow the instructions here https://forums.gentoo.org/viewtopic.php?t=18319

Windows XP will never know the difference. This is how I boot my system now and it works flawlessly.
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 12:17 pm    Post subject: Reply with quote

Code:
As it turns out your /boot partition needs to be within the first 1024 cyl for LILO to work properly.


Quote:
Also LILO has a tendancy to freak out on an NTFS partition.

As it turns out your /boot partition needs to be within the first 1024 cyl for LILO to work properly.[/code]


the first is only for OLD computers where the bios is the limitation not lilo

the second is just plain false as there is no problems with lilo booting XP :D
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 12:18 pm    Post subject: Reply with quote

hda? i made commentary (sorry poor english i have) everything that deals with dos/windows partitions, so i don't think this can be a problem.
but i tell you it from memory:
hda1: fat32 15GO
hda2: ntfs 15GO
hda3: ntfs 50GO (the rest of the disk in fact)

Else my /boot partition is the first partition of hdb so i think it's within the first 1024 cyl. Perhaps my /boot is to big.... well i don't know. I'll post this evening with more details on my lilo.conf and partition tables for both disks.

And i don't use grub, perhaps i'll try grub instead of lilo if we don't find any solutions.........
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 12:20 pm    Post subject: Reply with quote

when you installed lilo is it installed to the MBR of /dev/hda and does youre windows /DOS stuff boot ok?
this just sounds like a bad lilo.conf post in when you get home :D
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 12:28 pm    Post subject: Reply with quote

i think too it's a bad lilo.conf

but there's something i didn't explain well.
I installed lilo to the MBR of /dev/hdb

so it doesn't have anything to deal with my DOS/Windows

When i boot my computer i've got bios menu for selecting on which device i boot (IDE 0, IDE 1, CDROM 0, CDROM 1, Network boot)
when i boot on IDE0 windows XP boots without any problem, when i boot on IDE 1, what should be lilo and gentoo i've got the error i've posted before.
Back to top
View user's profile Send private message
JonnieDago
n00b
n00b


Joined: 25 Apr 2003
Posts: 11

PostPosted: Wed Oct 15, 2003 12:30 pm    Post subject: Reply with quote

Smoke2firE wrote:
Code:
As it turns out your /boot partition needs to be within the first 1024 cyl for LILO to work properly.


Quote:
Also LILO has a tendancy to freak out on an NTFS partition.

As it turns out your /boot partition needs to be within the first 1024 cyl for LILO to work properly.[/code]


the first is only for OLD computers where the bios is the limitation not lilo

the second is just plain false as there is no problems with lilo booting XP :D


First off. I was able to duplicate this issue on multiple machines using a large harddisk as Disk 0 and linux on Disk 1
Second. Both of these machines were P3 one was on an intel 860 chipset and the other was on a newer 99'ish SiS chipset. So it isnt an "OLD Computer" limitation. It is an "old coding" limitation.

Also the problem seemed more appearant when using an ntfs partition on disk 0. When the partition was fat we actually recieved a legable error.

Im not pulling this out of my ass.. I did do my homework.
Back to top
View user's profile Send private message
JonnieDago
n00b
n00b


Joined: 25 Apr 2003
Posts: 11

PostPosted: Wed Oct 15, 2003 12:33 pm    Post subject: Reply with quote

Grunk wrote:
... perhaps i'll try grub instead of lilo if we don't find any solutions.........


When I had this problem and I tried Grub, the kernel would begin to load and the machine would lock up. Id be interested to see if the same thing happens to you.
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 12:35 pm    Post subject: Reply with quote

not to start a flame i this poor guys request for support but boo yah

http://www.blu.org/pipermail/discuss/2000-April/032594.html

Quote:
The 1024-cylinder limit was not imposed by Lilo, but by the ROM BIOS which
Lilo (or anything else) must use to load the beginnings of the operating
system. For at least several years, Lilo has had support for "logical
block addressing (LBA)" which modern BIOS releases use to support large
disks. Unfortunately, the Lilo docs have lagged a little behind the
software, and there has been a general misunderstanding of how this works.


Quote:
Also the problem seemed more appearant when using an ntfs partition on disk 0. When the partition was fat we actually recieved a legable error.


the format of the partition on hda would not effect lilios ability to boot of the second hard disk either the code is in the MBR :wink:
Back to top
View user's profile Send private message
pi314
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2003
Posts: 136
Location: Germany

PostPosted: Wed Oct 15, 2003 6:32 pm    Post subject: Reply with quote

@grunk
did you know how your bios is doing its bootup from hdb? does it map it to hda? some boards swap hdb/hda when they boot from hdb - maybe lilo has a problem with this

maybe you have now the time to post your lilo.conf this would realy be usefull to help you
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 7:00 pm    Post subject: Reply with quote

so i took every infos i could find out.............

We start with lilo.conf

Code:
lba 32
boot=/dev/hdb
map=/boot/map (i've tried several files contained in /boot which begins whith "map", same problem in each case)

install=/boot/boot-menu.b (i've tried boot-bmp, and also boot-text, same problem)
menu-scheme=Wb
prompt
timeout = 150
delay = 50
vga = normal
default = gentoo
image = /boot/kernel-2.4.20-gentoo-r5
initrd = /boot/initrd-2.4.20-gentoo-r5
root = /dev/hdb3
append = "root=/dev/hdb3 init=linuxrc" (i tried with and without this line, don't change anything)
label = gentoo
read-only


now fdisk /dev/hdb then i made p to view the partition table:
Code:
Disk /dev/hdb: 4303MB , 4303756800 bytes
255 heads, 63 sectors/track, 523 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot        start     end        blocks        ID               System
/dev/hdb1           1          13         104390       83              Linux
/dev/hdb2           14        30        136552+      82              Linux Swap
/dev/hdb3           31        523      3960022+     83              Linux


I've also printed my fstab........
Code:

/dev/hdb1     /boot        ext3        noauto,noatime               1               1
/dev/hdb3     /              reiserfs    noatime                          0               0
/dev/hdb2     none        swap        sw                                 0               0
/dev/hdc       /mnt/cdrom  iso9660 noauto,ro                      0               0

(i didn't modify the rest of fstab but i post it)
none      /proc            proc      defaults         0       0
none      /dev/shm      tmpfs    defaults         0       0


here are all the files i thought could be interesting........

then i tried to make a boot disk with: dd if=/boot/kernel-2.4.20-gentoo-r5 of=/dev/fd0
when i try to boot on the floppy it prints this:
Code:
Searching for Boot Record from Floppy..OK
Loading..............
Uncompressing Linux...
invalid compressed format (err=1)
--System halted


when i try to boot on hdb (the disk with gentoo) :
Code:
Searching for Boot Record from IDE-1...OK
L 99 99 99 99 99 99 99 (about 10 lines of "99")


To answer pi314, for my bios i really don't know. I tried to unplug my hda and boot from hdb, i had quite the same problem. It printed a lot of 01 instead of 99............

I tried to install grub, but i could not use it. when i typed: root (hd1,0) it answered something like the partition format is unknown , format is 0x7 or 7x0, i don't remeber excatly, i didn't wrote it, i prefer concentrating on lilo instead of making a mix from both.
and when i typed setup (hd1) it said: ERROR 17.

Well as i said, i 've got no preferences between lilo and grub, i just took the installation guide that was given with the CDs (in a french magazine) and they used lilo so i made the same...
Back to top
View user's profile Send private message
JonnieDago
n00b
n00b


Joined: 25 Apr 2003
Posts: 11

PostPosted: Wed Oct 15, 2003 8:00 pm    Post subject: Reply with quote

Smoke2firE wrote:

the format of the partition on hda would not effect lilios ability to boot of the second hard disk either the code is in the MBR :wink:


I would agree with you if I didnt see the two different errors with my own eyes.


Im not going to hi jack this poor dudes thread any longer. I offerred a solution. You guys can screw with it as long as you want. I spent 4 days on the same problem before I decided to just swap the disks. Fixed in 5 minutes.
Back to top
View user's profile Send private message
pi314
Tux's lil' helper
Tux's lil' helper


Joined: 31 Jul 2003
Posts: 136
Location: Germany

PostPosted: Wed Oct 15, 2003 8:06 pm    Post subject: Reply with quote

Quote:
It printed a lot of 01 instead of 99............

sounds very interesting, because with your setup lilo shouldn't be affected by any kind from hda

found this about the new error:
Quote:
0x01 : ``Illegal command''. This shouldn't happen, but if it does, it may indicate an attempt to access a disk which is not supported by the BIOS


maybe your bios is realy swaping your disks - if so, it could help to plug your hdb to primery master, install lilo with everything set to /dev/hda, replug it as hdb and prey that it works
the idea behind this is that your bios is swaping hdb to hda, so lilo needs to be configured as being on hda even if it's physicaly on hdb
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Wed Oct 15, 2003 8:22 pm    Post subject: Reply with quote

for JonnieDago: i find harder to use grub, i can't configure it so i can't swap disks :(

for pi314 i try this now.........prey it'll work
Back to top
View user's profile Send private message
JonnieDago
n00b
n00b


Joined: 25 Apr 2003
Posts: 11

PostPosted: Wed Oct 15, 2003 8:50 pm    Post subject: Reply with quote

That link I posted walks you through exactly what needs to be done.

But if you dont want to use grub. You can swap the disk and use the primary switching flags in LILO to do the same...

Code:

image=/boot/bzImage
label="Gentoo"
read-only
append="hdc=ide-scsi"
root=/dev/sda8

image=/boot/Cluster
label="Cluster"
read-only
append="hdc=ide-scsi"
root=/dev/sda8

other=/dev/sda1
label="Windows 2000"
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80


This is someones example from that other thread. But you can see how for Windows It switches the Windows Partition to active at boot so Windows wont try to overwrite anything on the MBR you are using when you do updates and shite.
Back to top
View user's profile Send private message
Moled
l33t
l33t


Joined: 09 Jul 2003
Posts: 635

PostPosted: Wed Oct 15, 2003 9:32 pm    Post subject: Reply with quote

from man lilo:

Quote:
BOOT ERRORS
The boot process takes place in two stages. The first stage loader is a single sector, and is loaded by the BIOS or by the loader in the MBR. It loads the multi-sector
second stage loader, but is very space limited. When the first stage loader gets control, it types the letter "L"; when it is ready to transfer control to the second
stage loader it types the letter "I". If any error occurs, like a disk read error, it will put out a hexadecimil error code, and then it will re-try the operation. All
hex error codes are BIOS return values, except for the lilo-generated 40, 99 and 9A. A partial list of error codes follows:


00 no error
01 invalid disk command
0A bad sector flag
0B bad track flag
20 controller failure
40 seek failure (BIOS)
40 cylinder>1023 (LILO)
99 invalid second stage index sector (LILO)
9A no second stage loader signature (LILO)
AA drive not ready
FF sense operation failed

Error code 40 is generated by the BIOS, or by LILO during the conversion of a linear (24-bit) disk address to a geometric (C:H:S) address. On older systems which do not
support lba32 (32-bit) addressing, this error may also be generated. Errors 99 and 9A usually mean the map file (-m or map=) is not readable, likely because LILO was
not re-run after some system change, or there is a geometry mis-match between what LILO used (lilo -v3 to display) and what is actually being used by the BIOS (one of
the lilo diagnostic disks, available in the source distribution, may be needed to diagnose this problem).

When the second stage loader has received control from the first stage, it prints the letter "L", and when it has initialized itself, including verifying the "Descriptor
Table" - the list of kernels/others to boot - it will print the letter "O", to form the full word "LILO", in uppercase.

All second stage loader error messages are English text, and try to pinpoint, more or less successfully, the point of failure.
Back to top
View user's profile Send private message
Smoke2firE
Apprentice
Apprentice


Joined: 19 Sep 2003
Posts: 282
Location: the couch

PostPosted: Wed Oct 15, 2003 9:38 pm    Post subject: Reply with quote

Quote:
Errors 99 and 9A usually mean the map file (-m or map=) is not readable, likely because LILO was
not re-run after some system change, or there is a geometry mis-match between what LILO used (lilo -v3 to display) and what is actually being used by the BIOS (one of
the lilo diagnostic disks, available in the source distribution, may be needed to diagnose this problem).


makes sense when you run /sbin/lilo does it give you an error about geometry mismatch?
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Thu Oct 16, 2003 7:06 am    Post subject: Reply with quote

i've got no errors when running /sbin/lilo

but the poroblem is fixed ;) pi314 found the solutions ;)
when i selected by the bios on which drive i booted, it only switched hda and hdb. So i just had to unplug my hda (windows) and install lilo on hda (normally it's hdb but i unplugged my hda ans the bios used hdb as if it was hda). And then replug everything, and everything work fine ;)

now i just have to recompile the kernel, i don't know how to compile it "by hand" so i use genkernel --config and try to make the most optimisated kernel for my machine ;)

Thanks everybody for your help!
Back to top
View user's profile Send private message
Pete_Keller
l33t
l33t


Joined: 30 Sep 2003
Posts: 664
Location: Norwich, CT USA

PostPosted: Thu Oct 16, 2003 12:06 pm    Post subject: Reply with quote

Grunk,

Compiling by hand is running make menuconfig, which is what genkernel --config actually does. It just removes the safety net of genkernel so if you screw up, it is more likely your kernel may not function properly.

Figure out what hardware you have and remove items you do not have (you only have one sound card, you do not need the drivers for all the others).

Before you start to compile the kernel copy the /usr/src/linux/.config file to allow you to rebuild the kernel if you goof up (I like to copy mine to configYYYYMMDD_HHMM, that way I know when I saved them. To rebuild copy your saved kernel back to .config and run make dep...etc.

When you recompile the kernel, save the working kernel (I call it bzImage.works) and have a lilo/grub entry that points to the working image and (if necessary) initrd. that way if something does not work, you can almost always boot into a working kernel.

Pete
Back to top
View user's profile Send private message
Grunk
n00b
n00b


Joined: 14 Oct 2003
Posts: 38

PostPosted: Thu Oct 16, 2003 12:49 pm    Post subject: Reply with quote

Ok thanks for this ;)
i didn't make any backups of old configs/kernels so i used to boot with the install CD when my kernel didn't work. My actual kernel seems to work, i just have a few errors when booting (it's better than my first kernel which was full of errors :p).
Well if i don't find this evening what those errors refers to, i'll post them here :p i'm at work now and i don't exactly remeber them...if i well remember i had a problem with the drivers for my ethernet card....well i'll try again this evening.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum